diff --git a/test/e2e/image-upload.e2e.ts b/test/e2e/image-upload.e2e.ts index 53b5025ad..c9830354f 100644 --- a/test/e2e/image-upload.e2e.ts +++ b/test/e2e/image-upload.e2e.ts @@ -119,9 +119,12 @@ test.describe('Image upload', () => { await page.click('role=button[name="Upload image"]') + const progressModal = page.getByRole('dialog', { name: 'Image upload progress' }) + await expect(progressModal).toBeVisible() + // wait to be in the middle of upload const uploadStep = page - .locator('div[data-status]') + .getByTestId('upload-step') .filter({ hasText: 'Upload image file' }) .first() await expect(uploadStep).toHaveAttribute('data-status', 'running') @@ -129,8 +132,6 @@ test.describe('Image upload', () => { // form is disabled and semi-hidden // await expectNotVisible(page, ['role=textbox[name="Name"]']) - const progressModal = page.getByRole('dialog', { name: 'Image upload progress' }) - page.on('dialog', (dialog) => dialog.accept()) // click yes on the are you sure prompt await progressModal.getByRole('button', { name: 'Cancel' }).click()