fix(editor): slider while replacing, announced drop, review minors

Task 7 fix round 1 (review task-7-review.md).
- Important 1: « Taille » shows beside « Revenir aux propriétés » while
  a point is replaced (still hidden under the modal dialog); it feeds
  the hover preview and the re-placed point (R-10).
- Important 2: a creation whose view leaves the document is dropped
  and said, « Création abandonnée : la fiche a changé. » (dropped:
  'creation', read by useDroppedNotice).
- Minor 3: DrawingGuardDialog leaves a creation question to the
  creation dialog only while that dialog is really on screen
  (creationShown, set by the dialog).
- Minor 7: the dialog's long className strings split into constants.
- Minor 8: dead TOOL_OF removed; trace_start is a redraw's only.

Tests added (no assertion removed): slider while replacing (unit,
RED then GREEN; e2e under expectNoShift at three widths, last strip
command inside the strip); view removed during a creation (RED then
GREEN); question shown by the workspace when the dialog is not on
screen (RED then GREEN); « Abandonner » while read-only; R-13 with a
restored copy during a started move; leaving the route resets the
work (fails with the session reset removed). The unit Back test's
comment is corrected: it does pin the modal branch.
This commit is contained in:
bchanot committed 2026-11-18 00:06:16 +01:00
1 parent fe333c2bbd
commit 837ec9f436
14 files changed
+315 -29

No files matched your search

@@ -469,6 +469,46 @@ test.describe('editor annotations (A3)', () => {
await button(page, 'editor.annotations.back_to_properties').click()
await expect(creationDialog(page, 'zone')).toBeVisible()
})
// The zone abandoned (asked inside its dialog), then a point placed and replaced:
// « Taille » shows beside « Revenir aux propriétés » (board 02), nothing moves.
await creationDialog(page, 'zone')
.getByRole('button', {
name: dict['editor.annotations.creation.discard'],
})
.click()
await creationDialog(page, 'zone')
.getByRole('group', {
name: dict['editor.annotations.guard.creation'],
})
.getByRole('button', {
name: dict['editor.annotations.guard.discard'],
})
.click()
await expect(creationDialog(page, 'zone')).toHaveCount(0)
await tool(page, 'point').click()
await clickDrawing(page, 300, 500)
await expect(creationDialog(page, 'point')).toBeVisible()
await expect(strip.getByTestId('size-slider')).toHaveCount(0)
await expectNoShift(page, async () => {
await creationDialog(page, 'point')
.getByRole('button', {
name: dict['editor.annotations.creation.replace'],
})
.click()
await expect(creationDialog(page, 'point')).toHaveCount(0)
await expect(strip.getByTestId('size-slider')).toBeVisible()
})
const edge = (await strip.boundingBox())!
const end = (await strip
.getByRole('button', {
name: dict['editor.annotations.creation.discard'],
})
.boundingBox())!
expect(end.x + end.width).toBeLessThanOrEqual(edge.x + edge.width)
await expectNoShift(page, async () => {
await clickDrawing(page, 320, 520)
await expect(creationDialog(page, 'point')).toBeVisible()
})
})
}