test: update macos 12 test expectations (#16223)

This commit is contained in:
Yury Semikhatsky 2022-08-03 14:51:11 -07:00 committed by GitHub
parent 37f9500efa
commit 165ab9bfa9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View File

@ -30,7 +30,7 @@ async function checkFeatures(name: string, context: any, server: any) {
}
}
it('safari-14-1', async ({ browser, browserName, platform, server, headless }) => {
it('safari-14-1', async ({ browser, browserName, platform, server, headless, isMac }) => {
it.skip(browserName !== 'webkit');
it.skip(browserName === 'webkit' && parseInt(os.release(), 10) < 20, 'WebKit for macOS 10.15 is frozen.');
const context = await browser.newContext({
@ -70,10 +70,14 @@ it('safari-14-1', async ({ browser, browserName, platform, server, headless }) =
expected.inputtypes['datetime-local'] = false;
expected.inputtypes.time = false;
}
if (isMac && parseInt(os.release(), 10) > 20)
expected.applicationcache = false;
expect(actual).toEqual(expected);
});
it('mobile-safari-14-1', async ({ playwright, browser, browserName, platform, server, headless }) => {
it('mobile-safari-14-1', async ({ playwright, browser, browserName, platform, isMac, server, headless }) => {
it.skip(browserName !== 'webkit');
it.skip(browserName === 'webkit' && parseInt(os.release(), 10) < 20, 'WebKit for macOS 10.15 is frozen.');
const iPhone = playwright.devices['iPhone 12'];
@ -125,6 +129,9 @@ it('mobile-safari-14-1', async ({ playwright, browser, browserName, platform, se
expected.inputtypes.time = false;
}
if (isMac && parseInt(os.release(), 10) > 20)
expected.applicationcache = false;
expect(actual).toEqual(expected);
});

View File

@ -20,7 +20,6 @@ import { verifyViewport, attachFrame } from '../config/utils';
import type { Route } from 'playwright-core';
import path from 'path';
import fs from 'fs';
import os from 'os';
it.describe('page screenshot', () => {
it.skip(({ browserName, headless }) => browserName === 'firefox' && !headless, 'Firefox headed produces a different image.');
@ -231,7 +230,7 @@ it.describe('page screenshot', () => {
});
it('should capture canvas changes', async ({ page, isElectron, browserName, isMac }) => {
it.fixme(browserName === 'webkit' && isMac && parseInt(os.release(), 10) < 21, 'https://github.com/microsoft/playwright/issues/8796,https://github.com/microsoft/playwright/issues/16180');
it.fixme(browserName === 'webkit' && isMac, 'https://github.com/microsoft/playwright/issues/8796,https://github.com/microsoft/playwright/issues/16180');
it.skip(isElectron);
await page.goto('data:text/html,<canvas></canvas>');
await page.evaluate(() => {