From 3d3020972b8c2254330997277c933ae5c57c9f92 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sat, 4 Apr 2026 20:20:42 +0200 Subject: [PATCH] Update viewport test helpers to use page mouse click --- tests/e2e/viewport-test-helpers.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tests/e2e/viewport-test-helpers.ts b/tests/e2e/viewport-test-helpers.ts index 8dc5ba66..78851a55 100644 --- a/tests/e2e/viewport-test-helpers.ts +++ b/tests/e2e/viewport-test-helpers.ts @@ -159,19 +159,14 @@ export async function clickViewport(page: Page, panelId: string = DEFAULT_VIEWPO } export async function clickViewportAtRatio(page: Page, panelId: string, xRatio: number, yRatio: number) { - const viewportCanvas = getViewportCanvas(page, panelId); - const box = await viewportCanvas.boundingBox(); + const viewportPanel = getViewportPanel(page, panelId); + const box = await viewportPanel.boundingBox(); if (box === null) { - throw new Error(`Missing viewport canvas for ${panelId}.`); + throw new Error(`Missing viewport panel for ${panelId}.`); } - await viewportCanvas.click({ - position: { - x: box.width * xRatio, - y: box.height * yRatio - } - }); + await page.mouse.click(box.x + box.width * xRatio, box.y + box.height * yRatio); } export async function setSharedBoxCreationPreview(