diff --git a/app/gui2/e2e/actions.ts b/app/gui2/e2e/actions.ts index c7fd195cf9..c079044d84 100644 --- a/app/gui2/e2e/actions.ts +++ b/app/gui2/e2e/actions.ts @@ -33,7 +33,7 @@ export async function expectNodePositionsInitialized(page: Page, yPos: number) { } export async function exitFunction(page: Page, x = 300, y = 300) { - await page.mouse.dblclick(x, y, { delay: 10 }) + await locate.graphEditor(page).dblclick({ position: { x, y } }) } // ================= diff --git a/app/gui2/e2e/componentBrowser.spec.ts b/app/gui2/e2e/componentBrowser.spec.ts index f0c9d9a15b..e1bf270b38 100644 --- a/app/gui2/e2e/componentBrowser.spec.ts +++ b/app/gui2/e2e/componentBrowser.spec.ts @@ -56,7 +56,7 @@ test('Different ways of opening Component Browser', async ({ page }) => { // Dragging out an edge const outputPort = await locate.outputPortCoordinates(locate.graphNodeByBinding(page, 'final')) await page.mouse.click(outputPort.x, outputPort.y) - await page.mouse.click(100, 500) + await locate.graphEditor(page).click({ position: { x: 100, y: 500 } }) await expectAndCancelBrowser(page, '', 'final') // Double-clicking port // TODO[ao] Without timeout, even the first click would be treated as double due to previous @@ -111,7 +111,7 @@ test('Graph Editor pans to Component Browser', async ({ page }) => { await expect(locate.graphNodeByBinding(page, 'five')).toBeInViewport() const outputPort = await locate.outputPortCoordinates(locate.graphNodeByBinding(page, 'final')) await page.mouse.click(outputPort.x, outputPort.y) - await page.mouse.click(100, 1700) + await locate.graphEditor(page).click({ position: { x: 100, y: 1700 } }) await expect(locate.graphNodeByBinding(page, 'five')).not.toBeInViewport() await expectAndCancelBrowser(page, '', 'final') }) diff --git a/app/gui2/e2e/selectingNodes.spec.ts b/app/gui2/e2e/selectingNodes.spec.ts index 603d25190f..f7c09fb844 100644 --- a/app/gui2/e2e/selectingNodes.spec.ts +++ b/app/gui2/e2e/selectingNodes.spec.ts @@ -37,7 +37,7 @@ test('Selecting nodes by click', async ({ page }) => { await expect(selectionMenu).not.toBeVisible() // Check that clicking the background deselects all nodes. - await page.mouse.click(600, 200) + await locate.graphEditor(page).click({ position: { x: 600, y: 200 } }) await expect(node1).not.toBeSelected() await expect(node2).not.toBeSelected() await expect(selectionMenu).not.toBeVisible()