test(tests): loupe drag without shift, a pinch at the fit unselected

This commit is contained in:
bchanot committed 2026-11-18 10:59:40 +01:00
1 parent 85231a2680
commit bc8d645554
1 file changed
+13 -4
+13 -4
View File
@@ -216,10 +216,13 @@ for (const width of WIDTHS) {
await select(page, ZONE)
await expectFingerSizedHandles(page)
const from = await clientOf(page, 600, 200)
await dragWithLoupe(page, cdp, from, { x: from.x + 40, y: from.y + 30 })
await expect(message(page)).toContainText(
dict['editor.annotations.message.vertex_moved'],
)
// The loupe comes and goes, the message shows: no box moves (A14).
await expectNoShift(page, async () => {
await dragWithLoupe(page, cdp, from, { x: from.x + 40, y: from.y + 30 })
await expect(message(page)).toContainText(
dict['editor.annotations.message.vertex_moved'],
)
})
const [, moved] = await shownPoints(page)
expect(moved).not.toEqual(SQUARE[1])
// The chosen vertex shows its « − » bubble: finger-sized too.
@@ -300,6 +303,12 @@ for (const width of WIDTHS) {
const { actor, saves } = await open(page)
requests.forbid(actor.account.email, actor.account.password)
const cdp = await context.newCDPSession(page)
// Nothing selected, at the fit (`touch-action: pan-x pan-y`): a pinch still zooms.
await canvas(page).scrollIntoViewIfNeeded()
await pinchOut(cdp, await clientOf(page, INSIDE.x, INSIDE.y))
expect((await framing(page)).scale).toBeGreaterThan(1)
await button(page, 'catalogue.zoom.fit').click()
await expect.poll(async () => (await framing(page)).scale).toBe(1)
await select(page, ZONE)
const undo = historyButton(page, dict, 'undo')
await expect(undo).toBeDisabled()