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:
1 parent
fe333c2bbd
commit
837ec9f436
14 files changed
+315
-29
No files matched your search
@@ -397,6 +397,53 @@ describe('the move mode (A11, R-12, R-13)', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('fix round 1: a recovery during a started move (R-13)', () => {
|
||||
const two = () => withPoints(point('a', 50, 50, 5), point('b', 20, 20, 5))
|
||||
it('a restored copy replaces the document: the mode is dropped and said', async () => {
|
||||
await mount(two())
|
||||
await select()
|
||||
await userEvent.setup().click(moveButton())
|
||||
fireEvent.click(arrow('la droite'))
|
||||
expect(useAnnotationWork.getState().mode?.started).toBe(true)
|
||||
const { savedRevision, drawings } = store.getState()
|
||||
const copy = {
|
||||
v: 1 as const,
|
||||
user_id: USER,
|
||||
version_id: VERSION,
|
||||
sheet_id: 'sheet-1',
|
||||
sheet_name: 'Fiche',
|
||||
revision: savedRevision,
|
||||
written_at: '2026-11-03T10:00:00Z',
|
||||
document: JSON.parse(
|
||||
withPoints(point('a', 30, 30, 5), point('b', 20, 20, 5)),
|
||||
),
|
||||
drawings: drawings.map((d) => ({
|
||||
asset_id: d.asset_id,
|
||||
sha256: d.sha256,
|
||||
})),
|
||||
}
|
||||
act(() =>
|
||||
store.setState({
|
||||
recovery: 'pending',
|
||||
offer: {
|
||||
revision: savedRevision,
|
||||
writtenAt: copy.written_at,
|
||||
sheetName: 'Fiche',
|
||||
serverRevision: savedRevision,
|
||||
copy,
|
||||
},
|
||||
}),
|
||||
)
|
||||
await act(async () => {
|
||||
expect(await store.getState().restoreCopy()).toEqual({ ok: true })
|
||||
})
|
||||
expect(useAnnotationWork.getState().mode).toBeNull()
|
||||
expect(
|
||||
await screen.findByText('Déplacement abandonné : la fiche a changé.'),
|
||||
).toBeInTheDocument()
|
||||
})
|
||||
})
|
||||
|
||||
describe('the point handle (R-9, R-11)', () => {
|
||||
it('is a focusable button outside any aria-hidden subtree, named « Point {nom} »', async () => {
|
||||
await mount(withPoints(point('a', 50, 50, 5)))
|
||||
|
||||
Reference in new issue
Block a user