From 56bf156b834060fed8b4bfeaa5d5dd90cbe3ca41 Mon Sep 17 00:00:00 2001 From: Jose Buitron Date: Thu, 11 Apr 2024 17:27:35 -0500 Subject: [PATCH] test: Fixed test --- src/storyMap/components/StoryMapForm.test.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/storyMap/components/StoryMapForm.test.js b/src/storyMap/components/StoryMapForm.test.js index 97b9963cf7..e8b0945f67 100644 --- a/src/storyMap/components/StoryMapForm.test.js +++ b/src/storyMap/components/StoryMapForm.test.js @@ -717,7 +717,11 @@ test('StoryMapForm: Change chapter style', async () => { fireEvent.click(screen.getByRole('button', { name: 'Confirm' })) ); - await screen.findByRole('button', { name: 'Set Location' }); + await waitFor(() => { + expect( + screen.getByRole('button', { name: 'Set Location' }) + ).toBeInTheDocument(); + }); await act(async () => fireEvent.click(screen.getByRole('button', { name: 'Set Location' }))