mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-12 05:36:40 +00:00
1.7 KiB
1.7 KiB
playwright.spec.js
This page is the SPOT for role-local Playwright test specs.
Use this page for runner integration, minimum coverage, and repository-wide scenario requirements.
For implementation scope, selector strategy, and live review, see Agent playwright.spec.js.
For the matching rendered environment contract, see Contributing playwright.env.j2.
Runner Contract
test-e2e-playwrightcopiesfiles/playwright.spec.jsinto the staged test project astests/playwright.spec.js.- The spec consumes the
.envrendered fromtemplates/playwright.env.j2. package.jsonandplaywright.config.jsstay centralized inroles/test-e2e-playwright/files/.
Requirements
- Every Playwright-enabled role must verify login and logout.
- Every role with
compose.services.dashboard.enabledmust start the test flow from the dashboard. - When the role provides both
biberandadministratorscenarios, login and logout for both must be covered. - When role-local
javascript.jsorstyle.cssis implemented or refactored, the affected user-visible behavior must be added to or updated in the Playwright suite. - Assertions must verify real UI states and user-visible outcomes, not only URL transitions or static strings.
- The suite must finish in a clearly logged-out state.
Scenario Rules
- Name tests after the real flow they verify, for example dashboard to app login and logout.
- Keep persona-specific scenarios explicit when the role distinguishes between different user paths.
- Add extra coverage when relevant, for example OIDC, LDAP, or dashboard-specific navigation.