test: fix some failing locators tests (#7989)

This commit is contained in:
Max Schmitt 2021-08-04 23:36:27 +02:00 committed by GitHub
parent 8a7cfc08a6
commit 3e491114f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 3 deletions

View File

@ -393,6 +393,7 @@ const LIBRARY_TO_PACKAGE_NAME_UBUNTU_20_04: { [s: string]: string} = {
'libdrm.so.2': 'libdrm2', 'libdrm.so.2': 'libdrm2',
'libEGL.so.1': 'libegl1', 'libEGL.so.1': 'libegl1',
'libenchant.so.1': 'libenchant1c2a', 'libenchant.so.1': 'libenchant1c2a',
'libevdev.so.2': 'libevdev2',
'libepoxy.so.0': 'libepoxy0', 'libepoxy.so.0': 'libepoxy0',
'libfontconfig.so.1': 'libfontconfig1', 'libfontconfig.so.1': 'libfontconfig1',
'libfreetype.so.6': 'libfreetype6', 'libfreetype.so.6': 'libfreetype6',

View File

@ -103,9 +103,9 @@ it('textContent should be atomic', async ({ playwright, page }) => {
return result; return result;
} }
}); });
await playwright.selectors.register('textContent', createDummySelector); await playwright.selectors.register('textContentFromLocators', createDummySelector);
await page.setContent(`<div>Hello</div>`); 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(tc).toBe('Hello');
expect(await page.evaluate(() => document.querySelector('div').textContent)).toBe('modified'); expect(await page.evaluate(() => document.querySelector('div').textContent)).toBe('modified');
}); });

View File

@ -72,8 +72,9 @@ it('should take screenshot', async ({ page, server, browserName, headless, isAnd
expect(screenshot).toMatchSnapshot('screenshot-element-bounding-box.png'); expect(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.fail(browserName === 'firefox' && !headless);
it.skip(isAndroid);
await page.setViewportSize({ width: 500, height: 500 }); await page.setViewportSize({ width: 500, height: 500 });
await page.goto(server.PREFIX + '/grid.html'); await page.goto(server.PREFIX + '/grid.html');

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 633 B