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: fix some failing locators tests (#7989)
Max Schmitt3e491114f20a
diff --git a/src/utils/dependencies.ts b/src/utils/dependencies.tsindex 2bfd2cbf8e..c5052fb251 100644--- a/src/utils/dependencies.ts+++ b/src/utils/dependencies.ts@@ -393,6 +393,7 @@ const LIBRARY_TO_PACKAGE_NAME_UBUNTU_20_04: { [s: string]: string} = {'libdrm.so.2': 'libdrm2','libEGL.so.1': 'libegl1','libenchant.so.1': 'libenchant1c2a',+ 'libevdev.so.2': 'libevdev2','libepoxy.so.0': 'libepoxy0','libfontconfig.so.1': 'libfontconfig1','libfreetype.so.6': 'libfreetype6',diff --git a/tests/page/locator-convenience.spec.ts b/tests/page/locator-convenience.spec.tsindex e9f146268c..f06769383f 100644--- a/tests/page/locator-convenience.spec.ts+++ b/tests/page/locator-convenience.spec.ts@@ -103,9 +103,9 @@ it('textContent should be atomic', async ({ playwright, page }) => {return result;}});- await playwright.selectors.register('textContent', createDummySelector);+ await playwright.selectors.register('textContentFromLocators', createDummySelector);await page.setContent(`<div>Hello</div>`);- const tc = await page.textContent('textContent=div');+ const tc = await page.textContent('textContentFromLocators=div');expect(tc).toBe('Hello');expect(await page.evaluate(() => document.querySelector('div').textContent)).toBe('modified');});diff --git a/tests/page/locator-misc-2.spec.ts b/tests/page/locator-misc-2.spec.tsindex 81da5b67d7..b20017f70a 100644--- a/tests/page/locator-misc-2.spec.ts+++ b/tests/page/locator-misc-2.spec.ts@@ -72,8 +72,9 @@ it('should take screenshot', async ({ page, server, browserName, headless, isAndexpect(screenshot).toMatchSnapshot('screenshot-element-bounding-box.png');});-it('should return bounding box', async ({ page, server, browserName, headless }) => {+it('should return bounding box', async ({ page, server, browserName, headless, isAndroid }) => {it.fail(browserName === 'firefox' && !headless);+ it.skip(isAndroid);await page.setViewportSize({ width: 500, height: 500 });await page.goto(server.PREFIX + '/grid.html');diff --git a/tests/page/locator-misc-2.spec.ts-snapshots/screenshot-element-bounding-box-firefox.png b/tests/page/locator-misc-2.spec.ts-snapshots/screenshot-element-bounding-box-firefox.pngnew file mode 100644index 0000000000..9e208f86d8Binary files /dev/null and b/tests/page/locator-misc-2.spec.ts-snapshots/screenshot-element-bounding-box-firefox.png differdiff --git a/tests/page/locator-misc-2.spec.ts-snapshots/screenshot-element-bounding-box-webkit.png b/tests/page/locator-misc-2.spec.ts-snapshots/screenshot-element-bounding-box-webkit.pngnew file mode 100644index 0000000000..dea5418facBinary files /dev/null and b/tests/page/locator-misc-2.spec.ts-snapshots/screenshot-element-bounding-box-webkit.png differ