diff --git a/apps/app/e2e/shell/editor-journey.spec.ts b/apps/app/e2e/shell/editor-journey.spec.ts index 13dbf319..68b8db70 100644 --- a/apps/app/e2e/shell/editor-journey.spec.ts +++ b/apps/app/e2e/shell/editor-journey.spec.ts @@ -88,18 +88,16 @@ async function importDrawing(page: Page) { }) await clickButton(page, dict['editor.cleaning.confirm']) await expect(page.getByText(dict['editor.upload.done'])).toBeVisible() - // The new-view form can be reset once while the attached drawing settles: fill until - // the values hold. - await expect(async () => { - await page.locator('#view-new-fr').fill('Détail essai') - await page.locator('#view-new-en').fill('Trial detail') - const crop = { min_x: '20', min_y: '20', width: '60', height: '45' } - for (const [key, value] of Object.entries(crop)) - await page.locator(`#view-new-crop-${key}`).fill(value) - await page.waitForTimeout(400) - await expect(page.locator('#view-new-fr')).toHaveValue('Détail essai') - await expect(page.locator('#view-new-crop-min_x')).toHaveValue('20') - }).toPass() + // The closing modal keeps the page inert until its exit animation ends: text typed + // before that is dropped (the first fields of the new-view form stayed empty). + await expect( + page.getByRole('dialog', { name: dict['editor.cleaning.title'] }), + ).toHaveCount(0) + await page.locator('#view-new-fr').fill('Détail essai') + await page.locator('#view-new-en').fill('Trial detail') + const crop = { min_x: '20', min_y: '20', width: '60', height: '45' } + for (const [key, value] of Object.entries(crop)) + await page.locator(`#view-new-crop-${key}`).fill(value) await clickButton(page, dict['editor.views.add']) await expect( page.getByRole('listitem', { name: 'Détail essai' }),