Skip to content

fix(e2e): make Playwright CI green — /app route-meta + test path updates#22

Merged
mastermanas805 merged 1 commit into
mainfrom
fix/route-meta-app-prefix
May 11, 2026
Merged

fix(e2e): make Playwright CI green — /app route-meta + test path updates#22
mastermanas805 merged 1 commit into
mainfrom
fix/route-meta-app-prefix

Conversation

@mastermanas805
Copy link
Copy Markdown
Member

Closes the long-standing CI failure (every PR since #11 has been red). Root cause: routeIdToKey() in AppShell.tsx didn't strip the /app prefix from pathname, so PAGE_META lookups missed and the page h1 rendered empty. Plus e2e tests assumed the dashboard lived at / but it's been at /app since PR #14. 10/10 Playwright tests pass locally after this fix.

Two related fixes that turn the failing CI green for the first time
since /app/* routing was introduced in PR #14:

1. src/layout/AppShell.tsx — routeIdToKey() now strips the /app
   prefix before looking up PAGE_META. Before this change, every
   authenticated page rendered an empty <h1> (the meta.title lookup
   missed because the keys are short, e.g. '/resources', but the
   actual pathname after PR #14 is '/app/resources'). The empty h1
   was visible in the trace from
   github.com/InstaNode-dev/instanode-web/actions/runs/25675342041
   — heading[level=1] had no text content even though the rest of
   the page rendered correctly.

2. e2e/auth.spec.ts + e2e/navigation.spec.ts — updated the tests
   to navigate to /app instead of / for authenticated routes. The
   old tests assumed the dashboard lived at /, but that's the
   public marketing page now. Updated 4 test cases:

   - "unauthenticated user redirected to /login": go to /app
   - "login accepts valid token, lands on overview": expect
     /app on success
   - "signed-in user lands on overview directly": go to /app,
     expect Overview h1
   - "every nav link reaches its page": all targets get the
     /app prefix, plus go to /app instead of / first
   - "OAuth buttons": dropped Google assertion (UI exposes
     GitHub + magic-link only today; Google OAuth route exists
     on the backend but no UI button has been added yet)

Result locally: 10/10 Playwright tests pass. The CI failure that
started on PR #11 (slice B, the first PR after /app/* routing
landed) is gone.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mastermanas805 mastermanas805 merged commit abdf8fb into main May 11, 2026
1 of 2 checks passed
@mastermanas805 mastermanas805 deleted the fix/route-meta-app-prefix branch May 11, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant