From bc8d645554bff47970f4bb79ab675e87264e9bb1 Mon Sep 17 00:00:00 2001 From: bchanot Date: Wed, 18 Nov 2026 10:59:40 +0100 Subject: [PATCH] test(tests): loupe drag without shift, a pinch at the fit unselected --- apps/app/e2e/shell/editor-touch.spec.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/apps/app/e2e/shell/editor-touch.spec.ts b/apps/app/e2e/shell/editor-touch.spec.ts index 807e487a..eb72856a 100644 --- a/apps/app/e2e/shell/editor-touch.spec.ts +++ b/apps/app/e2e/shell/editor-touch.spec.ts @@ -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()