Skip to content

Commit

Permalink
Fix flaky test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joerger committed Dec 10, 2024
1 parent bdd69ca commit de5b57f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions web/packages/teleport/src/Account/Account.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,9 @@ test('adding an MFA device', async () => {

await renderComponent(ctx);
await user.click(screen.getByRole('button', { name: 'Add MFA' }));
await user.click(screen.getByRole('button', { name: 'Verify my identity' }));
await waitFor(async () => {
user.click(screen.getByRole('button', { name: 'Verify my identity' }));
});
await user.click(
screen.getByRole('button', { name: 'Create an MFA method' })
);
Expand Down Expand Up @@ -318,7 +320,9 @@ test('adding a passkey', async () => {

await renderComponent(ctx);
await user.click(screen.getByRole('button', { name: 'Add a Passkey' }));
await user.click(screen.getByRole('button', { name: 'Verify my identity' }));
await waitFor(async () => {
user.click(screen.getByRole('button', { name: 'Verify my identity' }));
});
await user.click(screen.getByRole('button', { name: 'Create a passkey' }));
await user.type(screen.getByLabelText('Passkey Nickname'), 'new-passkey');

Expand Down

0 comments on commit de5b57f

Please sign in to comment.