Skip to content

[docs] Adding playwright guide#3360

Merged
fellyph merged 12 commits intotrunkfrom
adding-playwright-guide
Mar 10, 2026
Merged

[docs] Adding playwright guide#3360
fellyph merged 12 commits intotrunkfrom
adding-playwright-guide

Conversation

@fellyph
Copy link
Copy Markdown
Collaborator

@fellyph fellyph commented Mar 9, 2026

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:

  • Added a new guide, "E2E Testing with Playwright and WordPress Playground," to the guides index, providing instructions for setting up automated E2E tests.

Navigation updates:

  • Included the new E2E testing guide in the documentation sidebar to ensure it's easily discoverable.

fellyph added 3 commits March 9, 2026 19:54
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.
@fellyph fellyph requested review from bgrgicak and Copilot March 9, 2026 20:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator

@bgrgicak bgrgicak left a comment

Choose a reason for hiding this comment

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

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:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Might be worth mentioning SupportedPHPVersion which provides a list of all available PHP versions.

fellyph and others added 8 commits March 10, 2026 09:08
…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.
Copy link
Copy Markdown
Collaborator

@mho22 mho22 left a comment

Choose a reason for hiding this comment

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

It looks like it is a long review but this is mostly replacing :

  • plugin with extension
  • web-first with orientée web

and some minor things. So, I approve.

@fellyph fellyph merged commit 86cf5ed into trunk Mar 10, 2026
43 checks passed
@fellyph fellyph deleted the adding-playwright-guide branch March 10, 2026 14:02
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.

4 participants