| description | Iterating on Playwright tests |
|---|
Scratch org setup: see references/local-setup.md.
- run
weblocally (use--retries 0, follow debugging tips) - run
desktoplocally (use--retries 0)
Passing args: Use -- to forward params to the underlying playwright command. Prefer file path over --grep (exact match, immune to title changes):
WIREIT_CACHE=none npm run test:web -w <package> -- --retries 0 test/playwright/specs/myTest.headless.spec.ts
WIREIT_CACHE=none npm run test:desktop -w <package> -- --retries 0 test/playwright/specs/myTest.headless.spec.tsWIREIT_CACHE=none is always required when running a subset — wireit's cache key is based on input file fingerprints, not CLI args, so it serves the cached full-suite result otherwise.
Port conflict (web): If a previous web server is still on port 3001, playwright fails immediately with http://localhost:3001 is already used. Fix: lsof -ti :3001 | xargs kill -9
- edit github workflows if needed
- CI (windows, gha) - see
analyze-e2e.mdfor monitoring and analyzing results
After passing, clean up while keeping tests passing:
- remove fallbacks, waits, "try another way"
- align with
coding-playwright-tests.mdrules - consolidate locators, increase DRY/reuse
- ensure playwright-ext exports are used by other extensions
- verify compile/lint pass (
@.claude/skills/verification/)
- Don't run
debugmode unless instructed (pauses for human) - Use @https://playwright.dev/docs/api/class-locator#locator-inner-html on known-good locator to get accurate inner locators
- Take screenshots (
read_filetool) - review intest-resultsfolder - Capture HTML parent levels up from problem area to verify correct locators
- Use emojis infrequently
https://github.com/redhat-developer/vscode-extension-tester - pageObject/Selector patterns (selenium, not playwright, no web support, but informative)
When analyzing failures, ignore these (expected, not errors):
- TS extension activation:
Error: Activating extension 'vscode.typescript-language-features' - All installed extensions temporarily disabled (other extensions, not ours) - expected notification
- VS Code 1.116+ /
@vscode/test-electron:cannot change enablement of github copilot chat extension— workbench Copilot Chat toggle in test env; non-critical (helpers.tsNON_CRITICAL_ERROR_PATTERNS)