test( zoomIn-tool): verify horizontal flip is preserved in magnified view (#5983)
This commit is contained in:
1 parent
03860030bd
commit
62620afb9b
20 files changed
+384
-220
No files matched your search
@@ -97,6 +97,9 @@ const screenShotPaths = {
|
||||
reset: {
|
||||
resetDisplayedCorrectly: 'resetDisplayedCorrectly.png',
|
||||
},
|
||||
zoomIn: {
|
||||
magnifyViewportDisplayedCorrectly: 'magnifyViewportDisplayedCorrectly.png',
|
||||
},
|
||||
rtDataOverlayForUnreferencedDisplaySetNoHydration: {
|
||||
overlayFirstImage: 'overlayFirstImage.png',
|
||||
overlayMiddleImage: 'overlayMiddleImage.png',
|
||||
|
||||
@@ -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 });
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user