fix(editor): creation question lapses, guard sites and flip tested
The creation's « Abandonner la création ? » no longer outlives it: « Replacer le point », « Reprendre le tracé », « Créer » (« Utiliser cette position » included) and « Annuler le tracé » clear a question still open, which would otherwise reappear over the page. Locals trimmed in the creation dialog and the tracing actions (5 max). Tests added (no assertion removed): the two lapses (RED without the fix, GREEN with it); a view chip and a tool ask during a tracing; the mode flip keeps the dialog, its form and the ghost; a history jump out of the editor waits for the creation's question; e2e: « Reprendre le tracé » and « Revenir aux propriétés » under expectNoShift at 1 024, 1 180 and 1 280 px, the strip's last command inside it, axe on the resumed state.
This commit is contained in:
1 parent
4d2c64f57f
commit
fe333c2bbd
6 files changed
+219
-37
No files matched your search
@@ -443,6 +443,32 @@ test.describe('editor annotations (A3)', () => {
|
||||
await button(page, 'editor.annotations.trace_close').click()
|
||||
await expect(creationDialog(page, 'zone')).toBeVisible()
|
||||
})
|
||||
// « Reprendre le tracé » (board 04 C): the dialog hides, the strip offers its way
|
||||
// back; nothing moves, the commands fit, then « Revenir aux propriétés ».
|
||||
await expectNoShift(page, async () => {
|
||||
await creationDialog(page, 'zone')
|
||||
.getByRole('button', {
|
||||
name: dict['editor.annotations.creation.resume'],
|
||||
})
|
||||
.click()
|
||||
await expect(creationDialog(page, 'zone')).toHaveCount(0)
|
||||
})
|
||||
const strip = page.getByTestId('edit-strip')
|
||||
await expect(strip).toContainText(
|
||||
dict['editor.annotations.strip.resumed'],
|
||||
)
|
||||
const fence = (await strip.boundingBox())!
|
||||
const last = (await strip
|
||||
.getByRole('button', {
|
||||
name: dict['editor.annotations.creation.discard'],
|
||||
})
|
||||
.boundingBox())!
|
||||
expect(last.x + last.width).toBeLessThanOrEqual(fence.x + fence.width)
|
||||
await expectAccessible(page, `a resumed tracing at ${width} px`)
|
||||
await expectNoShift(page, async () => {
|
||||
await button(page, 'editor.annotations.back_to_properties').click()
|
||||
await expect(creationDialog(page, 'zone')).toBeVisible()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user