Repository navigation
[docs] Adding playwright guide - #3360
Conversation
This commit introduces a new documentation file detailing the setup and execution of end-to-end tests for WordPress plugins and themes using Playwright and the Playground CLI. The guide covers prerequisites, project setup, configuration, writing tests, and best practices for locator selection, ensuring users can effectively implement E2E testing without the need for Docker or databases. Key sections include: - Prerequisites for testing - Step-by-step project setup instructions - Configuration of Playwright for optimal performance - Guidance on writing and running tests This addition enhances the documentation by providing clear, actionable instructions for developers looking to leverage Playwright in their WordPress projects.
This commit introduces a new section in the documentation that provides a comprehensive guide on setting up automated end-to-end tests for WordPress plugins and themes using Playwright and the WordPress Playground CLI. The guide outlines the necessary steps for configuration and execution, enhancing the overall documentation for developers looking to implement E2E testing effectively.
…ng guide with Playwright This commit introduces translations of the end-to-end testing guide for WordPress plugins and themes using Playwright into Spanish, French, and Portuguese. The new language versions enhance accessibility for non-English speaking developers, ensuring a broader audience can effectively implement E2E testing in their projects.
There was a problem hiding this comment.
Pull request overview
Adds a new guide documenting how to run Playwright E2E tests against WordPress Playground, and wires it into the docs navigation.
Changes:
- Added a new “E2E Testing with Playwright and WordPress Playground” guide (EN + translations).
- Linked the new guide from the guides index page.
- Added the guide entry to the Docusaurus sidebar.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/docs/site/sidebars.js | Adds the new E2E Playwright guide to sidebar navigation. |
| packages/docs/site/docs/main/guides/index.md | Adds a new entry in the guides index that links to the E2E Playwright guide. |
| packages/docs/site/docs/main/guides/e2e-testing-with-playwright.md | Introduces the new English Playwright + Playground E2E testing guide content. |
| packages/docs/site/i18n/pt-BR/docusaurus-plugin-content-docs/current/main/guides/e2e-testing-with-playwright.md | Adds the Portuguese (pt-BR) version of the new guide. |
| packages/docs/site/i18n/fr/docusaurus-plugin-content-docs/current/main/guides/e2e-testing-with-playwright.md | Adds the French version of the new guide. |
| packages/docs/site/i18n/es/docusaurus-plugin-content-docs/current/main/guides/e2e-testing-with-playwright.md | Adds the Spanish version of the new guide. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bgrgicak
left a comment
There was a problem hiding this comment.
Great work @fellyph! I left some improvement suggestions, but overall you covered the important parts.
One concern that I have is that some content like Choosing locators and Auto-waiting and web-first assertions aren't Playground specific and fit more into a general Playwright tutorial.
Similarly, for the Blueprints sections like Setting options and creating content.
|
|
||
| ## Testing across PHP and WordPress versions | ||
|
|
||
| Parameterized tests cover multiple version combinations without duplicating test code: |
There was a problem hiding this comment.
Might be worth mentioning SupportedPHPVersion which provides a list of all available PHP versions.
…t.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…urrent/main/guides/e2e-testing-with-playwright.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ent/main/guides/e2e-testing-with-playwright.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ent/main/guides/e2e-testing-with-playwright.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…t.md Co-authored-by: Bero <berislav.grgicak@gmail.com>
…port configuration - Revised prerequisites to specify testing options for WordPress plugins/themes or entire sites. - Updated default port in examples from 9400 to 9500 for consistency. - Enhanced explanation of the `autoMount` and `mount` properties for better user control over plugin and theme identification.
…rdPress version support - Revised the `preferredVersions` property to support PHP versions 7.4–8.5 and clarified the use of the `SupportedPHPVersion` type from `@php-wasm/universal` for type-safe PHP version values. - Updated corresponding translations in Spanish, French, and Portuguese to ensure consistency across language versions.
mho22
left a comment
There was a problem hiding this comment.
It looks like it is a long review but this is mostly replacing :
pluginwithextensionweb-firstwithorientée web
and some minor things. So, I approve.
### Motivation for the change, related issues English docs/main/guides/index.md now lists 13 guides, including PHP snippets ([#3644](#3644)), PHP frameworks ([#3766](#3766)), Playground for Everyone ([#3103](#3103)), Blueprint content import ([#4032](#4032)), PR preview buttons ([#2893](#2893)), the agent skill ([#3282](#3282)), runCLI ([#2833](#2833)), PHPUnit ([#3487](#3487)), and Playwright E2E ([#3360](#3360)). The Tagalog index still had only the iOS, demo content, theme, and plugin guides. /tl/guides readers would miss the newer entries, even though Docusaurus can fall back to English for pages that are not translated yet. ### Implementation details 1. Updated packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/guides/index.md. 2. Expanded the frontmatter description to match English. 3. Kept and aligned the four existing Tagalog entries (iOS / Blocknotes, demo content, theme developers, plugin developers). 4. Added Tagalog blurbs for the nine missing guides, in the same order as English. 5. Kept the original English above each block in HTML comments, per the translation guide. 6. Testing Instructions (or ideally a Blueprint) 7. Docs-only change; no Blueprint. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Expanded the Tagalog guides index from 4 to 13 guide links. - Added translated guides covering PHP snippets and embeds, PHP frameworks, WordPress Playground, Blueprints, GitHub Actions, the Playground Agent Skill, CLI usage, PHPUnit, and Playwright testing. - Revised the page description, introduction, and existing guide sections for clearer Tagalog-language guidance. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This pull request adds documentation and sidebar navigation for a new guide on end-to-end (E2E) testing with Playwright and WordPress Playground. The main focus is to help users set up automated E2E tests for their WordPress plugins and themes using Playwright.
Documentation updates:
Navigation updates: