Add widget generator and associated tests