Skip to content

Commit 7dcd017

Browse files
committed
Fix test assertions
1 parent 2b0050c commit 7dcd017

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/clerk-js/src/ui/components/OrganizationProfile/__tests__/InviteMembersPage.test.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,10 +357,11 @@ describe('InviteMembersPage', () => {
357357
{ wrapper },
358358
);
359359

360-
expect(getByRole('button', { name: 'Send invitations' })).toBeDisabled();
361360
await userEvent.type(getByTestId('tag-input'), '[email protected],');
362-
expect(getByRole('button', { name: 'Send invitations' })).not.toBeDisabled();
363-
await userEvent.click(getByRole('button', { name: /mydefaultrole/i }));
361+
await waitFor(() => expect(getByRole('button', { name: /select role/i })).toBeInTheDocument());
362+
await userEvent.click(getByRole('button', { name: /select role/i }));
363+
await userEvent.click(getByRole('button', { name: /admin/i }));
364+
await waitFor(() => expect(getByRole('button', { name: 'Send invitations' })).not.toBeDisabled());
364365
});
365366
});
366367

0 commit comments

Comments
 (0)