fix(e2e): make Playwright CI green — /app route-meta + test path updates#22
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.