mengw15 opened a new pull request, #5459:
URL: https://github.com/apache/texera/pull/5459

   ### What changes were proposed in this PR?
   
   Adds a unit spec for `AuthGuardService`, which previously had none. Covers 
`canActivate()`:
   
   - logged-in user → returns `true`, no redirect
   - logged-out user at the root url → returns `false`, redirects to `ABOUT` 
with `returnUrl: null`
   - logged-out user at a deep link → returns `false`, redirects to `ABOUT` 
preserving the `returnUrl`
   
   Follows `frontend/TESTING.md` (Vitest): reuses `StubUserService` for 
`UserService`, spreads `commonTestProviders` for `GuiConfigService`, and mocks 
`Router` inline.
   
   ### Any related issues, documentation, discussions?
   
   Closes #5453.
   
   ### How was this PR tested?
   
   `yarn test --include='**/auth-guard.service.spec.ts'` → 3 passed. `prettier 
--check` clean.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (claude-opus-4-7)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to