diff --git a/src/components/ComponentConfiguration.stories.tsx b/src/components/ComponentConfiguration.stories.tsx index b07bfac5..a3890213 100644 --- a/src/components/ComponentConfiguration.stories.tsx +++ b/src/components/ComponentConfiguration.stories.tsx @@ -837,6 +837,11 @@ export const FileUpload: Story = { }); await expect(canvas.queryByText('.pdf')).toBeVisible(); await userEvent.click(canvas.getByText('.jpg')); + // wait for dropdown to close and selected option to be visible; + await waitFor(async () => { + await expect(canvas.queryByText('.pdf')).toBeNull(); + }); + await expect(canvas.queryByText('.jpg')).toBeVisible(); }); await step('Submit configuration', async () => {