Skip to content

Commit 3bfbbca

Browse files
test(mosaic): await completed SMS preparations before ending tests
1 parent d9e349b commit 3bfbbca

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎packages/mosaic/src/features/user-profile/__tests__/user-profile-mfa.feature.test.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ describe('User profile MFA', () => {
196196
await user.click(screen.getByRole('button', { name: 'Add verification method' }));
197197
await user.click(screen.getByRole('button', { name: /SMS verification/ }));
198198
await user.click(screen.getByRole('button', { name: 'Continue' }));
199+
expect(await screen.findByRole('textbox', { name: 'Verification code' })).toBeVisible();
199200
expect(fapi.mfa.phonePreparations).toEqual(['phone_1']);
200201
expect(fapi.mfa.phoneUpdates).toEqual([]);
201202
await user.type(await screen.findByRole('textbox', { name: 'Verification code' }), '123456');
@@ -361,6 +362,7 @@ describe('User profile MFA', () => {
361362
await user.type(number, '5555550404');
362363
await user.click(screen.getByRole('button', { name: 'Send code' }));
363364
await waitFor(() => expect(fapi.mfa.phoneCreations).toHaveLength(2));
365+
expect(await screen.findByRole('textbox', { name: 'Verification code' })).toBeVisible();
364366
expect(fapi.mfa.phoneCreations).toEqual(['+15555550303', '+15555550404']);
365367
});
366368

0 commit comments

Comments
 (0)