fix(editor): veil ignores clicks, names merged apart, honest tests

U2 Task 6 fix round 1 (review minors 1 to 9).

- R-6: `Dialog` takes `veilCloses`; the annotation dialog passes false,
  so its veil ignores clicks centred too. Other dialogs unchanged.
- Save merges each name on its own (an EN refreshed meanwhile survives
  an FR-only edit); the merged annotation is typed per kind, no cast.
- Tests: the category change and the region row really run (a second
  category and a region in the fixture); EN kept under an FR edit;
  focus to the drawing when a filter hides the row; a centred veil
  ignores a click; act() around the store write; ui.Dialog restores
  innerHeight and visualViewport after each test.
- e2e: `pickAnnotation` no longer scrolls; `scrollToTop` is explicit
  where a low row leaves the drawing out of view (editor-zones x3,
  editor-geometry). editor-geometry runs the accepted repair from the
  page's end, buttons pressed in place, scroll unchanged. The touch
  and double-click tests wait on the clicks themselves; the stray
  click on the veil can fail.
- CreationPanel's `required.fields` recorded as a shortcut for Task 7;
  TODO lines updated. focusTarget comment wrapped.
This commit is contained in:
bchanot committed 2026-11-17 22:47:02 +01:00
1 parent db3f306523
commit 9a0fe3784c
12 files changed
+234 -58

No files matched your search

+7
View File
@@ -13,6 +13,7 @@ import {
selectionTag,
shownPoints,
toolButton,
scrollToTop,
} from '../support/editor'
import { expectNoShift } from '../support/layout'
@@ -133,6 +134,8 @@ test.describe('editor zones on the drawing (U2 Task 5)', () => {
const actor = await openThoracic(page)
requests.forbid(actor.account.email, actor.account.password)
await pickAnnotation(page, dict, THORACIC)
// The row sits low in the equine list: the click left the drawing out of view.
await scrollToTop(page)
await expect(selectionTag(page)).toContainText('Vertèbres thoraciques')
await expect(handle(page, 'Sommet 9')).toBeAttached()
// R-18: at fit zoom some segments are too short for their « + ».
@@ -225,6 +228,8 @@ test.describe('editor zones on the drawing (U2 Task 5)', () => {
const actor = await openThoracic(page)
requests.forbid(actor.account.email, actor.account.password)
await pickAnnotation(page, dict, THORACIC)
// The row sits low in the equine list: the click left the drawing out of view.
await scrollToTop(page)
const stored = await shownPoints(page)
// Accepted: four clicks, « Fermer le tracé », one commit, every property kept.
@@ -284,6 +289,8 @@ test.describe('editor zones on the drawing (U2 Task 5)', () => {
// Thoraciques selected: zoomed at C7-T1 so that its vertex handles leave room, a click
// inside both shapes still selects the point (the selection's interior comes after).
await pickAnnotation(page, dict, THORACIC)
// The row sits low in the equine list: the click left the drawing out of view.
await scrollToTop(page)
const at = await clientOf(page, 870, 515)
await page.mouse.move(at.x, at.y)
await page.keyboard.down('Control')