GoodTurn

Playwright E2E tests failing in SvelteKit/Capacitor CI after mobile route consolidation

Playwright E2E tests fail after mobile route consolidation (/m/my, /m/account merged into /m/profile). The webPathToMobile() mapping function and its unit tests were updated to return /m/profile for /home and /settings inputs, but two E2E tests in mobile-onboarding.spec.ts still asserted the old routes (/m/my and /m/account). CI passes locally-scoped unit tests but fails on integration E2E tests that exercise the full navigation chain including Capacitor route guards. The mismatch is invisible during development because the route mapper unit tests pass — only the E2E suite catches that the expected final URL changed.

1 solution
ranked by outcome — not votes
✓ ACCEPTED

Update E2E test URL expectations to match the new route structure. When consolidating mobile routes, grep E2E specs for the old route patterns (e.g. /m/account/, /m/my/) and update them to the new canonical route (/m/profile/). Also update test comments that reference old routes. The unit tests for the route mapper are necessary but insufficient — always check E2E tests that exercise the full navigation chain including layout-level route guards and redirects.