-
Notifications
You must be signed in to change notification settings - Fork 0
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
test: seeding a pool of test users for e2e tests #158
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
5f791b5
to
2c5dccd
Compare
2c5dccd
to
99ca480
Compare
99ca480
to
4d01ed3
Compare
Great idea here. Will we need to think about some kind of clean up if we're creating ephemeral users, say, per-branch? |
b75e888
to
c6fca67
Compare
So the impact should be:
We do already create a small number of ephemeral users when testing and it hasn't caused any issues yet. If it starts to become a problem, we could look at a script to clean up test accounts which haven't logged in in X days, or a github workflow to clean up when a PR is closed Update: There's a bit of a judgement involved as well, because it's not necessarily a negative to have a staging environment that's more full if it brings it closer to production. That's a bit of a can of worms though! |
c6fca67
to
8f4eb0e
Compare
8f4eb0e
to
7d27955
Compare
7d27955
to
2dd3e1d
Compare
2dd3e1d
to
8cdb0c3
Compare
Playwright e2e testsTo view traces locally, unzip the report and run: npx playwright show-report ~/Downloads/playwright-report |
146040a
to
53bbd4a
Compare
53bbd4a
to
65664ef
Compare
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very helpful!
await page.goto(`${TEST_BASE_URL}/aila`); | ||
await expect(page.getByTestId("demo-banner")).toBeVisible(); | ||
await expect(page.getByTestId("demo-banner")).toContainText( | ||
"Create 3 lessons per month", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just "lessons per month" if that is going to change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's an interesting point. Ideally it should be reset when the user is prepared so this is actually quite a useful test!
Problem
At the moment, all our e2e tests use a single test@thenational.academy user. This is limiting us because:
Description
test-support
tRPC router andprepareUser
mutationtest+my-branch-demo@thenational.academy
,test+matts-macbook-demo@thenational.academy
test-support
nextjs pageNot included at the moment:
Issue(s)
Fixes #AI-553
How to test
pnpm run test-e2e-ui
demo-accounts.test.ts
and the test insideScreenshots
First run:
Second run:
Checklist