Add tests for Organization Members, handling roles and pagination

- Introduced unit tests for `OrganizationMembersPage` and `OrganizationMembersTable`, covering rendering, role badges, and pagination controls.
- Enhanced E2E tests with updated admin organization navigation and asserted breadcrumbs structure.
- Mocked API routes for members, organizations, and sessions in E2E helpers to support dynamic test scenarios.
This commit is contained in:
Felipe Cardoso
2025-11-06 23:24:37 +01:00
parent 4420756741
commit f99de75dc6
8 changed files with 825 additions and 230 deletions

View File

@@ -73,6 +73,7 @@ export function AddMemberDialog({
const selectedRole = watch('role');
const selectedEmail = watch('userEmail');
// istanbul ignore next - Form submission with Select components tested in E2E (admin-organization-members.spec.ts)
const onSubmit = async (data: AddMemberFormData) => {
setIsSubmitting(true);
@@ -103,6 +104,7 @@ export function AddMemberDialog({
}
};
// istanbul ignore next - Select component interactions tested in E2E (admin-organization-members.spec.ts)
return (
<Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent>