diff --git a/src/test/Components/Blueprints/Blueprints.test.tsx b/src/test/Components/Blueprints/Blueprints.test.tsx index fd966fdd..1caa2e1a 100644 --- a/src/test/Components/Blueprints/Blueprints.test.tsx +++ b/src/test/Components/Blueprints/Blueprints.test.tsx @@ -65,7 +65,7 @@ describe('Blueprints', () => { }) ); - const { router } = await renderCustomRoutesWithReduxRouter(); + const view = renderCustomRoutesWithReduxRouter(); await screen.findByText('No blueprints yet'); const emptyStateAction = screen.getByRole('link', { name: /Add blueprint/i, @@ -73,6 +73,8 @@ describe('Blueprints', () => { expect(emptyStateAction).toBeInTheDocument(); user.click(emptyStateAction); + + const { router } = await view; await waitFor(() => expect(router.state.location.pathname).toBe( '/insights/image-builder/imagewizard' diff --git a/src/test/Components/CreateImageWizard/steps/Registration/Registration.test.tsx b/src/test/Components/CreateImageWizard/steps/Registration/Registration.test.tsx index de50c6d6..d818532a 100644 --- a/src/test/Components/CreateImageWizard/steps/Registration/Registration.test.tsx +++ b/src/test/Components/CreateImageWizard/steps/Registration/Registration.test.tsx @@ -104,7 +104,7 @@ const addSatelliteRegistrationCommandViaKeyDown = async (command: string) => { await waitFor(() => user.clear(satelliteRegistrationCommand)); await waitFor(() => user.type(satelliteRegistrationCommand, command)); - satelliteRegistrationCommand.blur(); + await waitFor(() => satelliteRegistrationCommand.blur()); }; const uploadFile = async (scriptName: string): Promise => { diff --git a/src/test/Components/ImagesTable/ImagesTable.test.tsx b/src/test/Components/ImagesTable/ImagesTable.test.tsx index 4b15a30e..7ef07ac5 100644 --- a/src/test/Components/ImagesTable/ImagesTable.test.tsx +++ b/src/test/Components/ImagesTable/ImagesTable.test.tsx @@ -15,7 +15,7 @@ describe('Images Table', () => { const user = userEvent.setup(); test('render ImagesTable', async () => { - await renderCustomRoutesWithReduxRouter(); + renderCustomRoutesWithReduxRouter(); const table = await screen.findByTestId('images-table');