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
tests: fix variety of tests (#9630)
Andrey Lushnikovdddf70cead58
diff --git a/tests/headful.spec.ts b/tests/headful.spec.tsindex fdd19505bd..a1570f770a 100644--- a/tests/headful.spec.ts+++ b/tests/headful.spec.ts@@ -183,7 +183,7 @@ it('Page.bringToFront should work', async ({ browserType, browserOptions }) => {await browser.close();});-it('should click in OOPIF', async ({ browserName, browserType, browserOptions, createUserDataDir, server }) => {+it.skip('should click in OOPIF', async ({ browserName, browserType, browserOptions, createUserDataDir, server }) => {it.fixme(browserName === 'chromium');server.setRoute('/empty.html', (req, res) => {res.writeHead(200, { 'Content-Type': 'text/html' });@@ -204,7 +204,7 @@ it('should click in OOPIF', async ({ browserName, browserType, browserOptions, cexpect(consoleLog).toContain('ok');});-it('should click bottom row w/ infobar in OOPIF', async ({ browserType, browserOptions, createUserDataDir, server }) => {+it.skip('should click bottom row w/ infobar in OOPIF', async ({ browserType, browserOptions, createUserDataDir, server }) => {server.setRoute('/empty.html', (req, res) => {res.writeHead(200, { 'Content-Type': 'text/html' });res.end(`diff --git a/tests/inspector/cli-codegen-1.spec.ts b/tests/inspector/cli-codegen-1.spec.tsindex 4e07ef486b..ed27f426a5 100644--- a/tests/inspector/cli-codegen-1.spec.ts+++ b/tests/inspector/cli-codegen-1.spec.ts@@ -212,7 +212,7 @@ test.describe('cli codegen', () => {// Sanity check that selector does not match our highlight.const divContents = await page.$eval(selector, div => div.outerHTML);- expect(divContents).toBe(`<div onclick="console.log('click')"> Some long text here </div>`);+ expect(divContents.replace(/\s__playwright_target__="[^"]+"/, '')).toBe(`<div onclick="console.log('click')"> Some long text here </div>`);const [message, sources] = await Promise.all([page.waitForEvent('console', msg => msg.type() !== 'error'),diff --git a/tests/page/selectors-css.spec.ts b/tests/page/selectors-css.spec.tsindex 57dea7ff9e..82bcac2969 100644--- a/tests/page/selectors-css.spec.ts+++ b/tests/page/selectors-css.spec.ts@@ -389,7 +389,7 @@ it('should absolutize relative selectors', async ({ page, server }) => {await page.setContent(`<div><span>Hi</span></div>`);expect(await page.$eval('div >> >span', e => e.textContent)).toBe('Hi');expect(await page.locator('div').locator('>span').textContent()).toBe('Hi');- expect(await page.$eval('div:has(> span)', e => e.outerHTML)).toBe('<div><span>Hi</span></div>');+ expect((await page.$eval('div:has(> span)', e => e.outerHTML)).replace(/\s__playwright_target__="[^"]+"/, '')).toBe('<div><span>Hi</span></div>');expect(await page.$('div:has(> div)')).toBe(null);});diff --git a/tests/snapshotter.spec.ts b/tests/snapshotter.spec.tsindex 398e477069..7ebf2245d5 100644--- a/tests/snapshotter.spec.ts+++ b/tests/snapshotter.spec.ts@@ -192,6 +192,7 @@ function distillSnapshot(snapshot) {.replace(/<HTML>/, '').replace(/<\/HTML>/, '').replace(/<HEAD>/, '')+ .replace(/\s__playwright_target__="[^"]+"/, '').replace(/<\/HEAD>/, '').replace(/<BODY>/, '').replace(/<\/BODY>/, '').trim();