test(editor): journey waits for the cleaning dialog to close, no refill

This commit is contained in:
bchanot committed 2026-11-04 17:42:21 +01:00
1 parent d10ba5d5dd
commit 653706fad5
1 file changed
+10 -12
+10 -12
View File
@@ -88,18 +88,16 @@ async function importDrawing(page: Page) {
}) })
await clickButton(page, dict['editor.cleaning.confirm']) await clickButton(page, dict['editor.cleaning.confirm'])
await expect(page.getByText(dict['editor.upload.done'])).toBeVisible() 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 closing modal keeps the page inert until its exit animation ends: text typed
// the values hold. // before that is dropped (the first fields of the new-view form stayed empty).
await expect(async () => { await expect(
await page.locator('#view-new-fr').fill('Détail essai') page.getByRole('dialog', { name: dict['editor.cleaning.title'] }),
await page.locator('#view-new-en').fill('Trial detail') ).toHaveCount(0)
const crop = { min_x: '20', min_y: '20', width: '60', height: '45' } await page.locator('#view-new-fr').fill('Détail essai')
for (const [key, value] of Object.entries(crop)) await page.locator('#view-new-en').fill('Trial detail')
await page.locator(`#view-new-crop-${key}`).fill(value) const crop = { min_x: '20', min_y: '20', width: '60', height: '45' }
await page.waitForTimeout(400) for (const [key, value] of Object.entries(crop))
await expect(page.locator('#view-new-fr')).toHaveValue('Détail essai') await page.locator(`#view-new-crop-${key}`).fill(value)
await expect(page.locator('#view-new-crop-min_x')).toHaveValue('20')
}).toPass()
await clickButton(page, dict['editor.views.add']) await clickButton(page, dict['editor.views.add'])
await expect( await expect(
page.getByRole('listitem', { name: 'Détail essai' }), page.getByRole('listitem', { name: 'Détail essai' }),