-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fake user support + puppeteer test #4653
Conversation
Job #9717: Bundle Size — 62.2MiB (~+0.01%).
Warning Bundle contains 66 duplicate packages – View duplicate packages Bundle metrics
Bundle size by type
View job #9717 report View tests/pizza-fake-user branch activity |
…to tests/pizza-fake-user
…to tests/pizza-fake-user
To run the tests as part of the PR process, you'll need to add a job to https://github.com/concrete-utopia/utopia/blob/master/.github/workflows/pull-requests.yml. I can help with that if you need me to. I'd suggest doing that in a follow up PR though, as it requires the server-side changes, which wouldn't be deployed until after this has been merged. |
Description
This PR adds a puppeteer test that navigates to a project, logs in with a fake user, creates a comment, and resolves it.
To run the tests, run
pnpm run comments-test
from/path/to/utopia/puppeteer-tests
.Details
Making the flow above work needed the following changes:
Supporting fake users
With this PR, the server supports an allowlisted fake user (
Alice
), which is special-cased during the login flow. If the?fakeUser=alice
query param is in the URL at load time, the server will authenticate with a pre-created user.So far, the server has only supported fake users locally. With this change, the prod environment will support fake users too.
Support setting feature flags via URL params
If the name of a feature flag is added to the query params set to
'true
' (such asCommenting=true
), that feature flag will be turned on.Next steps (after merging this PR)