Skip to main content
prompt GP ChatGPT

Playwright E2E taste — ChatGPT prompt: purpose and setup

The Playwright E2E taste prompt for ChatGPT sets conventions for Playwright end-to-end tests. It covers core user journeys and test isolation, from local runs to CI.

CC0-1.0 ★ 178,201 updated 2026-10-24

Open on GitHub

What Playwright E2E taste does

The prompt lays out a Playwright Test approach for end-to-end coverage: keep tests in the app repository and focus on critical user journeys. It favours role, label, and test-ID locators over CSS or XPath, and calls for Playwright’s auto-waiting expect API instead of fixed waitForTimeout pauses.

Tests should use fresh browser contexts and seeded data, so their results do not depend on execution order. The prompt also calls for a dedicated test environment, failure-only traces and screenshots, and mocks for payment, email, and SMS providers. Production is not a test target.

For Claude Code, place the file at .claude/commands/prompts.csv.md. CI guidance includes pinning the browser revision and reviewing traces before changing retry settings.

What it helps with

  • plan E2E coverage for critical user journeys
  • choose selectors that survive interface restyles
  • keep tests independent of run order
  • reduce flaky checks in CI

Example prompts for the agent

  • Plan Playwright E2E tests for sign-in, the main editing flow, and sign-out.
  • Review these tests for fixed waits and dependencies on execution order.
  • Suggest a test setup that isolates browser sessions and mocks payment providers.

How to install Playwright E2E taste

How to use

Paste the text at the start of a chat or into project instructions

Questions about Playwright E2E taste

How do I install Playwright E2E taste in Claude Code?

Place the prompt file at .claude/commands/prompts.csv.md.

What does Playwright E2E taste do?

It sets conventions for Playwright E2E tests, including locator choices, test isolation, environment setup, and CI failure handling.

Which locators does Playwright E2E taste recommend?

It favours getByRole, getByLabel, and getByTestId over CSS and XPath. Add a stable data-testid when role and label locators are ambiguous.

Source text

prompts.csv · CC0-1.0
# Playwright E2E taste of a flake-intolerant QA engineer
- Keep end-to-end tests in the same repository as the app, under a top-level `e2e/` or `tests/e2e/` folder. Confidence: 0.90
- Use Playwright Test as the runner; do not mix Cypress and Playwright in one project. Confidence: 0.90
- Prefer `getByRole`, `getByLabel` and `getByTestId` over CSS or XPath selectors that break on restyles. Confidence: 0.95
- Add a stable `data-testid` only when role and label are genuinely ambiguous, and document the convention in the README. Confidence: 0.85
- Assert with Playwright's auto-waiting expect API; never sprinkle fixed `waitForTimeout` calls to "make it pass". Confidence: 0.95
- Isolate each test with a fresh browser context and seed data; tests must not depend on run order. Confidence: 0.90
- Cover the critical user journeys first: sign-in, the main create/edit flow, checkout or publish, and sign-out. Confidence: 0.90
- Keep E2E count small and high-value; push edge cases and validation matrices down to unit and component tests. Confidence: 0.85
- Use Page Object or fixture helpers for shared flows, but keep assertions in the test file so failures stay readable. Confidence: 0.80
- Run tests against a dedicated preview or ephemeral environment with known seed data, not against production. Confidence: 0.90
- Capture trace, screenshot and video on failure only, and upload them as CI artifacts. Confidence: 0.90
- Pin the Playwright browser revision in CI so local and pipeline screenshots stay comparable. Confidence: 0.85
- Tag slow or third-party-dependent tests and exclude them from the default PR suite; run the full set on main or nightly. Confidence: 0.80
- Stub or mock external payments, email and SMS providers; never hit real vendor sandboxes from every PR. Confidence: 0.85
- Prefer API or storage-state setup for authenticated sessions instead of clicking through login in every test. Confidence: 0.90
- Fail the build when a test is flaky more than once in a short window; quarantine and fix instead of rerunning forever. Confidence: 0.85
- Use `test.step` to group actions in the report so a failure points at the broken step, not a wall of clicks. Confidence: 0.75
- Keep viewport and locale explicit in the config for visual checks; do not rely on developer laptop defaults. Confidence: 0.80
- Review traces for every new flake before merging a "retry" config change. Confidence: 0.85
- Document how to run one file and one headed test locally in a short CONTRIBUTING note. Confidence: 0.80

© f · CC0-1.0 · f/prompts.chat

Similar prompts

All prompts for Testing and QA →

From the same set218

The whole set →
Helm Chart taste The Helm Chart taste ChatGPT prompt sets criteria for designing Helm charts. It helps review templates, security settings, and chart tests before release. GP ChatGPT ★ 178,201repo stars Prisma ORM taste Prisma ORM taste — a prompt for ChatGPT and Claude Code establishes pragmatic guidelines for database workflows with Prisma ORM. Directs model schema design, migrations, and query patterns. GP ChatGPT ★ 178,201repo stars GitHub Actions taste The GitHub Actions taste ChatGPT prompt sets out practices for building CI with GitHub Actions. It covers checks, releases, and deployment safeguards. GP ChatGPT ★ 178,201repo stars Cloudflare Worker taste Cloudflare Worker taste — a prompt for ChatGPT and Claude.ai that sets engineering standards for Cloudflare Workers development. It enforces architectural principles for coding, secret management, and deployment. GP ChatGPT ★ 178,201repo stars Next.js App taste Next.js App taste — a prompt for ChatGPT and Claude.ai that enforces pragmatic Next.js App Router conventions. It steers code generation toward Server Components, safe caching, and strict data validation. GP ChatGPT ★ 178,201repo stars Data Visualization taste The Data Visualization taste ChatGPT prompt guides clear data visualization. It helps choose a chart type, format its elements, and check accessibility. GP ChatGPT ★ 178,201repo stars Load Testing taste The Load Testing taste prompt for ChatGPT sets performance testing standards and reliability engineering principles. It is applied when designing load test scenarios and analyzing backend capacity. GP ChatGPT ★ 178,201repo stars Neovim Config taste The Neovim Config taste ChatGPT prompt sets out a terminal-first style for building a Neovim configuration in Lua. It covers plugin loading, language tools, formatting, and key bindings. GP ChatGPT ★ 178,201repo stars

Project sponsors

Companies that keep this analytics open