test(editor): journey waits for the cleaning dialog to close, no refill
This commit is contained in:
1 parent
d10ba5d5dd
commit
653706fad5
1 file changed
+10
-12
@@ -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' }),
|
||||
|
||||
Reference in new issue
Block a user