fix lint snippets
This commit is contained in:
parent
16a9085738
commit
a41f8c3627
|
|
@ -36,7 +36,8 @@ async function pan(locator: Locator, deltaX?: number, deltaY?: number, steps?: n
|
||||||
clientX: centerX,
|
clientX: centerX,
|
||||||
clientY: centerY,
|
clientY: centerY,
|
||||||
}];
|
}];
|
||||||
await locator.dispatchEvent('touchstart', { touches, changedTouches: touches, targetTouches: touches });
|
await locator.dispatchEvent('touchstart',
|
||||||
|
{ touches, changedTouches: touches, targetTouches: touches });
|
||||||
|
|
||||||
steps = steps ?? 5;
|
steps = steps ?? 5;
|
||||||
deltaX = deltaX ?? 0;
|
deltaX = deltaX ?? 0;
|
||||||
|
|
@ -75,7 +76,8 @@ import { test, expect, devices, type Locator } from '@playwright/test';
|
||||||
|
|
||||||
test.use({ ...devices['Pixel 7'] });
|
test.use({ ...devices['Pixel 7'] });
|
||||||
|
|
||||||
async function pinch(locator: Locator, arg: { deltaX?: number, deltaY?: number, steps?: number, direction?: 'in' | 'out' }) {
|
async function pinch(locator: Locator,
|
||||||
|
arg: { deltaX?: number, deltaY?: number, steps?: number, direction?: 'in' | 'out' }) {
|
||||||
const { centerX, centerY } = await locator.evaluate((target: HTMLElement) => {
|
const { centerX, centerY } = await locator.evaluate((target: HTMLElement) => {
|
||||||
const bounds = target.getBoundingClientRect();
|
const bounds = target.getBoundingClientRect();
|
||||||
const centerX = bounds.left + bounds.width / 2;
|
const centerX = bounds.left + bounds.width / 2;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue