Docs: Remove Puppeteer references and update to Playwright#76766
Docs: Remove Puppeteer references and update to Playwright#76766youknowriad merged 2 commits intoWordPress:trunkfrom
Conversation
Updates the block editor documentation to remove outdated Puppeteer references. The project has fully migrated to Playwright for end-to-end testing. - Rewrites automated-testing.md to explain why Playwright is the tool of choice - Removes Puppeteer-specific CLI flags from testing-overview.md - Updates README link text in explanations docs - Cleans up legacy Puppeteer mention in e2e guide
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @meravi! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
docs/contributors/code/e2e/README.md
Outdated
| ### Avoid global variables | ||
|
|
||
| Previously in our Jest + Puppeteer E2E tests, `page` and `browser` are exposed as global variables. This makes it harder to work with when we have multiple pages/tabs in the same test, or if we want to run multiple tests in parallel. `@playwright/test` has the concept of [fixtures](https://playwright.dev/docs/test-fixtures) which allows us to inject `page`, `browser`, and other parameters into the tests. | ||
| In the previous E2E test setup, `page` and `browser` were exposed as global variables. This made it harder to work with when having multiple pages/tabs in the same test, or when running multiple tests in parallel. `@playwright/test` has the concept of [fixtures](https://playwright.dev/docs/test-fixtures) which allows us to inject `page`, `browser`, and other parameters into the tests. |
There was a problem hiding this comment.
Not entirely convinced the change here is necessary
There was a problem hiding this comment.
Simplified this and removed the duplication
Could you please take another look? @youknowriad
|
|
||
| ```bash | ||
| WP_BASE_URL=http://wp.test npm run test:e2e -- --wordpress-username=admin --wordpress-password=password | ||
| npm run test:e2e -- --ui |
There was a problem hiding this comment.
Is this the right command? I've always used --headed
There was a problem hiding this comment.
Yep, both are valid 🙂 --headed just runs the browser visibly, while --ui gives you the Playwright UI, which is handy for debugging, so that’s why it’s in the docs.
There was a problem hiding this comment.
Yes, debug UI is more helpful.
Co-authored-by: meravi <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: himanshupathak95 <[email protected]> Co-authored-by: Mamaduka <[email protected]>
What?
Updates documentation to remove outdated Puppeteer references,
replacing them with Playwright.
Why?
The project has fully migrated from Puppeteer to Playwright for
end-to-end testing. The documentation still contained outdated
references to Puppeteer.
How?
automated-testing.mdto explain why Playwright is thetool of choice (kept the architecture page per feedback from
@youknowriad in Documentation: Remove Puppeteer references #60416)
testing-overview.mdto removePuppeteer-specific commands
README.mdfilese2e/README.mdTesting Instructions
Fixes #60416