Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
test: remove some fixmes (#32953)
Dmitry Gozman34ad67659ff7
diff --git a/tests/library/browsercontext-basic.spec.ts b/tests/library/browsercontext-basic.spec.tsindex f075184cf9..df9db587d6 100644--- a/tests/library/browsercontext-basic.spec.ts+++ b/tests/library/browsercontext-basic.spec.ts@@ -254,7 +254,7 @@ it('should be able to navigate after disabling javascript', async ({ browser, se});it('should not hang on promises after disabling javascript', async ({ browserName, contextFactory }) => {- it.fixme(browserName === 'webkit' || browserName === 'firefox');+ it.fixme(browserName === 'firefox');const context = await contextFactory({ javaScriptEnabled: false });const page = await context.newPage();expect(await page.evaluate(() => 1)).toBe(1);diff --git a/tests/library/browsercontext-cookies.spec.ts b/tests/library/browsercontext-cookies.spec.tsindex 9bb600c786..f4dbefad58 100644--- a/tests/library/browsercontext-cookies.spec.ts+++ b/tests/library/browsercontext-cookies.spec.ts@@ -406,7 +406,6 @@ it('should support requestStorageAccess', async ({ page, server, channel, browseit('should parse cookie with large Max-Age correctly', async ({ server, page, defaultSameSiteCookieValue, browserName, platform }) => {it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/30305' });- it.fixme(browserName === 'webkit' && platform === 'linux', 'https://github.com/microsoft/playwright/issues/30305');server.setRoute('/foobar', (req, res) => {res.setHeader('set-cookie', [diff --git a/tests/library/browsercontext-page-event.spec.ts b/tests/library/browsercontext-page-event.spec.tsindex 30efb63fcf..15e2b66163 100644--- a/tests/library/browsercontext-page-event.spec.ts+++ b/tests/library/browsercontext-page-event.spec.ts@@ -171,8 +171,6 @@ it('should work with Shift-clicking', async ({ browser, server, browserName }) =});it('should work with Ctrl-clicking', async ({ browser, server, browserName }) => {- it.fixme(browserName === 'firefox', 'Reports an opener in this case.');-const context = await browser.newContext();const page = await context.newPage();await page.goto(server.EMPTY_PAGE);@@ -181,6 +179,6 @@ it('should work with Ctrl-clicking', async ({ browser, server, browserName }) =>context.waitForEvent('page'),page.click('a', { modifiers: ['ControlOrMeta'] }),]);- expect(await popup.opener()).toBe(null);+ expect(await popup.opener()).toBe(browserName === 'firefox' ? page : null);await context.close();});diff --git a/tests/library/browsercontext-proxy.spec.ts b/tests/library/browsercontext-proxy.spec.tsindex 460c242998..58bda44632 100644--- a/tests/library/browsercontext-proxy.spec.ts+++ b/tests/library/browsercontext-proxy.spec.ts@@ -65,7 +65,9 @@ it('should use proxy', async ({ contextFactory, server, proxyServer }) => {});-it('should set cookie for top-level domain', async ({ contextFactory, server, proxyServer, browserName, isLinux }) => {+it('should set cookie for top-level domain', {+ annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/18362' }+}, async ({ contextFactory, server, proxyServer, browserName, isLinux }) => {it.fixme(browserName === 'webkit' && isLinux);proxyServer.forwardTo(server.PORT, { allowConnectRequests: true });diff --git a/tests/library/browsertype-connect.spec.ts b/tests/library/browsertype-connect.spec.tsindex d494f63b19..a732985b5b 100644--- a/tests/library/browsertype-connect.spec.ts+++ b/tests/library/browsertype-connect.spec.ts@@ -761,7 +761,6 @@ for (const kind of ['launchServer', 'run-server'] as const) {});test.describe('socks proxy', () => {- test.fixme(({ platform, browserName }) => browserName === 'webkit' && platform === 'win32');test.skip(({ mode }) => mode !== 'default');test.skip(kind === 'launchServer', 'not supported yet');diff --git a/tests/library/capabilities.spec.ts b/tests/library/capabilities.spec.tsindex 3f71c7db9e..864022a1f4 100644--- a/tests/library/capabilities.spec.ts+++ b/tests/library/capabilities.spec.ts@@ -65,13 +65,9 @@ it('should respect CSP @smoke', async ({ page, server }) => {expect(await page.evaluate(() => window['testStatus'])).toBe('SUCCESS');});-it('should play video @smoke', async ({ page, asset, browserName, platform, macVersion, mode }) => {- // TODO: the test passes on Windows locally but fails on GitHub Action bot,- // apparently due to a Media Pack issue in the Windows Server.- // Also the test is very flaky on Linux WebKit.- it.fixme(browserName === 'webkit' && platform !== 'darwin');- it.fixme(browserName === 'firefox', 'https://github.com/microsoft/playwright/issues/5721');- it.fixme(browserName === 'webkit' && platform === 'darwin' && macVersion === 11, 'Does not work on BigSur');+it('should play video @smoke', async ({ page, asset, browserName, isWindows, isLinux, mode }) => {+ it.skip(browserName === 'webkit' && isWindows, 'passes locally but fails on GitHub Action bot, apparently due to a Media Pack issue in the Windows Server');+ it.fixme(browserName === 'firefox' && isLinux, 'https://github.com/microsoft/playwright/issues/5721');it.skip(mode.startsWith('service'));// Safari only plays mp4 so we test WebKit with an .mp4 clip.@@ -85,8 +81,7 @@ it('should play video @smoke', async ({ page, asset, browserName, platform, macV});it('should play webm video @smoke', async ({ page, asset, browserName, platform, macVersion, mode }) => {- it.fixme(browserName === 'webkit' && platform === 'darwin' && macVersion === 11, 'Does not work on BigSur');- it.fixme(browserName === 'webkit' && platform === 'win32');+ it.skip(browserName === 'webkit' && platform === 'win32', 'not supported');it.skip(mode.startsWith('service'));const absolutePath = asset('video_webm.html');@@ -98,8 +93,6 @@ it('should play webm video @smoke', async ({ page, asset, browserName, platform,});it('should play audio @smoke', async ({ page, server, browserName, platform }) => {- it.fixme(browserName === 'firefox' && platform === 'win32', 'https://github.com/microsoft/playwright/issues/10887');- it.fixme(browserName === 'firefox' && platform === 'linux', 'https://github.com/microsoft/playwright/issues/10887');it.fixme(browserName === 'webkit' && platform === 'win32', 'https://github.com/microsoft/playwright/issues/10892');await page.goto(server.EMPTY_PAGE);await page.setContent(`<audio src="${server.PREFIX}/example.mp3"></audio>`);@@ -133,7 +126,6 @@ it('should support webgl 2 @smoke', async ({ page, browserName, headless, isWindit('should not crash on page with mp4 @smoke', async ({ page, server, platform, browserName }) => {it.fixme(browserName === 'webkit' && platform === 'win32', 'https://github.com/microsoft/playwright/issues/11009, times out in setContent');- it.fixme(browserName === 'firefox', 'https://bugzilla.mozilla.org/show_bug.cgi?id=1697004');await page.setContent(`<video><source src="${server.PREFIX}/movie.mp4"/></video>`);await page.waitForTimeout(1000);});@@ -261,7 +253,6 @@ it('window.GestureEvent in WebKit', async ({ page, server, browserName }) => {it('requestFullscreen', async ({ page, server, browserName, headless, isLinux }) => {it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/22832' });- it.fixme(browserName === 'chromium' && headless, 'fullscreenchange is not fired in headless Chromium');await page.goto(server.EMPTY_PAGE);await page.evaluate(() => {const result = new Promise(resolve => document.addEventListener('fullscreenchange', resolve));diff --git a/tests/library/client-certificates.spec.ts b/tests/library/client-certificates.spec.tsindex cadf49deb9..10c8a52235 100644--- a/tests/library/client-certificates.spec.ts+++ b/tests/library/client-certificates.spec.ts@@ -728,8 +728,7 @@ test.describe('browser', () => {});test('should return target connection errors when using http2', async ({ browser, startCCServer, asset, browserName, isMac, isLinux }) => {- test.skip(browserName === 'webkit' && isMac, 'WebKit on macOS doesn\n proxy localhost');- test.fixme(browserName === 'webkit' && isLinux, 'WebKit on Linux does not support http2 https://bugs.webkit.org/show_bug.cgi?id=276990');+ test.skip(browserName === 'webkit' && isMac, 'WebKit on macOS does not proxy localhost');test.skip(+process.versions.node.split('.')[0] < 20, 'http2.performServerHandshake is not supported in older Node.js versions');const serverURL = await startCCServer({ http2: true });diff --git a/tests/library/clock.spec.ts b/tests/library/clock.spec.tsindex daad405e70..3db8e968a2 100644--- a/tests/library/clock.spec.ts+++ b/tests/library/clock.spec.ts@@ -1155,7 +1155,7 @@ it.describe('stubTimers', () => {});});- it.fixme('deletes global property on uninstall if it was inherited onto the global object', ({}) => {+ it('restores global property on uninstall if it was inherited onto the global object', ({}) => {// Give the global object an inherited 'setTimeout' methodconst proto = { Date,setTimeout: () => {},@@ -1167,8 +1167,10 @@ it.describe('stubTimers', () => {const { clock } = rawInstall(myGlobal, { now: 0, toFake: ['setTimeout'] });expect(myGlobal.hasOwnProperty('setTimeout')).toBeTruthy();+ expect(myGlobal.setTimeout).not.toBe(proto.setTimeout);clock.uninstall();- expect(myGlobal.hasOwnProperty('setTimeout')).toBeFalsy();+ expect(myGlobal.hasOwnProperty('setTimeout')).toBeTruthy();+ expect(myGlobal.setTimeout).toBe(proto.setTimeout);});it('fakes Date constructor', ({ installEx }) => {diff --git a/tests/library/download.spec.ts b/tests/library/download.spec.tsindex 9e6fb2b8e5..33e33f21b4 100644--- a/tests/library/download.spec.ts+++ b/tests/library/download.spec.ts@@ -305,10 +305,8 @@ it.describe('download event', () => {});it('should report alt-click downloads', async ({ browser, server, browserName }) => {- it.fixme(browserName === 'firefox');+ it.skip(browserName === 'firefox', 'Firefox does not download on alt-click.');- // Firefox does not download on alt-click by default.- // Our WebKit embedder does not download on alt-click, although Safari does.server.setRoute('/download', (req, res) => {res.setHeader('Content-Type', 'application/octet-stream');res.end(`Hello world`);diff --git a/tests/library/headful.spec.ts b/tests/library/headful.spec.tsindex cfeb9711c9..5832ef44da 100644--- a/tests/library/headful.spec.ts+++ b/tests/library/headful.spec.ts@@ -192,7 +192,7 @@ it('should not block third party SameSite=None cookies', async ({ httpsServer, b});it('should not override viewport size when passed null', async function({ browserName, server, browser }) {- it.fixme(browserName === 'webkit', 'Our WebKit embedder does not respect window features');+ it.skip(browserName === 'webkit', 'Our WebKit embedder does not respect window features');const context = await browser.newContext({ viewport: null });const page = await context.newPage();@@ -230,8 +230,6 @@ it('Page.bringToFront should work', async ({ browser }) => {});it('should click in OOPIF', async ({ browserName, launchPersistent, server }) => {- it.fixme(browserName === 'chromium', 'Click is offset by the infobar height');-server.setRoute('/empty.html', (req, res) => {res.writeHead(200, { 'Content-Type': 'text/html' });res.end(`<iframe src="${server.CROSS_PROCESS_PREFIX}/iframe.html"></iframe>`);@@ -250,8 +248,8 @@ it('should click in OOPIF', async ({ browserName, launchPersistent, server }) =>expect(consoleLog).toContain('ok');});-it('should click bottom row w/ infobar in OOPIF', async ({ browserName, launchPersistent, server }) => {- it.fixme(browserName === 'chromium', 'Click is offset by the infobar height');+it('should click bottom row w/ infobar in OOPIF', async ({ browserName, launchPersistent, server, isWindows }) => {+ it.fixme(browserName === 'chromium' && isWindows, 'Click is offset by the infobar height');server.setRoute('/empty.html', (req, res) => {res.writeHead(200, { 'Content-Type': 'text/html' });diff --git a/tests/library/inspector/cli-codegen-2.spec.ts b/tests/library/inspector/cli-codegen-2.spec.tsindex efde7d52f5..e4aa0a0786 100644--- a/tests/library/inspector/cli-codegen-2.spec.ts+++ b/tests/library/inspector/cli-codegen-2.spec.ts@@ -106,7 +106,6 @@ await page.CloseAsync();`);});test('should upload a single file', async ({ openRecorder, browserName, asset, isLinux }) => {- test.fixme(browserName === 'firefox' && isLinux, 'https://bugzilla.mozilla.org/show_bug.cgi?id=1827551');const { page, recorder } = await openRecorder();await recorder.setContentAndWait(`<form>@@ -137,7 +136,6 @@ await page.GetByRole(AriaRole.Textbox).SetInputFilesAsync(new[] { \"file-to-uplo});test('should upload multiple files', async ({ openRecorder, browserName, asset, isLinux }) => {- test.fixme(browserName === 'firefox' && isLinux, 'https://bugzilla.mozilla.org/show_bug.cgi?id=1827551');const { page, recorder } = await openRecorder();await recorder.setContentAndWait(`<form>@@ -168,7 +166,6 @@ await page.GetByRole(AriaRole.Textbox).SetInputFilesAsync(new[] { \"file-to-uplo});test('should clear files', async ({ openRecorder, browserName, asset, isLinux }) => {- test.fixme(browserName === 'firefox' && isLinux, 'https://bugzilla.mozilla.org/show_bug.cgi?id=1827551');const { page, recorder } = await openRecorder();await recorder.setContentAndWait(`<form>diff --git a/tests/library/permissions.spec.ts b/tests/library/permissions.spec.tsindex 0797a7e18b..f9f7fdd7ce 100644--- a/tests/library/permissions.spec.ts+++ b/tests/library/permissions.spec.ts@@ -176,7 +176,8 @@ it('should support clipboard read', async ({ page, context, server, browserName,it('storage access', {annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/31227' }}, async ({ page, context, server, browserName }) => {- it.fixme(browserName !== 'chromium');+ it.skip(browserName !== 'chromium', 'chromium-only api');+await context.grantPermissions(['storage-access']);expect(await getPermission(page, 'storage-access')).toBe('granted');server.setRoute('/set-cookie.html', (req, res) => {diff --git a/tests/library/popup.spec.ts b/tests/library/popup.spec.tsindex 56865bdb53..1dcede604b 100644--- a/tests/library/popup.spec.ts+++ b/tests/library/popup.spec.ts@@ -262,14 +262,17 @@ it('should not throttle rAF in the opener page', async ({ page, server }) => {});it('should not throw when click closes popup', async ({ browserName, page, server }) => {- it.fixme(browserName === 'firefox');+ it.fixme(browserName === 'firefox', 'locator.click: Target page, context or browser has been closed');+await page.goto(server.EMPTY_PAGE);const [popup] = await Promise.all([page.waitForEvent('popup'),- page.evaluate(() => {+ page.evaluate(async browserName => {const w = window.open('about:blank');+ if (browserName === 'firefox')+ await new Promise(x => w.onload = x);w.document.body.innerHTML = `<button onclick="window.close()">close</button>`;- }),+ }, browserName),]);await popup.getByRole('button').click();});diff --git a/tests/library/trace-viewer.spec.ts b/tests/library/trace-viewer.spec.tsindex f369051a69..0eda4b092a 100644--- a/tests/library/trace-viewer.spec.ts+++ b/tests/library/trace-viewer.spec.ts@@ -1452,18 +1452,18 @@ test.skip('should handle case where neither snapshots nor screenshots exist', as});test('should show only one pointer with multilevel iframes', async ({ page, runAndTrace, server, browserName }) => {- test.fixme(browserName !== 'chromium', 'Elements in iframe are not marked');+ test.fixme(browserName === 'firefox', 'Elements in iframe are not marked');server.setRoute('/level-0.html', (req, res) => {- res.writeHead(200);+ res.writeHead(200, { 'Content-Type': 'text/html' });res.end(`<iframe src="/level-1.html" style="position: absolute; left: 100px"></iframe>`);});server.setRoute('/level-1.html', (req, res) => {- res.writeHead(200);+ res.writeHead(200, { 'Content-Type': 'text/html' });res.end(`<iframe src="/level-2.html"></iframe>`);});server.setRoute('/level-2.html', (req, res) => {- res.writeHead(200);+ res.writeHead(200, { 'Content-Type': 'text/html' });res.end(`<button>Click me</button>`);});diff --git a/tests/page/elementhandle-bounding-box.spec.ts b/tests/page/elementhandle-bounding-box.spec.tsindex 215dce0222..c86d516e19 100644--- a/tests/page/elementhandle-bounding-box.spec.ts+++ b/tests/page/elementhandle-bounding-box.spec.ts@@ -20,8 +20,6 @@ import { test as it, expect } from './pageTest';it.skip(({ isAndroid }) => isAndroid);it('should work', async ({ page, server, browserName, headless, isLinux }) => {- it.fixme(browserName === 'firefox' && !headless && !isLinux);-await page.setViewportSize({ width: 500, height: 500 });await page.goto(server.PREFIX + '/grid.html');const elementHandle = await page.$('.box:nth-of-type(13)');diff --git a/tests/page/elementhandle-wait-for-element-state.spec.ts b/tests/page/elementhandle-wait-for-element-state.spec.tsindex bbccf620c7..ae818339e4 100644--- a/tests/page/elementhandle-wait-for-element-state.spec.ts+++ b/tests/page/elementhandle-wait-for-element-state.spec.ts@@ -113,8 +113,6 @@ it('should wait for button with an aria-disabled parent', async ({ page }) => {});it('should wait for stable position', async ({ page, server, browserName, platform }) => {- it.fixme(browserName === 'firefox' && platform === 'linux');-await page.goto(server.PREFIX + '/input/button.html');const button = await page.$('button');await page.$eval('button', button => {diff --git a/tests/page/expect-misc.spec.ts b/tests/page/expect-misc.spec.tsindex 36aa641510..7bf038231c 100644--- a/tests/page/expect-misc.spec.ts+++ b/tests/page/expect-misc.spec.ts@@ -349,7 +349,6 @@ test.describe('toBeInViewport', () => {});test('should respect ratio option', async ({ page, isAndroid }) => {- test.fixme(isAndroid, 'fails due an upstream bug in Chrome, updating Chrome will fix it.');await page.setContent(`<style>body, div, html { padding: 0; margin: 0; }</style><div id=big style="height: 400vh;"></div>diff --git a/tests/page/frame-evaluate.spec.ts b/tests/page/frame-evaluate.spec.tsindex b7feb2c0d6..16bcf6eac7 100644--- a/tests/page/frame-evaluate.spec.ts+++ b/tests/page/frame-evaluate.spec.ts@@ -133,8 +133,7 @@ it('should be isolated between frames', async ({ page, server }) => {});it('should work in iframes that failed initial navigation', async ({ page, browserName }) => {- it.fail(browserName === 'chromium');- it.fixme(browserName === 'firefox');+ it.fixme(browserName !== 'webkit');// - Firefox does not report domcontentloaded for the iframe.// - Chromium and Firefox report empty url.diff --git a/tests/page/locator-misc-2.spec.ts b/tests/page/locator-misc-2.spec.tsindex eb5765dbf1..b474d4ff2e 100644--- a/tests/page/locator-misc-2.spec.ts+++ b/tests/page/locator-misc-2.spec.ts@@ -111,7 +111,6 @@ it('should take screenshot', async ({ page, server, browserName, headless, isAnd});it('should return bounding box', async ({ page, server, browserName, headless, isAndroid, isLinux }) => {- it.fixme(browserName === 'firefox' && !headless && !isLinux);it.skip(isAndroid);await page.setViewportSize({ width: 500, height: 500 });diff --git a/tests/page/page-click.spec.ts b/tests/page/page-click.spec.tsindex aa02d210eb..c2b024fec1 100644--- a/tests/page/page-click.spec.ts+++ b/tests/page/page-click.spec.ts@@ -336,7 +336,7 @@ it('should click the button inside an iframe', async ({ page, server }) => {});it('should click the button with fixed position inside an iframe', async ({ page, server, browserName }) => {- it.fixme(browserName === 'chromium' || browserName === 'webkit');+ it.fixme(browserName === 'chromium');// @see https://github.com/GoogleChrome/puppeteer/issues/4110// @see https://bugs.chromium.org/p/chromium/issues/detail?id=986390diff --git a/tests/page/page-mouse.spec.ts b/tests/page/page-mouse.spec.tsindex ae8ce84c7b..f93ca4e2e2 100644--- a/tests/page/page-mouse.spec.ts+++ b/tests/page/page-mouse.spec.ts@@ -289,8 +289,7 @@ it('should not crash on mouse drag with any button', async ({ page }) => {it('should dispatch mouse move after context menu was opened', async ({ page, browserName, isWindows }) => {it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/20823' });- it.fixme(browserName === 'firefox');- it.skip(browserName === 'chromium' && isWindows, 'context menu support is best-effort for Linux and MacOS');+ it.fixme(browserName === 'chromium' && isWindows, 'context menu support is best-effort for Linux and MacOS');await page.evaluate(() => {window['contextMenuPromise'] = new Promise(x => {window.addEventListener('contextmenu', x, false);diff --git a/tests/page/selectors-css.spec.ts b/tests/page/selectors-css.spec.tsindex 172493dbea..3c34bd5c55 100644--- a/tests/page/selectors-css.spec.ts+++ b/tests/page/selectors-css.spec.ts@@ -275,7 +275,6 @@ it('should work with :nth-child', async ({ page, server }) => {});it('should work with :nth-child(of) notation with nested functions', async ({ page, browserName, browserMajorVersion }) => {- it.fixme(browserName === 'firefox', 'Should enable once Firefox supports this syntax');it.skip(browserName === 'chromium' && browserMajorVersion < 111, 'https://caniuse.com/css-nth-child-of');await page.setContent(`