Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

e2e tests (playwright) #594

wants to merge 5 commits into from

Conversation

vyorkin
Copy link
Contributor

@vyorkin vyorkin commented Aug 19, 2024

No description provided.

@vyorkin vyorkin self-assigned this Aug 19, 2024
@vyorkin vyorkin force-pushed the feature/e2e-playwright branch 2 times, most recently from 4612e7b to b2cfd0a Compare January 27, 2025 09:52
Copy link

github-actions bot commented Jan 27, 2025

📦 build.zip [updated at Feb 14, 11:10:10 AM UTC]

@vyorkin vyorkin marked this pull request as ready for review January 28, 2025 15:51
src/ui/index.tsx Outdated
@@ -70,7 +70,11 @@ async function initializeUI({
try {
await registerServiceWorker();
initializeChannels();
await maybeOpenOnboarding();

if (process.env.NODE_ENV !== 'test') {
Copy link
Contributor

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

Copy link
Contributor Author

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,
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this part work?

Copy link
Contributor Author

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) {
Copy link
Contributor

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?

Copy link
Contributor Author

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

@vyorkin vyorkin force-pushed the feature/e2e-playwright branch from 8ad2784 to 40fa30f Compare February 13, 2025 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants