test(tests): prove the line and redraw fixes without a shift

Final review M-3, M-4, M-5, M-6 in the sandbox suites:
- editor-annotations (A14 at 1024, 1180, 1280 px): « Défaire » on the
  line hit-tested 44 px tall below xl and 36 px from xl, its pill 36
  px; pressed under expectNoShift, the drawing then has the focus.
- editor-geometry: the same refused move twice under expectNoShift is
  a new alert pill.
- editor-zones: « Redessiner » takes the focus back after a close and
  a cancel; with the strip scrolled out and the focus on body, the
  close returns it with no scroll.

Tests: no assertion removed.
This commit is contained in:
bchanot committed 2026-11-18 13:21:32 +01:00
1 parent a6685a04e0
commit f2bf442ecd
3 files changed
+91 -17

No files matched your search

@@ -235,6 +235,25 @@ test.describe('editor geometry (adversarial)', () => {
await expect(shownShape(page)).toHaveAttribute('cx', '110')
await expect(verification).toContainText(String(errorsBefore))
// M-3: the same refusal again is a new pill, announced again; nothing moves (A14).
const pill = page.getByTestId('gesture-message')
await pill.evaluate((element) => element.setAttribute('data-first', ''))
await expectNoShift(page, () => move.click())
await dragInMode(page, { x: 250, y: 250 }, { x: 260, y: 260 })
await expectNoShift(page, async () => {
await confirm.click()
await expect(
page.locator('[data-testid="gesture-message"]:not([data-first])'),
).toBeVisible()
})
await expect(pill).toHaveCount(1)
await expect(page.getByRole('alert').filter({ has: pill })).toHaveCount(0)
await expect(pill).toHaveAttribute('role', 'alert')
await expect(pill).toContainText(
dict['editor.annotations.message.move_refused'].split(' :')[0],
)
await expect(shownShape(page)).toHaveAttribute('cx', '110')
// Far enough inside, from the page's end: kept, the issue gone, one error less. The
// issue leaving no longer shortens the page (it lives in the strip and the dialog, the
// side column keeps the overview, U2 Task 6), so the scroll clamp moves nothing. The