-
Notifications
You must be signed in to change notification settings - Fork 5.3k
e2e tests playwright & chromatic #15550
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
Conversation
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
79dd2a5 to
3b5d3fb
Compare
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
|
I've read https://www.chromatic.com/docs/faq/find-project-token/ but still not sure is this a secret revealed in code:
|
Hey @Aldekein this is a testing token and low risk one. Will reset it once we are done. |
d0b55b5 to
fc09ae2
Compare
323358f to
4b16f78
Compare
.github/workflows/playwright.yml
Outdated
| push: | ||
| branches: [master, staging, e2e-tests] # TODO: remove e2e-tests (testing branch) | ||
| pull_request: | ||
| branches: [master, staging, e2e-tests] # TODO: remove e2e-tests (testing branch) |
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.
TODO before merging
add storybookBaseDir to Playwright workflow configuration add tests for find-wallets page test: delete chromatic config file add env variable for e2e token
|
Hey @pettinarip was looking through action logs https://github.com/ethereum/ethereum-org-website/actions/runs/15740734598/job/44365122681 and looks like there are a bunch of errors during the "Run E2E Tests on Netlify URL" step of the All looking similar to that... the |
Yeah, I've seen those errors before too. My understanding is that tests like this fail for other reasons like network issues, long responses, etc. In those cases, Playwright retries the same test. If it fails again (or reaches your retry limit), it will throw an error. If it succeeds on retry, it passes the test but tags it as "flaky". You can see the summary at the bottom of the logs: [74/72] (retries) [Mobile Safari] › tests/e2e/home.spec.ts:35:7 › Home Page › navigation menu - mobile
[75/72] (retries) [Mobile Safari] › tests/e2e/whitepaper.spec.ts:11:7 › Whitepaper Page › whitepaper PDF link has correct href
[76/72] (retries) [Mobile Safari] › tests/e2e/whitepaper.spec.ts:19:7 › Whitepaper Page › whitepaper PDF is accessible and served as PDF
4 flaky
[webkit] › tests/e2e/global.spec.ts:68:9 › Global › Internationalization › switches to Chinese ─
[webkit] › tests/e2e/global.spec.ts:90:9 › Global › RTL Support › home page RTL visual snapshot
[webkit] › tests/e2e/global.spec.ts:96:9 › Global › RTL Support › nav flips logo and search button when switching to RTL via language picker
[Mobile Safari] › tests/e2e/home.spec.ts:27:7 › Home Page › main navigation - desktop ──────────
7 skipped
61 passed (6.3m)I wouldn't worry too much since they seem pretty random (depends on external things). I assume we will have flaky tests in future runs. Having said that, I'll try to make the tests more robust and see if we can reduce the amount of flaky tests. |
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.
Nice! @pettinarip this is looking great.. just gave it a run locally and overall the setup seems to be working well... it did report a handful of "failed" tests here, none "flaky", so posted a screenshot, but not sure that would need to block this.
uhmm would like to understand what is going on there. Could you paste the error messages for those tests? I assume that you were running |
|
@pettinarip They appear to be time-outs: And yes, |
|
@pettinarip Okay so my issues appear related to env vars, not just being
Search may be related to Algolia keys? Added a set that I had, but they may be old, since it's still not working; I normally don't have that enabled locally. Without those keys any page will crash if I try to access the search modal locally, so maybe that's a legit test failure? Commented out |
Yes. To clarify, given that these are e2e tests, you should run the dev mode as similar as production as possible. This means that you would need to build all languages and have api keys for all the 3rd party services since we are testing those integrations as well. |
Hey @pettinarip, just created this PR to address this issue. |


Summary
This PR adds E2E testing infrastructure with Playwright and Chromatic:
data-testidattributes for reliable testing