test(tests): loupe drag without shift, a pinch at the fit unselected
This commit is contained in:
1 parent
85231a2680
commit
bc8d645554
1 file changed
+9
@@ -216,10 +216,13 @@ for (const width of WIDTHS) {
|
|||||||
await select(page, ZONE)
|
await select(page, ZONE)
|
||||||
await expectFingerSizedHandles(page)
|
await expectFingerSizedHandles(page)
|
||||||
const from = await clientOf(page, 600, 200)
|
const from = await clientOf(page, 600, 200)
|
||||||
|
// 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 dragWithLoupe(page, cdp, from, { x: from.x + 40, y: from.y + 30 })
|
||||||
await expect(message(page)).toContainText(
|
await expect(message(page)).toContainText(
|
||||||
dict['editor.annotations.message.vertex_moved'],
|
dict['editor.annotations.message.vertex_moved'],
|
||||||
)
|
)
|
||||||
|
})
|
||||||
const [, moved] = await shownPoints(page)
|
const [, moved] = await shownPoints(page)
|
||||||
expect(moved).not.toEqual(SQUARE[1])
|
expect(moved).not.toEqual(SQUARE[1])
|
||||||
// The chosen vertex shows its « − » bubble: finger-sized too.
|
// The chosen vertex shows its « − » bubble: finger-sized too.
|
||||||
@@ -300,6 +303,12 @@ for (const width of WIDTHS) {
|
|||||||
const { actor, saves } = await open(page)
|
const { actor, saves } = await open(page)
|
||||||
requests.forbid(actor.account.email, actor.account.password)
|
requests.forbid(actor.account.email, actor.account.password)
|
||||||
const cdp = await context.newCDPSession(page)
|
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)
|
await select(page, ZONE)
|
||||||
const undo = historyButton(page, dict, 'undo')
|
const undo = historyButton(page, dict, 'undo')
|
||||||
await expect(undo).toBeDisabled()
|
await expect(undo).toBeDisabled()
|
||||||
|
|||||||
Reference in new issue
Block a user