mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
test: check os version only on mac (#22658)
This commit is contained in:
parent
60afcc9c6c
commit
4d6092fc8f
@ -80,7 +80,7 @@ it('should click the button with deviceScaleFactor set', async ({ browser, serve
|
|||||||
await context.close();
|
await context.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should click the button with offset with page scale', async ({ browser, server, headless, browserName, browserVersion }) => {
|
it('should click the button with offset with page scale', async ({ browser, server, headless, browserName, browserVersion, isMac }) => {
|
||||||
it.skip(browserName === 'firefox');
|
it.skip(browserName === 'firefox');
|
||||||
|
|
||||||
const context = await browser.newContext({ viewport: { width: 400, height: 400 }, isMobile: true });
|
const context = await browser.newContext({ viewport: { width: 400, height: 400 }, isMobile: true });
|
||||||
@ -96,7 +96,7 @@ it('should click the button with offset with page scale', async ({ browser, serv
|
|||||||
let expected = { x: 28, y: 18 }; // 20;10 + 8px of border in each direction
|
let expected = { x: 28, y: 18 }; // 20;10 + 8px of border in each direction
|
||||||
if (browserName === 'webkit') {
|
if (browserName === 'webkit') {
|
||||||
// WebKit for macOS 12 has different expectations starting r1829.
|
// WebKit for macOS 12 has different expectations starting r1829.
|
||||||
if (parseInt(os.release(), 10) < 21) {
|
if (isMac && parseInt(os.release(), 10) < 21) {
|
||||||
// WebKit rounds down during css -> dip -> css conversion.
|
// WebKit rounds down during css -> dip -> css conversion.
|
||||||
expected = { x: 26, y: 17 };
|
expected = { x: 26, y: 17 };
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user