Prompt file imported from RaveenGitHub/tharaNaayagan (
.github/prompts/prepare-functional-tests.prompt.md). Copyright stays with the author.
Prepare Functional Tests Prompt
Use this prompt to convert ready-to-automate functional test scenarios into executable TypeScript Playwright code.
Goal
Generate clean, maintainable Playwright functional automation code following repository conventions:
- Reusable Page Object Models in
pages/extendingBasePage - Centralized, accessible semantic locators in
locators/common.locators.ts(getByRole,getByLabel,getByTestId) - Modular functional test specs in
tests/functional/(e.g.,tests/functional/smoke.spec.ts,tests/functional/auth.spec.ts,tests/functional/security.spec.ts,tests/functional/boundary.spec.ts) - Reusable fixtures and dynamic test data builders in
fixtures/test-data.ts - Verification with
npm run quality-gateandnpm test
Inputs
- Functional test scenarios from
docs/scenarios.mdordocs/traceability-tracker.md - Application structure in
public/or live target URL - Existing POM classes in
pages/
