test: add auth, application, and theme preference hooks tests#153
Closed
jakebromberg wants to merge 2 commits intomainfrom
Closed
test: add auth, application, and theme preference hooks tests#153jakebromberg wants to merge 2 commits intomainfrom
jakebromberg wants to merge 2 commits intomainfrom
Conversation
Deploying wxyc-dj with
|
| Latest commit: |
5d7fe6c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0df38c35.dj-site.pages.dev |
| Branch Preview URL: | https://test-08-auth-theme-hooks.dj-site.pages.dev |
199090e to
7a446d2
Compare
- Add comprehensive tests for authentication hooks - Add tests for application state hooks - Add tests for theme preference synchronization
- Add inline createHookWrapper (not yet available from test-utils on main) - Add organization-utils mock to prevent real org lookups - Use waitFor for async role fetch in useAuthentication/useRegistry tests
7a446d2 to
5d7fe6c
Compare
11 tasks
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 #253
Summary
Add ~107 tests covering the React hooks that bridge auth, application state, and theme preferences to components:
useLogin,useLogout,useAuthentication(async org-role fetch),useRegistry,useNewUser,useResetPassword(handleRequestReset,handleReset)useWindowSize,usePublicRoutes,useShiftKey,useAlbumImages,resetApplicationThese hooks contain the async org-role resolution logic (see memory notes on
useAuthentication), so tests usewaitForfor the async state update.Test plan
npm test src/hooks/authenticationHooks.test.ts src/hooks/themePreferenceHooks.test.tsPart 8 of 26