test(react): add tests and mocks for invitation components#155
Open
rax7389 wants to merge 4 commits intofeat/mm-invitations-componentsfrom
Open
test(react): add tests and mocks for invitation components#155rax7389 wants to merge 4 commits intofeat/mm-invitations-componentsfrom
rax7389 wants to merge 4 commits intofeat/mm-invitations-componentsfrom
Conversation
…ions-hook-container
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.
Changes
Adds comprehensive test coverage and mock utilities for all invitation management components:
organization-invitation-details-modal.test.tsx): 384 lines covering rendering of all invitation fields, status display, action buttons (revoke/resend), copy URL, and edge casesorganization-invitation-revoke-modal.test.tsx): 246 lines covering both revoke and revoke-and-resend confirmation flows, loading states, and cancel behaviororganization-invitation-table-actions-column.test.tsx): 321 lines covering dropdown menu actions, status-based action visibility (copy URL for pending only), and readOnly modeorganization-invitation-create-modal.test.tsx): 218 lines covering email validation (Zod), chip-based multi-email input, role selection, provider selection, and form submissionsearch-filter.test.tsx): 107 lines covering role filter dropdown, reset button, and empty roles edge caseinvitation.mocks.ts): Reusable mock factories for all invitation component props and test dataThis is PR 5 of 5 (final) for the member management invitations feature.
Dependency chain:
main← PR 1 + PR 2 ← PR 3 + PR 4 ← this PRReferences
Part of the member management invitations feature split for incremental review.
Testing
All 1075 tests pass (64 test files). Run with
npm run testfrompackages/react.Checklist