Skip to content

Add isolated Playwright E2E environment for Tutor and Tutor Pro - #3110

Draft
b-l-i-n-d wants to merge 25 commits into
4.2.0from
research/e2e-isolated-environment
Draft

b-l-i-n-d wants to merge 25 commits into
4.2.0from
research/e2e-isolated-environment

Conversation

@b-l-i-n-d

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a Playwright + wp-env harness that runs the Tutor core and Tutor Pro suites in one container on port 8888.
  • Adds environment setup files, Docker preflight checks, runner scripts, and after-start seeding for admin, courses, enrollments, WooCommerce, assignments, and content-bank fixtures.
  • Adds WP-CLI-backed factories, including add-on state toggling that restores the previous value, plus guest and shop-manager fixtures.
  • Adds per-role authentication storage state so specs start signed in without repeating the login flow.
  • Adds mail-log and HTTP-stub mu-plugins so email and outbound request assertions work without external services.
  • Expands coverage for admin dashboard lists, filters, sort order, the course creation journey, student variations, checkout smoke paths, and Pro add-on specs.
  • Scopes add-on toggling to isolated specs; standard add-ons rely on the seeded baseline so lifecycle, gating, security, and dependency-gated tests are not disturbed.
  • Documents the environment contract and research notes, and adds the PR description template and validation workflow.

Testing

  • Run pnpm e2e:full against a fresh wp-env container and confirm the suite starts without a restrictive feature grep.
  • Run pnpm e2e:pro and confirm the Pro project resolves the shared config and factories.
  • Re-run an add-on spec twice and confirm beforeAll/afterAll restores the previous enabled state with no leakage into neighbouring specs.
  • Verify each seeded role can sign in from stored auth state and that factories return usable IDs and URLs.
  • Confirm the mail log records generated messages and the HTTP stub intercepts outbound requests without network access.
  • Run PHPCS on changed PHP files, and ESLint plus tsc --noEmit on changed TypeScript.
  • Full suite on CI: Not run.

- Seed a shop_manager user and expose managerPage fixture/credentials
- Flush rewrite rules after direct add-on config writes
- Count post rows directly so disabled add-ons still report data
@b-l-i-n-d
b-l-i-n-d changed the base branch from dev to 4.2.0 October 22, 2026 16:54
@b-l-i-n-d
b-l-i-n-d marked this pull request as draft October 22, 2026 16:55
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