一键导入
playwright-nhs-e2e
Playwright E2E patterns for NHS user journeys — Page Object Model, accessibility, NHS Design System. Language follows tech-stack.instructions.md.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Playwright E2E patterns for NHS user journeys — Page Object Model, accessibility, NHS Design System. Language follows tech-stack.instructions.md.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Use when deploying an NHS Python/FastAPI service to Azure using Terraform, or configuring App Service, Key Vault, or Application Insights.
Use when generating a clinical safety hazard log, clinical risk matrix, or DCB0129 Clinical Safety Case Report for an NHS digital health service.
Use when scaffolding or building an NHS service with the FastAPI + React + Azure stack. Contains project structure, scaffold steps, and deployment commands.
Use when assessing a feature or PR against the GDS Service Standard 14 points, or producing NHS Alpha service assessment evidence.
Use when documenting architectural decisions for an NHS digital service using the ADR format, or when reviewing technology choices for GDS assessment evidence.
Use when drafting a Data Protection Impact Assessment (DPIA) for an NHS service that processes health data under UK GDPR.
基于 SOC 职业分类
| name | playwright-nhs-e2e |
| description | Playwright E2E patterns for NHS user journeys — Page Object Model, accessibility, NHS Design System. Language follows tech-stack.instructions.md. |
Patterns and rules for Playwright browser tests that verify NHS user journeys. Check tech-stack.instructions.md for the E2E testing language and framework — generate all code in that language.
Installed during scaffold. Use the Playwright test runner and axe-core accessibility library for the stack's language. Always run playwright install --with-deps chromium.
tests/e2e/
├── pages/ # Page Objects (one per route)
├── journeys/ # One test file per user journey
├── screenshots/ # Visual QA evidence (gitignored)
└── accessibility/ # Full-site axe audit
Add shared fixtures/config as appropriate for the test framework (e.g. conftest.py, playwright.config.ts). Set base URL to the local frontend dev server.
One class per page/route in tests/e2e/pages/. Tests call Page Object methods — never raw selectors. Each Page Object exposes navigation and interaction methods.
Run axe-core on every page the test visits — zero violations allowed. Also verify: keyboard Tab order, screen reader landmarks (<main>, <nav>, <header>, <footer>), form labels, and NHS error summary on validation failure.
Role-based only: get_by_role, get_by_label, get_by_text. Never CSS or XPath.
| Pattern | Key assertions |
|---|---|
| Start page | NHS header, service name <h1>, "Start now" button |
| Question pages | One question per page, back link, continue button |
| Check answers | Summary list with "Change" links |
| Confirmation | Panel with reference number |
| Error pages | Error summary at top, inline field errors, focus moves to summary |
| Data display | Assert expected data values appear in page text — do not rely on element visibility alone |
| Success pages | Assert error summary component is NOT present |
| Summary list / data table | Assert every value cell is non-empty |
One test file per journey. Derive tests from:
discovery/user_journeys/data/) — digital touchpoint rows → test stepsdocs/adr/) — concrete routes, endpoints, data modelsuser_stories/story-*.md) — acceptance criteria → assertionsThe journey gives the sequence; ADR and stories give implementation detail.
Save screenshots on failure and at key journey milestones. Store in tests/e2e/screenshots/. Capture at minimum: start page, each form submission result, confirmation page, and error states.
943 476 5919)