test( zoomIn-tool): verify horizontal flip is preserved in magnified view (#5983)

This commit is contained in:
Ghadeer Albattarni authored and GitHub committed 2026-04-29 10:32:27 -04:00
1 parent 03860030bd
commit 62620afb9b
20 files changed
+384 -220

No files matched your search

+3
View File
@@ -97,6 +97,9 @@ const screenShotPaths = {
reset: {
resetDisplayedCorrectly: 'resetDisplayedCorrectly.png',
},
zoomIn: {
magnifyViewportDisplayedCorrectly: 'magnifyViewportDisplayedCorrectly.png',
},
rtDataOverlayForUnreferencedDisplaySetNoHydration: {
overlayFirstImage: 'overlayFirstImage.png',
overlayMiddleImage: 'overlayMiddleImage.png',
+6 -2
View File
@@ -17,6 +17,7 @@ export async function simulateNormalizedDragOnElement({
button = 'left',
delay = 50,
steps = 10,
mouseUp = true,
}: {
locator: Locator;
start: { x: number; y: number };
@@ -24,6 +25,7 @@ export async function simulateNormalizedDragOnElement({
button?: 'left' | 'right' | 'middle';
delay?: number;
steps?: number;
mouseUp?: boolean;
}) {
const bBox = await locator.boundingBox();
if (!bBox) {
@@ -42,7 +44,7 @@ export async function simulateNormalizedDragOnElement({
// Get the page from the locator context
const page = locator.page();
page.mouse.move(startPosition.x, startPosition.y);
await page.mouse.move(startPosition.x, startPosition.y);
// Start drag
await page.mouse.down({ button });
@@ -63,5 +65,7 @@ export async function simulateNormalizedDragOnElement({
}
// End drag
await page.mouse.up({ button });
if (mouseUp) {
await page.mouse.up({ button });
}
}