test: unskip passing test (#26960)
The functionality was fixed in [webkit](https://github.com/microsoft/playwright-browsers/pull/625) and should be available with [recent roll](https://github.com/microsoft/playwright/pull/26953). Fixes #26876
This commit is contained in:
parent
8ba8c9385d
commit
0213fef484
|
|
@ -16,6 +16,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { browserTest as it, expect } from '../config/browserTest';
|
import { browserTest as it, expect } from '../config/browserTest';
|
||||||
|
import os from 'os';
|
||||||
|
|
||||||
it.describe('mobile viewport', () => {
|
it.describe('mobile viewport', () => {
|
||||||
it.skip(({ browserName }) => browserName === 'firefox');
|
it.skip(({ browserName }) => browserName === 'firefox');
|
||||||
|
|
@ -190,9 +191,8 @@ it.describe('mobile viewport', () => {
|
||||||
await context.close();
|
await context.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('view scale should reset after navigation', async ({ browser, browserName }) => {
|
it('view scale should reset after navigation', async ({ browser, browserName, isLinux, isWindows, isMac, headless }) => {
|
||||||
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/26876' });
|
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/26876' });
|
||||||
it.fixme(browserName === 'webkit');
|
|
||||||
const context = await browser.newContext({
|
const context = await browser.newContext({
|
||||||
viewport: { width: 390, height: 664 },
|
viewport: { width: 390, height: 664 },
|
||||||
isMobile: true,
|
isMobile: true,
|
||||||
|
|
@ -225,8 +225,23 @@ it.describe('mobile viewport', () => {
|
||||||
});
|
});
|
||||||
await page.goto('http://localhost/button.html');
|
await page.goto('http://localhost/button.html');
|
||||||
await page.getByText('Click me').click({ force: true });
|
await page.getByText('Click me').click({ force: true });
|
||||||
expect(await page.evaluate(() => (window as any).clicks)).toEqual(
|
let expected = [{ x: 41, y: 18 }];
|
||||||
browserName === 'chromium' ? [{ x: 41, y: 18 }] : [{ x: 37, y: 15 }]);
|
if (browserName === 'webkit') {
|
||||||
|
if (isLinux) {
|
||||||
|
if (headless)
|
||||||
|
expected = [{ x: 50, y: 20 }];
|
||||||
|
else
|
||||||
|
expected = [{ x: 45, y: 20 }];
|
||||||
|
} else if (isWindows) {
|
||||||
|
expected = [{ x: 40, y: 20 }];
|
||||||
|
} else if (isMac) {
|
||||||
|
if (parseInt(os.release(), 10) === 21)
|
||||||
|
expected = [{ x: 40, y: 17 }];
|
||||||
|
else
|
||||||
|
expected = [{ x: 37, y: 15 }];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
expect(await page.evaluate(() => (window as any).clicks)).toEqual(expected);
|
||||||
await context.close();
|
await context.close();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue