diff --git a/src/test/Components/CreateImageWizard/CreateImageWizard.azure.test.js b/src/test/Components/CreateImageWizard/CreateImageWizard.azure.test.js index e53d775f..6fedea2b 100644 --- a/src/test/Components/CreateImageWizard/CreateImageWizard.azure.test.js +++ b/src/test/Components/CreateImageWizard/CreateImageWizard.azure.test.js @@ -183,8 +183,8 @@ describe('Step Upload to Azure', () => { }) ); // wait for fetching the upload info - expect(await screen.findByTestId('azure-tenant-id-source')).not.toHaveValue( - '' + await waitFor(() => + expect(screen.getByTestId('azure-tenant-id-source')).not.toHaveValue('') ); await user.click( @@ -212,8 +212,8 @@ describe('Step Upload to Azure', () => { name: /azureSource1/i, }) ); - expect(await screen.findByTestId('azure-tenant-id-source')).not.toHaveValue( - '' + await waitFor(() => + expect(screen.getByTestId('azure-tenant-id-source')).not.toHaveValue('') ); await user.click(sourceDropdown); diff --git a/src/test/Components/CreateImageWizard/CreateImageWizard.content.test.js b/src/test/Components/CreateImageWizard/CreateImageWizard.content.test.js index f10a3352..3039e2e9 100644 --- a/src/test/Components/CreateImageWizard/CreateImageWizard.content.test.js +++ b/src/test/Components/CreateImageWizard/CreateImageWizard.content.test.js @@ -866,13 +866,13 @@ describe('Step Custom repositories', () => { expect(firstRepoCheckbox.checked).toEqual(false); await user.click(firstRepoCheckbox); - expect(firstRepoCheckbox.checked).toEqual(true); + await waitFor(() => expect(firstRepoCheckbox.checked).toEqual(true)); await clickNext(); - clickBack(); + await clickBack(); firstRepoCheckbox = await getFirstRepoCheckbox(); - expect(firstRepoCheckbox.checked).toEqual(true); + await waitFor(() => expect(firstRepoCheckbox.checked).toEqual(true)); }); test('correct number of repositories is fetched', async () => { @@ -1079,7 +1079,7 @@ describe('On Recreate', () => { const availableRepoCheckbox = await screen.findByRole('checkbox', { name: /select row 0/i, }); - expect(availableRepoCheckbox).toBeEnabled(); + await waitFor(() => expect(availableRepoCheckbox).toBeEnabled()); }); test('with repositories that are no longer available', async () => {