8000 test(react): add tests and mocks for invitation components by rax7389 · Pull Request #155 · auth0/auth0-ui-components · GitHub
[go: up one dir, main page]

Skip to content

test(react): add tests and mocks for invitation components#155

Open
rax7389 wants to merge 4 commits intofeat/mm-invitations-componentsfrom
feat/mm-invitations-tests
Open

test(react): add tests and mocks for invitation components#155
rax7389 wants to merge 4 commits intofeat/mm-invitations-componentsfrom
feat/mm-invitations-tests

Conversation

@rax7389
Copy link
Contributor
@rax7389 rax7389 commented Mar 13, 2026

Changes

Adds comprehensive test coverage and mock utilities for all invitation management components:

  • InvitationDetailsModal tests (organization-invitation-details-modal.test.tsx): 384 lines covering rendering of all invitation fields, status display, action buttons (revoke/resend), copy URL, and edge cases
  • InvitationRevokeModal tests (organization-invitation-revoke-modal.test.tsx): 246 lines covering both revoke and revoke-and-resend confirmation flows, loading states, and cancel behavior
  • InvitationTableActionsColumn tests (organization-invitation-table-actions-column.test.tsx): 321 lines covering dropdown menu actions, status-based action visibility (copy URL for pending only), and readOnly mode
  • InvitationCreateModal tests (organization-invitation-create-modal.test.tsx): 218 lines covering email validation (Zod), chip-based multi-email input, role selection, provider selection, and form submission
  • SearchFilter tests (search-filter.test.tsx): 107 lines covering role filter dropdown, reset button, and empty roles edge case
  • Mock utilities (invitation.mocks.ts): Reusable mock factories for all invitation component props and test data
  • Minor test fixes: Updated existing SSO provider tests with minor import adjustments

This is PR 5 of 5 (final) for the member management invitations feature.

Dependency chain: main ← PR 1 + PR 2 ← PR 3 + PR 4 ← this PR

Note: This PR targets feat/mm-invitations-components. After PR 3 merges, rebase onto main and merge PR 4 into this branch.

References

Part of the member management invitations feature split for incremental review.

Testing

  • This change adds unit test coverage
  • This change has been tested on the latest version of the platform/language or why not

All 1075 tests pass (64 test files). Run with npm run test from packages/react.

Checklist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0