Check in a browser what the unit tests cannot see
Every serious defect in this project was found by opening the app, most recently a feature that rendered blank cards to every user while its tests passed, and a progress bar labelled in the wrong unit. Five checks now run without a person: that the age-four figures on screen match what the API computed, that a multi-week period draws as one bar rather than fragments, that Sundays and holidays are red where Saturdays are not, that no identifier leaks into visible text, and that no page logs an error. Three of them were confirmed by reintroducing the original bug and watching the right test fail. Dates are derived rather than written down: Easter is computed independently instead of asked of the system under test, and the fixture period is placed relative to today, so the suite does not expire. It runs as its own job and does not block a merge until it has proved itself stable.
This commit is contained in:
@@ -66,3 +66,51 @@ jobs:
|
||||
|
||||
- name: Test with coverage
|
||||
run: npm run coverage
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# E2E (Playwright): browser-driven checks the unit suites can't catch —
|
||||
# see frontend/e2e/ for what each spec guards against. NOT a required/
|
||||
# blocking gate yet (continue-on-error): it should run and report for a
|
||||
# while before it can fail anyone's merge. Promoting it: drop
|
||||
# `continue-on-error`, add this job to the branch protection's required
|
||||
# checks, and confirm several consecutive green runs first.
|
||||
# ---------------------------------------------------------------------------
|
||||
e2e:
|
||||
name: E2E (Playwright)
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: astral-sh/setup-uv@v5
|
||||
with:
|
||||
version: "latest"
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
|
||||
- name: Install backend dependencies
|
||||
working-directory: backend
|
||||
run: uv sync
|
||||
|
||||
- name: Install frontend dependencies
|
||||
working-directory: frontend
|
||||
run: npm install
|
||||
|
||||
- name: Install Playwright browsers
|
||||
working-directory: frontend
|
||||
run: npx playwright install --with-deps chromium
|
||||
|
||||
- name: Run Playwright E2E suite
|
||||
working-directory: frontend
|
||||
run: npm run e2e
|
||||
|
||||
- name: Upload Playwright report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: playwright-report
|
||||
path: frontend/playwright-report/
|
||||
retention-days: 7
|
||||
|
||||
Reference in New Issue
Block a user