From e4eeb47dc1d619c09b31b70faf885f09d7dc5483 Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Mon, 7 Oct 2024 09:21:02 +0100 Subject: [PATCH] test: mark a few tests as fixme --- tests/config/utils.ts | 2 +- tests/library/browsercontext-viewport.spec.ts | 4 +++- tests/library/page-clock.spec.ts | 1 + tests/page/expect-misc.spec.ts | 2 ++ tests/page/frame-goto.spec.ts | 3 ++- tests/page/interception.spec.ts | 3 ++- tests/page/locator-misc-1.spec.ts | 4 +++- tests/page/page-click.spec.ts | 4 +++- tests/page/page-request-fulfill.spec.ts | 4 +++- 9 files changed, 20 insertions(+), 7 deletions(-) diff --git a/tests/config/utils.ts b/tests/config/utils.ts index 74158aeeae6ae..3743e97d80797 100644 --- a/tests/config/utils.ts +++ b/tests/config/utils.ts @@ -61,7 +61,7 @@ export function expectedSSLError(browserName: string, platform: string): RegExp else if (platform === 'win32') return /SSL peer certificate or SSH remote key was not OK/; else - return /Unacceptable TLS certificate/; + return /Unacceptable TLS certificate|Operation was cancelled/; } return /SSL_ERROR_UNKNOWN/; } diff --git a/tests/library/browsercontext-viewport.spec.ts b/tests/library/browsercontext-viewport.spec.ts index 4fdd181f8fb26..356e3300798e9 100644 --- a/tests/library/browsercontext-viewport.spec.ts +++ b/tests/library/browsercontext-viewport.spec.ts @@ -139,7 +139,9 @@ browserTest('should report null viewportSize when given null viewport', async ({ await context.close(); }); -browserTest('should drag with high dpi', async ({ browser, server }) => { +browserTest('should drag with high dpi', async ({ browser, server, headless }) => { + browserTest.fixme(!headless, 'Flaky on all browser in headed'); + const page = await browser.newPage({ deviceScaleFactor: 2 }); await page.goto(server.PREFIX + '/drag-n-drop.html'); await page.hover('#source'); diff --git a/tests/library/page-clock.spec.ts b/tests/library/page-clock.spec.ts index d541d5d135631..a660e5e8a4de4 100644 --- a/tests/library/page-clock.spec.ts +++ b/tests/library/page-clock.spec.ts @@ -354,6 +354,7 @@ it.describe('popup', () => { page.waitForEvent('popup'), page.evaluate(url => window.open(url), server.PREFIX + '/popup.html'), ]); + await popup.waitForLoadState(); const popupTime = await popup.evaluate('time'); expect(popupTime).toBe(1000); }); diff --git a/tests/page/expect-misc.spec.ts b/tests/page/expect-misc.spec.ts index 7bf038231c201..2242a5537822c 100644 --- a/tests/page/expect-misc.spec.ts +++ b/tests/page/expect-misc.spec.ts @@ -349,6 +349,8 @@ test.describe('toBeInViewport', () => { }); test('should respect ratio option', async ({ page, isAndroid }) => { + test.fixme(isAndroid, 'ratio 0.24 is not in viewport for unknown reason'); + await page.setContent(`
diff --git a/tests/page/frame-goto.spec.ts b/tests/page/frame-goto.spec.ts index 56146572f2c1f..6603282bb323f 100644 --- a/tests/page/frame-goto.spec.ts +++ b/tests/page/frame-goto.spec.ts @@ -43,8 +43,9 @@ it('should reject when frame detaches', async ({ page, server, browserName }) => expect(error.message.toLowerCase()).toContain('frame was detached'); }); -it('should continue after client redirect', async ({ page, server, isAndroid, mode }) => { +it('should continue after client redirect', async ({ page, server, isAndroid, browserName }) => { it.fixme(isAndroid); + it.fixme(browserName === 'firefox', 'script.js is requested before navigationCommitted arrives'); server.setRoute('/frames/script.js', () => {}); const url = server.PREFIX + '/frames/child-redirect.html'; diff --git a/tests/page/interception.spec.ts b/tests/page/interception.spec.ts index f12d2d179bf28..9447a80fcd1ef 100644 --- a/tests/page/interception.spec.ts +++ b/tests/page/interception.spec.ts @@ -123,8 +123,9 @@ it('should intercept network activity from worker', async function({ page, serve it('should intercept worker requests when enabled after worker creation', { annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/32355' } -}, async ({ page, server, isAndroid, browserName }) => { +}, async ({ page, server, isAndroid, browserName, browserMajorVersion }) => { it.skip(isAndroid); + it.skip(browserName === 'chromium' && browserMajorVersion < 130, 'fixed in Chromium 130'); await page.goto(server.EMPTY_PAGE); server.setRoute('/data_for_worker', (req, res) => res.end('failed to intercept')); diff --git a/tests/page/locator-misc-1.spec.ts b/tests/page/locator-misc-1.spec.ts index 01745368981a6..616beb3e7fd89 100644 --- a/tests/page/locator-misc-1.spec.ts +++ b/tests/page/locator-misc-1.spec.ts @@ -25,7 +25,9 @@ it('should hover @smoke', async ({ page, server }) => { expect(await page.evaluate(() => document.querySelector('button:hover').id)).toBe('button-6'); }); -it('should hover when Node is removed', async ({ page, server }) => { +it('should hover when Node is removed', async ({ page, server, headless }) => { + it.skip(!headless, 'headed messes up with hover'); + await page.goto(server.PREFIX + '/input/scrollable.html'); await page.evaluate(() => delete window['Node']); const button = page.locator('#button-6'); diff --git a/tests/page/page-click.spec.ts b/tests/page/page-click.spec.ts index c2b024fec11a0..fccef2ed0e7d4 100644 --- a/tests/page/page-click.spec.ts +++ b/tests/page/page-click.spec.ts @@ -94,7 +94,9 @@ it('should not throw UnhandledPromiseRejection when page closes', async ({ page, ]).catch(e => {}); }); -it('should click the 1x1 div', async ({ page }) => { +it('should click the 1x1 div', async ({ page, browserName, isWindows }) => { + it.fixme(browserName === 'firefox' && isWindows, 'always times out'); + await page.setContent(`
`); await page.click('div'); expect(await page.evaluate('window.__clicked')).toBe(true); diff --git a/tests/page/page-request-fulfill.spec.ts b/tests/page/page-request-fulfill.spec.ts index 8170cb73d596a..3edcd0ba0a97e 100644 --- a/tests/page/page-request-fulfill.spec.ts +++ b/tests/page/page-request-fulfill.spec.ts @@ -309,8 +309,10 @@ it('should fetch original request and fulfill', async ({ page, server, isElectro expect(await page.title()).toEqual('Woof-Woof'); }); -it('should fulfill with multiple set-cookie', async ({ page, server, isElectron, electronMajorVersion }) => { +it('should fulfill with multiple set-cookie', async ({ page, server, isElectron, electronMajorVersion, isAndroid }) => { it.skip(isElectron && electronMajorVersion < 14, 'Electron 14+ is required'); + it.skip(isAndroid, 'Android does not have an isolated context per test, so we get cookies from other tests'); + const cookies = ['a=b', 'c=d']; await page.route('**/multiple-set-cookie.html', async route => { void route.fulfill({