2.7 KiB
2.7 KiB
title, status, type, priority, created_at, updated_at, blocked_by
| title | status | type | priority | created_at | updated_at | blocked_by | |
|---|---|---|---|---|---|---|---|
| Fix e2e tests after boss feature changes | draft | bug | normal | 2026-03-20T19:19:31Z | 2026-03-20T19:19:36Z |
|
The e2e tests (accessibility + mobile) are failing because the test infrastructure hasn't been updated since the boss feature, journal, and admin pages were added.
Problems
1. Missing pages in test coverage
Both accessibility.spec.ts and mobile.spec.ts share a hardcoded page list that is missing several routes added since the tests were written:
Missing from page list:
runs/:runId/journal/:entryId— Journal entry page (requires journal fixture)admin/games/:gameId— Admin game detail page (requires game fixture ID)admin/games/:gameId/routes/:routeId— Admin route detail page (requires route fixture ID)admin/runs— Admin runs pageadmin/genlockes— Admin genlockes pageadmin/genlockes/:genlockeId— Admin genlocke detail page (requires genlocke fixture ID)
2. Missing test fixtures/seeding
The global-setup seeds runs, encounters, and genlockes but does not seed:
- Boss battles (via
/games/{game_id}/bosses) - Boss results (via
/runs/{run_id}/boss-results) - Journal entries (via journal API)
- Version groups (required for boss battles to work)
The RunEncounters page now renders a boss battle section, which likely makes API calls that fail or produce unexpected DOM, causing accessibility or layout violations.
3. Shared page list duplication
Both spec files duplicate the same page list — should be extracted to a shared constant in fixtures.ts.
Checklist
- Update
fixtures.tsto export a shared page list with all current routes - Add boss battle seeding to
global-setup.ts(create boss via API after game seed) - Add boss result seeding to
global-setup.ts(create result for the test run) - Add journal entry seeding to
global-setup.ts(create entry for the test run) - Add new fixture IDs to
Fixturesinterface (journalEntryId, routeId, bossId, etc.) - Update
accessibility.spec.tsto use shared page list - Update
mobile.spec.tsto use shared page list - Run e2e tests locally and verify they pass
- Fix any new accessibility or layout violations on boss/journal pages
Files to modify
frontend/e2e/fixtures.tsfrontend/e2e/global-setup.tsfrontend/e2e/accessibility.spec.tsfrontend/e2e/mobile.spec.ts
Notes
- The boss feature is still in progress (epic
nuzlocke-tracker-neqv). This bean should be worked on after the boss feature is finalized to avoid churn. - Version groups must exist for boss battle API calls to work — check if
app.seedsalready seeds them.