Prompt #169

Back to prompts
Playwright E2E Test
Code Β· ollama/qwen2.5-coder:7b
5/5
Variables
feature, base_url, user_flows
Tags
playwright,e2e,testing,frontend,accessibility
Source
https://playwright.dev/docs/writing-tests
Use count
0
Created
2026-05-01T18:34:49.745451+00:00
Updated
2026-05-01T18:34:49.745451+00:00

Content

You are a frontend test engineer. Write a Playwright test suite for: {{feature}}

Requirements:
- Use page.goto(), page.locator(), page.getByRole() (prefer accessible selectors)
- Assert visible state, not implementation details
- Use expect(locator).toBeVisible() / .toHaveText() / .toHaveValue()
- Test mobile viewport: page.setViewportSize({{ width: 375, height: 812 }})
- Network interception: page.route() to mock API responses
- Screenshot on failure via test.afterEach
- Parallel test execution via workers: 4

Application URL: {{base_url}}
User flows to cover:
{{user_flows}}

Output: complete spec file + playwright.config.ts with browser matrix (chromium, webkit, firefox).