mirror of
https://github.com/microsoft/playwright.git
synced 2024-11-24 06:49:04 +03:00
test: update 'should work for canvas' test expectation (#33685)
This commit is contained in:
parent
89f4d4ce4f
commit
6a32589330
@ -61,6 +61,7 @@ export const androidTest = baseTest.extend<PageTestFixtures & AndroidTestFixture
|
||||
isElectron: [false, { scope: 'worker' }],
|
||||
electronMajorVersion: [0, { scope: 'worker' }],
|
||||
isWebView2: [false, { scope: 'worker' }],
|
||||
isHeadlessShell: [false, { scope: 'worker' }],
|
||||
|
||||
androidDevice: async ({ androidDeviceWorker }, use) => {
|
||||
await closeAllActivities(androidDeviceWorker);
|
||||
|
@ -35,6 +35,7 @@ export const electronTest = baseTest.extend<TraceViewerFixtures>(traceViewerFixt
|
||||
isAndroid: [false, { scope: 'worker' }],
|
||||
isElectron: [true, { scope: 'worker' }],
|
||||
isWebView2: [false, { scope: 'worker' }],
|
||||
isHeadlessShell: [false, { scope: 'worker' }],
|
||||
|
||||
launchElectronApp: async ({ playwright }, use) => {
|
||||
// This env prevents 'Electron Security Policy' console message.
|
||||
|
@ -280,12 +280,12 @@ it.describe('page screenshot', () => {
|
||||
expect(screenshot).toMatchSnapshot('screenshot-clip-odd-size.png');
|
||||
});
|
||||
|
||||
it('should work for canvas', async ({ page, server, isElectron, isMac, isLinux, macVersion, browserName, headless }) => {
|
||||
it('should work for canvas', async ({ page, server, isElectron, isMac, isLinux, macVersion, browserName, isHeadlessShell }) => {
|
||||
it.fixme(isElectron && isMac, 'Fails on the bots');
|
||||
await page.setViewportSize({ width: 500, height: 500 });
|
||||
await page.goto(server.PREFIX + '/screenshots/canvas.html');
|
||||
const screenshot = await page.screenshot();
|
||||
if ((!headless && browserName === 'chromium' && isMac && os.arch() === 'arm64' && macVersion >= 14) ||
|
||||
if ((!isHeadlessShell && browserName === 'chromium' && isMac && os.arch() === 'arm64' && macVersion >= 14) ||
|
||||
(browserName === 'webkit' && isLinux && os.arch() === 'x64'))
|
||||
expect(screenshot).toMatchSnapshot('screenshot-canvas-with-accurate-corners.png');
|
||||
else
|
||||
|
@ -36,4 +36,5 @@ export type PageWorkerFixtures = {
|
||||
isAndroid: boolean;
|
||||
isElectron: boolean;
|
||||
isWebView2: boolean;
|
||||
isHeadlessShell: boolean;
|
||||
};
|
||||
|
@ -32,6 +32,7 @@ export const webView2Test = baseTest.extend<TraceViewerFixtures>(traceViewerFixt
|
||||
isElectron: [false, { scope: 'worker' }],
|
||||
electronMajorVersion: [0, { scope: 'worker' }],
|
||||
isWebView2: [true, { scope: 'worker' }],
|
||||
isHeadlessShell: [false, { scope: 'worker' }],
|
||||
|
||||
browser: [async ({ playwright }, use, testInfo) => {
|
||||
const cdpPort = 10000 + testInfo.workerIndex;
|
||||
|
Loading…
Reference in New Issue
Block a user