Use when running E2E tests, setting up the E2E environment, debugging E2E test failures, or verifying code changes work from a user's perspective. Triggers include "run E2E tests", "verify changes", "Playwright", "test setup", "E2E failures".
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Use when running E2E tests, setting up the E2E environment, debugging E2E test failures, or verifying code changes work from a user's perspective. Triggers include "run E2E tests", "verify changes", "Playwright", "test setup", "E2E failures".
version
1.0.0
WooPayments E2E Testing
Run Playwright E2E tests to verify changes work from a user's perspective — real browser, real Stripe test transactions, real WordPress site.
When to Use
After implementing a feature or fix — verify it works end-to-end
Setting up E2E environment for the first time
Debugging E2E test failures — reading traces, screenshots, logs
Writing new E2E tests — structure and conventions
Quick Reference
Task
Command
First-time setup
bin/setup-e2e-local.sh && pnpm run build:client && pnpm run test:e2e-setup
Run all tests
pnpm run test:e2e
Run specific test
pnpm run test:e2e tests/e2e/specs/wcpay/merchant/file.spec.ts
--live — use live server mode (Jetpack tokens) instead of local
--with-subscriptions — include subscription tests
--help — see all options
Build the client:
pnpm run build:client
Set up the E2E Docker environment:
pnpm run test:e2e-setup
This takes several minutes. It:
Starts Docker containers (WordPress on port 8084, MySQL on port 5698)
Starts Transact Platform Server (port 8088)
Installs WordPress, WooCommerce, WooPayments, dev tools
Configures Stripe account linking
Imports sample products and creates test users
Verify it works:
pnpm run test:e2e tests/e2e/specs/wcpay/merchant/merchant-admin-deposits.spec.ts
Important: Pre-setup steps for local server mode
Before running pnpm run test:e2e-setup, these steps are required:
Sync gitignored server code: The transact-platform-server has server/ and missioncontrol/ gitignored (populated via pnpm run pull). After the E2E setup clones the repo, these dirs are empty. The setup script (bin/setup-e2e-local.sh) handles this automatically, or manually:
rsync -a --delete /path/to/transact-platform-server/server/ tests/e2e/deps/transact-platform-server-e2e/server/
rsync -a --delete /path/to/transact-platform-server/missioncontrol/ tests/e2e/deps/transact-platform-server-e2e/missioncontrol/
Install dev tools dependencies: The dev tools plugin needs composer install after cloning:
cd tests/e2e/deps/wcp-dev-tools-e2e && composer install --no-dev --no-interaction
Pre-clone dev tools (optional): To avoid the clone + install race condition, pre-clone before running setup:
Dev tools clone fails: Ensure WCP_DEV_TOOLS_REPO in local.env points to a valid git repo or local path
"Critical error" on server startup: Missing server/ dir in the E2E clone. Run rsync step above.
"vendor/autoload.php not found" in dev tools: Run composer install in tests/e2e/deps/wcp-dev-tools-e2e/.
Onboarding wizard shown instead of admin pages: The Stripe test account isn't fully onboarded. Re-run bin/setup-e2e-local.sh (auto-creates and onboards), or complete setup in Stripe Dashboard.
"Already linked" error: Run pnpm run test:e2e-reset first for a clean start.
Workflow 2: Running Tests (Agent Verification)
Before running tests — prerequisites check
# 1. Docker running?
docker info > /dev/null 2>&1 || echo"Start Docker first"# 2. E2E containers up?
docker ps --format '{{.Names}}' | grep -q wcp_e2e_wordpress || pnpm run test:e2e-up
# 3. Client built with latest changes?
pnpm run build:client
Choosing what to run
After a change to merchant admin UI:
pnpm run test:e2e tests/e2e/specs/wcpay/merchant/
After a change to checkout/shopper flow:
pnpm run test:e2e tests/e2e/specs/wcpay/shopper/
After a change to a specific feature (e.g., disputes):
pnpm run test:e2e -- -g "dispute"
Run a single spec file:
pnpm run test:e2e tests/e2e/specs/wcpay/merchant/merchant-admin-disputes.spec.ts
Run block-based checkout tests only:
pnpm run test:e2e -- --grep @blocks
Reading results
Console output: Pass/fail summary printed after run
HTML report: Run pnpm exec playwright show-report to open in browser
On failure: Screenshots saved to tests/e2e/test-results/
Traces: Available in tests/e2e/test-results/ (open with pnpm exec playwright show-trace <trace.zip>)
The console shows which test failed and the error message. Look for:
Assertion failures (expected vs actual)
Timeout errors (element not found — usually a selector issue or slow page)
Network errors (server not responding)
Step 2: Check artifacts
# Screenshots (taken on failure)ls tests/e2e/test-results/
# Open the HTML report
pnpm exec playwright show-report
# Open a specific trace
pnpm exec playwright show-trace tests/e2e/test-results/<test-folder>/trace.zip