E
e2e-panther-playwright
About e2e-panther-playwright
A testing skill for Symfony browser-based end-to-end tests with Panther, with Playwright as a separate option for needs such as WebKit or tracing. It covers setup, explicit waits, assertions, and CI debugging.
Key features
- 01Panther real-browser testing
- 02Playwright option for cross-browser needs
- 03Explicit waits and state assertions
- 04Driver and CI setup guidance
Use cases
- 01Testing JavaScript-driven journeys
- 02Validating login or checkout flows
- 03Debugging browser tests in CI
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ dev-toolings/ superpowers-symfony --skill e2e-panther-playwrightAfter installing, type/e2e-panther-playwrightin Claude Code to confirm it loaded.
Bundled filesreference.md
Details
From the project READMEE2e Panther Playwright (Symfony)
Use when
- A flow needs a real browser: JavaScript, multi-page journeys such as login, checkout or signup.
WebTestCasecannot see the behavior because it depends on client-side rendering.- Cross-browser needs (WebKit, tracing, video) that WebDriver does not cover: run Playwright separately.
- Debugging a browser test that fails only in CI.
Default workflow
- Pick the client:
static::createPantherClient()for a real browser,static::createClient()when no JavaScript is needed. - Install
symfony/pantheranddbrekelmans/bdi, runvendor/bin/bdi detect drivers, and registerServerExtensioninphpunit.dist.xml. - Extend
PantherTestCaseand drive the flow with explicit waits:waitFor(),waitForVisibility(),waitForElementToContain(). - Assert future state with
assertSelectorWillExist()orassertSelectorWillContain(), current state withassertSelectorIsVisible(). - Keep the suite in
tests/E2Eand reset the database between tests (DAMADoctrineTestBundle or Foundry). - Debug with
PANTHER_NO_HEADLESS=1and--debug; setPANTHER_NO_SANDBOX=1in CI.
Guardrails
- Never rely on implicit timing: every async step gets a
waitFor*or anassertSelectorWill*. - Target
data-testidattributes, not styling classes. - Delete the PNGs written by
takeScreenshot()orPANTHER_ERROR_SCREENSHOT_DIR; never commit them. - E2E is slow: cover critical paths only and keep it apart from unit tests.
Progressive disclosure
- Use this file for execution posture and risk controls.
- Open references when deep implementation details are needed.
Output contract
- E2E test files, with the client type and the wait strategy used.
- Driver setup,
ServerExtensionregistration and thePANTHER_*variables needed locally and in CI. - Confirmation that screenshots were cleaned up.
References
reference.md
Comments
Markdown supported