fix(editor): deletion undo and Back, Plus focus to the panel

This commit is contained in:
bchanot committed 2026-11-14 14:24:06 +01:00
1 parent 270444e2ec
commit 085c56877c
14 files changed
+252 -18

No files matched your search

@@ -225,6 +225,31 @@ test.describe('finding dialog', () => {
await expect(parent).toHaveAttribute('aria-selected', 'true')
})
test('after a deletion the first Back moves and one « Défaire » restores the row', async ({
page,
}) => {
test.setTimeout(150_000)
await open(page)
await openFinding(page, dict, 'Constat A')
await inDialog(page, dict['editor.action.delete']).click()
await page
.locator('dialog[open]')
.last()
.getByRole('button', { name: dict['editor.delete.confirm'] })
.click()
await expectNoDialog(page)
await layerWritten(page, 'none')
await undo(page).click()
const row = page.getByRole('treeitem', { name: /Constat A/ })
await expect(row).toBeVisible()
await expect(row).toHaveAttribute('aria-selected', 'true')
await expect(row).toBeFocused()
await page.goBack()
await expect(page.getByRole('tab', { selected: true })).toHaveText(
new RegExp(`^${dict['editor.tab.annotations']}`),
)
})
test('a creation is a layer: « Créer » shows the new element, a Back goes to the tree', async ({
page,
}) => {