Skip to content

feat: add Playwright E2E testing scaffold - #144

Open
Kallyan01 wants to merge 2 commits into
migration/typescriptfrom
feat/playwright
Open

Kallyan01 wants to merge 2 commits into
migration/typescriptfrom
feat/playwright

Conversation

@Kallyan01

@Kallyan01 Kallyan01 commented Aug 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Add a Playwright end-to-end testing scaffold running against a dedicated wp-env
test environment, completing the shared OneSearch test baseline alongside the
Jest unit suite from #141.

Changes

  • playwright.config.ts (new): Playwright setup rooted at testDir: ./tests/e2e.
  • .wp-env.test.json (new): an isolated test environment on port 8889 with
    WP_DEBUG on and its own debug-test.log, so E2E runs never touch the dev
    container or its database.
  • E2E specs (new):
    • tests/e2e/plugin/activation.spec.ts — activates and deactivates the plugin.
    • tests/e2e/scaffold/plugin-preview.spec.ts — asserts the built plugin is
      present and activatable, and that the admin surface renders without a fatal.
  • Scripts: test:e2e (wp-scripts test-playwright) and wp-env:test
    (wp-env --config=.wp-env.test.json).
  • @wordpress/env ^10.39.0 → ^11.8.0: 10.x has no --config flag, so
    wp-env:test silently no-opped against the already-running dev container
    instead of starting a separate test environment. The bump is what makes the
    isolated test env actually work.
  • Adds @playwright/test and pins @wordpress/e2e-test-utils-playwright to
    1.46.0 (including an override for @wordpress/scripts) to keep the
    Playwright utils version consistent.

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.

1 participant