test(e2e): cover OAuth callback token handoff#375
Closed
yunus-dev-codecrafter wants to merge 1 commit into
Closed
Conversation
Contributor
|
hey @yunus-dev-codecrafter, thanks for jumping in! closing this pr because the author needs to be assigned to the linked issue (#298) before opening a pr. please comment on the issue requesting assignment, wait to be assigned, then re-raise your pr. this keeps work fairly distributed across contributors. hope to see a revised pr from you soon! |
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 #298
test(e2e): cover OAuth callback token handoff
Summary
Adds
e2e/auth-callback.spec.ts— a dedicated end-to-end test suite for the OAuth callback page (/auth/callback?token=). The callback is the only entry point for JWTs into the app; a regression here silently breaks every login flow.Changes
e2e/auth-callback.spec.ts.env.env.example(required byvalidateEnv())Test coverage
/dashboard/discoverwith dashboard content visible?token=param/signin/me→ 401)localStoragecleared, redirects to/signin/auth/callback?token=…&state=abc&code=xyzstill reaches dashboardtoken=param and token string is absent from DOMAll 5 tests pass on Chromium. Existing
auth.spec.tsandrouting.spec.tsalso remain green.Security notes
page.url()contains notoken=query parameter after redirect.patchwork_jwtis removed when/mereturns 401.Setup note
The app's
validateEnv()throws ifVITE_API_BASE_URLis unset. A.envfile (sourced from.env.example) was created so the dev server and e2e tests can run.