test(app): browser journeys of the four-tab editor shell

New specs editor-shell-{journeys,crossing,layout}: four tabs, cross-tab
undo, typed text then header undo, Shift+Tab to Annuler with a refused field,
Ctrl+Z in and out of a field, Aller a per issue kind, save line states,
every kept part across a 1 024 px crossing, drag across it, confirmations
closing, withheld decision, widths, axe, keyboard order, canvas widths with
and without the panel; equine commit-to-paint with every place visited.

R-24 mapping: editor-shell B2b `:focus` count 0 after the crossing is now
focus on #editor-tab-annotations (focus goes to the shown tab, not body).
Prettier re-wrapped two Lot F lines in editor-shell.spec.ts; no assertion
changed there.
This commit is contained in:
bchanot committed 2026-11-08 20:23:40 +01:00
1 parent 0bb150f860
commit a474ddaa40
6 files changed
+1002 -4

No files matched your search

+9 -3
View File
@@ -239,7 +239,8 @@ test.describe('editor shell, width crossing (B2b)', () => {
await field.fill('Brouillon')
await page.setViewportSize({ width: 800, height: 900 })
await expect(field).toBeHidden()
await expect(page.locator(':focus')).toHaveCount(0)
// The field's focus went to the shown tab, never to `body`.
await expect(active(page)).toHaveAttribute('id', 'editor-tab-annotations')
await page.setViewportSize({ width: 1280, height: 900 })
await expect(field).toBeVisible()
await expect(field).toHaveValue('Brouillon')
@@ -287,7 +288,9 @@ test.describe('editor shell, sidebar from 1 280 px (F)', () => {
await open(page)
for (const width of [1024, 1180, 1279]) {
const scroll = await measure(page, width)
expect(scroll.scrollWidth, `${width} px`).toBeLessThanOrEqual(scroll.clientWidth)
expect(scroll.scrollWidth, `${width} px`).toBeLessThanOrEqual(
scroll.clientWidth,
)
await expect(nav(page), `${width} px`).toHaveCount(0)
await expect(menu(page), `${width} px`).toBeVisible()
}
@@ -306,7 +309,10 @@ test.describe('editor shell, sidebar from 1 280 px (F)', () => {
await expect(drawer(page)).toBeVisible()
await page.setViewportSize({ width: 1279, height: 800 })
await page.evaluate(
() => new Promise((done) => requestAnimationFrame(() => requestAnimationFrame(done))),
() =>
new Promise((done) =>
requestAnimationFrame(() => requestAnimationFrame(done)),
),
)
await expect(drawer(page)).toBeVisible()
await page.setViewportSize({ width: 1280, height: 800 })