fix(editor): guard keeps pending series, mode end said, R-9 hook
- guardDrawing commits a keyboard or size series the focus still holds (its blur) and ends only the mode: a pending series is never dropped. - A started move ended by a selection change is said (R-13). - handleSize: no module-level state; useHandleSizes reads the device once per handle layer. The layer reads ResizeObserver contentRect. - Dead kind check removed in SelectionPointCommands; long lines wrapped (code, doc). - e2e: the zoom check waits for the transform to change; the move-mode arrow clicks are under expectNoShift.
This commit is contained in:
1 parent
e01d8519ea
commit
463e0a2621
11 files changed
+157
-40
No files matched your search
@@ -459,7 +459,13 @@ test.describe('editor annotations (A3)', () => {
|
||||
const right = button(page, 'editor.annotations.move.right')
|
||||
await expect(right).toBeVisible()
|
||||
await expectAccessible(page, 'the move mode')
|
||||
for (let step = 0; step < 3; step++) await right.click()
|
||||
await expectNoShift(
|
||||
page,
|
||||
async () => {
|
||||
for (let step = 0; step < 3; step++) await right.click()
|
||||
},
|
||||
swaps,
|
||||
)
|
||||
await expect(cx).toHaveValue(String(x0))
|
||||
await expectNoShift(
|
||||
page,
|
||||
@@ -488,13 +494,20 @@ test.describe('editor annotations (A3)', () => {
|
||||
const fit = (await hit.boundingBox())!
|
||||
// R-9: a 10 px hit radius with a mouse (Chromium desktop has a fine pointer).
|
||||
expect(Math.abs(fit.width - 20)).toBeLessThan(2)
|
||||
// The drawing's own scale: the measure below waits for the zoom to land.
|
||||
const transform = () =>
|
||||
page
|
||||
.getByTestId('annotation-canvas')
|
||||
.evaluate(
|
||||
(box) => (box.firstElementChild as HTMLElement).style.transform,
|
||||
)
|
||||
const before = await transform()
|
||||
await page
|
||||
.getByRole('button', { name: dict['catalogue.zoom.in'] })
|
||||
.click()
|
||||
await expect
|
||||
.poll(async () => Math.round((await hit.boundingBox())!.width))
|
||||
.toBeLessThan(22)
|
||||
expect(Math.abs((await hit.boundingBox())!.width - 20)).toBeLessThan(2)
|
||||
await expect.poll(transform).not.toBe(before)
|
||||
const zoomed = (await hit.boundingBox())!
|
||||
expect(Math.abs(zoomed.width - 20)).toBeLessThan(2)
|
||||
})
|
||||
|
||||
test('the editor keeps a stable scrollbar gutter; the dashboard does not', async ({
|
||||
|
||||
Reference in new issue
Block a user