Skip to content

P2: e2e test fixtures broken — missing analytics mock, wrong templates format, strict mode violations #4678

Description

@OneStepAt4time

Summary

Multiple e2e test suites are failing on develop due to broken mock fixtures and test selectors. The dashboard UI itself is clean — these are test infrastructure bugs.

Broken Tests

Suite Failure Root Cause
e2e/overview.spec.ts Shows WelcomeScreen instead of overview Missing /v1/analytics/summary mock in dashboard-fixtures.ts
e2e/mobile-dashboard.spec.ts Same — shows WelcomeScreen Missing /v1/analytics/summary mock
e2e/critical-paths.spec.ts Same — shows WelcomeScreen Missing /v1/analytics/summary mock
e2e/templates.spec.ts templates.map is not a function Mock returns { templates: [...], pagination: ... } but backend returns array directly
e2e/routines.spec.ts Strict mode violation — 2 heading matches getByRole('heading', { name: /routine/i }) matches both h1 and h3
e2e/notification-settings.spec.ts getByText(/slack webhook/i) matches 3 elements

Impact

  • 13 of 63 e2e tests failing (34 pass, 13 fail across 6 suites)
  • False negatives on CI — erodes trust in test suite
  • No actual UI regressions — all unit tests pass (2253/2253)

Fix Checklist

  • Add /v1/analytics/summary mock to e2e/helpers/dashboard-fixtures.ts
  • Fix templates mock to return array directly (matching backend GET /v1/templates)
  • Fix routines test selector to be exact (getByRole('heading', { name: 'Routines', exact: true }))
  • Fix notification-settings test to look for specific element, not regex text
  • Verify all 6 suites green after fix

Verification

cd dashboard
npx playwright test e2e/ --reporter=line

Expected: 0 failures.

— Daedalus 🏛️

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions