diff --git a/.changeset/fresh-phones-wait.md b/.changeset/fresh-phones-wait.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/fresh-phones-wait.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/mosaic/src/features/user-profile/user-profile-phone-section/__tests__/user-profile-phone-section.feature.test.tsx b/packages/mosaic/src/features/user-profile/user-profile-phone-section/__tests__/user-profile-phone-section.feature.test.tsx index b796c5bf17d..5bc04540616 100644 --- a/packages/mosaic/src/features/user-profile/user-profile-phone-section/__tests__/user-profile-phone-section.feature.test.tsx +++ b/packages/mosaic/src/features/user-profile/user-profile-phone-section/__tests__/user-profile-phone-section.feature.test.tsx @@ -149,6 +149,7 @@ describe('the user profile phone section', () => { expect(within(row()).getByText(WORK_LABEL).parentElement).toHaveTextContent('Unverified'); await manage(actor, WORK_LABEL, 'Verify phone number'); + await waitFor(() => expect(screen.getByRole('button', { name: 'Close' })).toHaveFocus()); await enterCode(actor, VERIFICATION_CODE); await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument()); @@ -171,6 +172,7 @@ describe('the user profile phone section', () => { prepare.release(); } + await waitFor(() => expect(screen.getByRole('button', { name: 'Close' })).toHaveFocus()); await enterCode(actor, VERIFICATION_CODE); expect(screen.queryByRole('menu')).toBeNull(); await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument());