fix(editor): no silent move loss, no empty commit, focus kept
- « Toutes les annotations » in the properties panel asks the drawing
guard before it drops a started move (R-12); tests also cover a tool
and « Ajouter un point ».
- A keyboard series back on its place, or a slider pinned at its stop,
commits nothing.
- Escape that deselects from the handle or the slider moves the focus to
the row (or the drawing) instead of losing it.
- A link circle keeps its handle, named « Accès {nom} », with no slider
and no move mode (no label for it in REVUE).
- The move-mode drop notice waits until the body is shown (R-14).
- No layout shift: the strip's lead has a fixed width, the commands and
the message pill get a new box per set or message.
- Doc: hit shapes use pointer-events auto; the fine « − » bubble is
board 05's size.
- Tests: R-14 flip, A5 through the Point tool click, the repair e2e
wrapped in expectNoShift.
This commit is contained in:
1 parent
91e94952f0
commit
44de465c6d
10 files changed
+240
-35
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import { fr } from '@/i18n/fr'
|
||||
import type { Page, TestInfo } from '@playwright/test'
|
||||
import { expect, expectAccessible, test } from '../support/browser'
|
||||
import { expectNoShift } from '../support/layout'
|
||||
import { dropLateReplays, routeToSandbox } from '../support/sandbox'
|
||||
import {
|
||||
place,
|
||||
@@ -198,9 +199,18 @@ test.describe('editor geometry (adversarial)', () => {
|
||||
})
|
||||
|
||||
// A partial move (still out of the frame): refused by the core, the point restored.
|
||||
await move.click()
|
||||
// Nothing around the drawing moves (A14); the side panel's content may (Task 6).
|
||||
const swaps = ['aside-content'] as const
|
||||
await expectNoShift(page, () => move.click(), swaps)
|
||||
await dragInMode(page, { x: 250, y: 250 }, { x: 260, y: 260 })
|
||||
await confirm.click()
|
||||
await expectNoShift(
|
||||
page,
|
||||
async () => {
|
||||
await confirm.click()
|
||||
await expect(page.getByTestId('gesture-message')).toBeVisible()
|
||||
},
|
||||
swaps,
|
||||
)
|
||||
await expect(page.getByTestId('gesture-message')).toContainText(
|
||||
dict['editor.annotations.message.move_refused'].split(' :')[0],
|
||||
)
|
||||
@@ -209,10 +219,16 @@ test.describe('editor geometry (adversarial)', () => {
|
||||
await expect(issues).toBeVisible()
|
||||
|
||||
// Far enough inside: kept, the issue gone, one error less.
|
||||
await move.click()
|
||||
await expectNoShift(page, () => move.click(), swaps)
|
||||
await dragInMode(page, { x: 250, y: 250 }, { x: 290, y: 290 })
|
||||
await confirm.click()
|
||||
await expect(issues).toHaveCount(0)
|
||||
await expectNoShift(
|
||||
page,
|
||||
async () => {
|
||||
await confirm.click()
|
||||
await expect(issues).toHaveCount(0)
|
||||
},
|
||||
swaps,
|
||||
)
|
||||
expect(Math.abs(Number(await cx.inputValue()) - 150)).toBeLessThan(2)
|
||||
const after = (await verification.innerText()).replace(/\D/g, '')
|
||||
expect(Number(after || 0)).toBeLessThan(errorsBefore)
|
||||
|
||||
Reference in new issue
Block a user