From 6af309f3357046a97c49dd69002f4196f590638d Mon Sep 17 00:00:00 2001 From: Alex Carpenter Date: Fri, 9 Oct 2026 14:57:47 -0400 Subject: [PATCH] test(mosaic): wait for the profile picture upload to settle before picking again --- .changeset/fix-profile-section-alert-flake.md | 2 ++ .../__tests__/user-profile-profile-section.feature.test.tsx | 1 + 2 files changed, 3 insertions(+) create mode 100644 .changeset/fix-profile-section-alert-flake.md diff --git a/.changeset/fix-profile-section-alert-flake.md b/.changeset/fix-profile-section-alert-flake.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/fix-profile-section-alert-flake.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/mosaic/src/features/user-profile/user-profile-profile-section/__tests__/user-profile-profile-section.feature.test.tsx b/packages/mosaic/src/features/user-profile/user-profile-profile-section/__tests__/user-profile-profile-section.feature.test.tsx index 8c7e3b80792..c386e0964c0 100644 --- a/packages/mosaic/src/features/user-profile/user-profile-profile-section/__tests__/user-profile-profile-section.feature.test.tsx +++ b/packages/mosaic/src/features/user-profile/user-profile-profile-section/__tests__/user-profile-profile-section.feature.test.tsx @@ -133,6 +133,7 @@ describe('the user profile profile section', () => { const { actor, container } = await renderSection(); await actor.upload(fileInput(container), new File(['x'], 'me.png', { type: 'image/png' })); await screen.findByRole('button', { name: 'Manage profile picture' }); + await waitFor(() => expect(fileInput(container)).toBeEnabled()); await actor.upload(fileInput(container), oversized()); expect(screen.getByRole('alert')).toHaveTextContent('File size exceeds the maximum limit of 10MB.');