Files
F-r-ldraledigplannerare/frontend/e2e/support/pages.ts
T
jacobh2 ed5680253e 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.
2026-09-17 19:46:17 +02:00

26 lines
972 B
TypeScript

export interface MainPage {
path: string
testId: string
name: string
}
/**
* The authenticated pages scanned by the "no raw UUIDs" and "no console
* errors" guards.
*
* TODO(tips-wire-format): Tips (`/tips`, root testid `tips-page`) is
* deliberately left out. Its wire-format mapping (backend snake_case ->
* frontend camelCase) was never written, so today it renders blank — a fix
* is in flight in a parallel task and touching it here would collide. Once
* that fix lands, add:
* { path: '/tips', testId: 'tips-page', name: 'Tips' }
* to this list. Both `no-uuids.spec.ts` and `console-errors.spec.ts`
* iterate this array, so nothing else needs to change.
*/
export const MAIN_PAGES: MainPage[] = [
{ path: '/', testId: 'dashboard', name: 'Dashboard' },
{ path: '/calendar', testId: 'calendar', name: 'Calendar' },
{ path: '/plan', testId: 'plan-page', name: 'Plan' },
{ path: '/settings', testId: 'settings-page', name: 'Settings' },
]