test: fix "getByText should work" with tracing enabled, docker smoke tests (#17864)

This commit is contained in:
Dmitry Gozman 2022-10-05 21:31:25 -07:00 committed by GitHub
parent c0e4caa604
commit a23ee6f14d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@
},
"license": "Apache-2.0",
"scripts": {
"dtest": "cross-env PLAYWRIGHT_DOCKER=1 playwright docker --config=tests/library/playwright.config.ts --grep '@smoke'",
"dtest": "cross-env PLAYWRIGHT_DOCKER=1 playwright test --config=tests/library/playwright.config.ts --grep '@smoke'",
"ctest": "playwright test --config=tests/library/playwright.config.ts --project=chromium",
"ftest": "playwright test --config=tests/library/playwright.config.ts --project=firefox",
"wtest": "playwright test --config=tests/library/playwright.config.ts --project=webkit",

View File

@ -38,7 +38,7 @@ it('getByText should work', async ({ page }) => {
expect(await page.getByText('ye', { exact: true }).first().evaluate(e => e.outerHTML)).toContain('> ye </div>');
await page.setContent(`<div>Hello world</div><div>Hello</div>`);
expect(await page.getByText('Hello', { exact: true }).evaluate(e => e.outerHTML)).toBe('<div>Hello</div>');
expect(await page.getByText('Hello', { exact: true }).evaluate(e => e.outerHTML)).toContain('>Hello</div>');
});
it('getByLabel should work', async ({ page }) => {