e2e-panther-playwright
Installation
SKILL.md
E2e 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.