Skip to main content
skill CX Codex

e2e-panther-playwright — Claude Code skill: E2E tests and setup

The e2e-panther-playwright skill guides Symfony E2E tests with Panther for browser flows and Playwright for more involved cases. Use it when JavaScript behavior is beyond what WebTestCase can observe.

MIT ★ 234 updated 2026-10-05

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dev-toolings/superpowers-symfony --skill e2e-panther-playwright -a claude-code
Open on GitHub

What e2e-panther-playwright does

The skill chooses static::createPantherClient() for a real-browser flow and static::createClient() when JavaScript is not involved. It calls for explicit waits such as waitFor() and assertions about elements that should appear later. For selectors, it favors data-testid over styling classes. E2E files belong in tests/E2E, with the database reset between tests.

Panther setup uses symfony/panther and dbrekelmans/bdi; run vendor/bin/bdi detect drivers and register ServerExtension in phpunit.dist.xml. For complex browser scenarios, the skill points to running Playwright separately. It also gives debugging settings: PANTHER_NO_HEADLESS=1 with --debug, and PANTHER_NO_SANDBOX=1 in CI.

E2E tests run slowly, so the skill recommends covering critical paths and keeping them apart from unit tests. Remove screenshots created by takeScreenshot() or PANTHER_ERROR_SCREENSHOT_DIR instead of committing them.

What it helps with

  • test JavaScript behavior in a real browser
  • cover a user journey across several pages
  • wait for an element or expected text
  • investigate a browser test that fails in CI
  • keep critical E2E checks separate from unit tests

Example prompts for the agent

  • Write a Symfony E2E test for a JavaScript login flow using Panther.
  • Test a multi-page checkout journey and add explicit waits.
  • Help debug a Panther test failure in CI and check the driver setup.

How to install e2e-panther-playwright

1Skills CLI (Vercel)

npx skills add dev-toolings/superpowers-symfony --skill e2e-panther-playwright -a claude-code

2Manually: put the files in place

~/.claude/skills/e2e-panther-playwright/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/e2e-panther-playwright/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about e2e-panther-playwright

How do I install e2e-panther-playwright in Claude Code?

Run npx skills add dev-toolings/superpowers-symfony --skill e2e-panther-playwright -a claude-code. The skill file is at ~/.claude/skills/e2e-panther-playwright/SKILL.md.

What does e2e-panther-playwright do?

It guides Symfony E2E tests using Panther for browser flows and Playwright for complex cases. It also covers waits, debugging, and where to keep the tests.

What do I need to set up Panther tests?

Install symfony/panther and dbrekelmans/bdi, run vendor/bin/bdi detect drivers, then register ServerExtension in phpunit.dist.xml.

Source text

SKILL.md · MIT
---
name: e2e-panther-playwright
description: Write end-to-end tests with Symfony Panther 2.4 for browser automation or Playwright for complex scenarios
capabilities: [read, search]
tags: [testing]
# projected by `bun run build` — do not edit by hand
allowed-tools:
  - Read
  - Glob
  - Grep
---

# E2e Panther Playwright (Symfony)

## Use when
- A flow needs a real browser: JavaScript, multi-page journeys such as login, checkout or signup.
- `WebTestCase` cannot 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
1. Pick the client: `static::createPantherClient()` for a real browser, `static::createClient()` when no JavaScript is needed.
2. Install `symfony/panther` and `dbrekelmans/bdi`, run `vendor/bin/bdi detect drivers`, and register `ServerExtension` in `phpunit.dist.xml`.
3. Extend `PantherTestCase` and drive the flow with explicit waits: `waitFor()`, `waitForVisibility()`, `waitForElementToContain()`.
4. Assert future state with `assertSelectorWillExist()` or `assertSelectorWillContain()`, current state with `assertSelectorIsVisible()`.
5. Keep the suite in `tests/E2E` and reset the database between tests (DAMADoctrineTestBundle or Foundry).
6. Debug with `PANTHER_NO_HEADLESS=1` and `--debug`; set `PANTHER_NO_SANDBOX=1` in CI.

## Guardrails
- Never rely on implicit timing: every async step gets a `waitFor*` or an `assertSelectorWill*`.
- Target `data-testid` attributes, not styling classes.
- Delete the PNGs written by `takeScreenshot()` or `PANTHER_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, `ServerExtension` registration and the `PANTHER_*` variables needed locally and in CI.
- Confirmation that screenshots were cleaned up.

## References
- `reference.md`

© dev-toolings · MIT · dev-toolings/superpowers-symfony

Similar skills

All skills for Testing and QA →

From the same set51

The whole set →
functional-tests functional-tests guides Claude Code in writing functional Symfony tests using WebTestCase, KernelTestCase, loginUser, and DAMA rollback. CX Codex +1 ★ 234repo stars doctrine-migrations Create and review Doctrine migrations, prepare rollbacks, and check pending changes before deployment. Useful when a Symfony app’s entity mapping changes. CX Codex +1 ★ 234repo stars symfony-messenger A skill for async message handling with Symfony Messenger: configures transports, handlers, and retry strategies. CX Codex +1 ★ 234repo stars api-platform-security api-platform-security secures API Platform operations with security expressions, voters, and validation-phase access checks in Symfony. CX Codex +1 ★ 234repo stars doctrine-relations Skill guides you through defining Doctrine relationships (OneToMany, ManyToMany, ManyToOne) with correct owning and inverse sides, cascade strategies, and N+1 query prevention. CX Codex +1 ★ 234repo stars doctrine-fetch-modes doctrine-fetch-modes guides Doctrine ORM and DBAL 4 query optimization in Symfony. Fixes N+1 queries, configures lazy loading, and implements DTO hydration. CX Codex +1 ★ 234repo stars api-platform-resources api-platform-resources is a Claude Code skill for configuring API Platform resources for REST and GraphQL. It activates for resource creation and changes to operations, pagination, or OpenAPI docs. CX Codex +1 ★ 234repo stars messenger-retry-failures messenger-retry-failures sorts out failed Symfony Messenger handlers: whether a message deserves another attempt, when it goes straight to the failure transport, and how to pull it back. CX Codex +1 ★ 234repo stars

Project sponsors

Companies that keep this analytics open