From 2f310a3432c248c05377b811211a8dd3a6b50186 Mon Sep 17 00:00:00 2001 From: Scott Bell Date: Tue, 2 May 2023 15:21:41 +0200 Subject: [PATCH] fix drag test --- .../functional/plugins/imagery/exampleImagery.e2e.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/tests/functional/plugins/imagery/exampleImagery.e2e.spec.js b/e2e/tests/functional/plugins/imagery/exampleImagery.e2e.spec.js index d856b728a8..60b68a52ca 100644 --- a/e2e/tests/functional/plugins/imagery/exampleImagery.e2e.spec.js +++ b/e2e/tests/functional/plugins/imagery/exampleImagery.e2e.spec.js @@ -69,11 +69,11 @@ test.describe('Example Imagery Object', () => { test('Can use alt+drag to move around image once zoomed in', async ({ page }) => { const deltaYStep = 100; //equivalent to 1x zoom - await page.locator(backgroundImageSelector).hover({trial: true}); + await page.locator('.c-imagery__main-image__bg').hover({trial: true}); // zoom in await page.mouse.wheel(0, deltaYStep * 2); - await page.locator(backgroundImageSelector).hover({trial: true}); + await page.locator('.c-imagery__main-image__bg').hover({trial: true}); const zoomedBoundingBox = await page.locator(backgroundImageSelector).boundingBox(); const imageCenterX = zoomedBoundingBox.x + zoomedBoundingBox.width / 2; const imageCenterY = zoomedBoundingBox.y + zoomedBoundingBox.height / 2;