-
Notifications
You must be signed in to change notification settings - Fork 33
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
e2e tests (playwright) #594
base: main
Are you sure you want to change the base?
Conversation
4612e7b
to
b2cfd0a
Compare
📦 build.zip [updated at Feb 14, 11:10:10 AM UTC] |
src/ui/index.tsx
Outdated
@@ -70,7 +70,11 @@ async function initializeUI({ | |||
try { | |||
await registerServiceWorker(); | |||
initializeChannels(); | |||
await maybeOpenOnboarding(); | |||
|
|||
if (process.env.NODE_ENV !== 'test') { |
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.
I'm not sure that we need such checks in the code. Or this will create a different behaviour between prod build and test run. May be it is better to provide a predefined config for test like we have some wallets in it
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.
Actually I noticed that it doesn't affect that single test, so I just removed this condition
// Retry on CI only | ||
retries: process.env.CI ? 2 : 0, | ||
// Opt out of parallel tests on CI | ||
workers: process.env.CI ? 1 : undefined, |
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.
How does this aligns with fullyParallel: true
?
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.
as I understand:
fullyParallel: true
enables parallel tests inside a single file
workers: process.env.CI ? 1 : undefined
ensures only one file runs at a time in CI.
so it kinda limits file-level concurrency in CI but keeps parallelism within file
- name: Run Playwright tests | ||
run: xvfb-run npx playwright test | ||
|
||
- name: Upload Playwright report |
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.
Does this part work?
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.
Ah, I renamed the folder to e2e-report
e2e/test.ts
Outdated
}); | ||
} | ||
|
||
export async function takeScreenshot(page: Page, screenshotPath: string) { |
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.
This function is not used anywhere. Do we need it?
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.
I haven't added an example that takes screenshots yet so probably yes it's better to remove it for now
8ad2784
to
40fa30f
Compare
No description provided.