From 3bf42ce163c55218661e782d4dbc61b7d3b09be1 Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Thu, 6 Oct 2022 10:12:22 -0700 Subject: [PATCH] cherry-pick(#17864): test: fix "getByText should work" with tracing enabled, docker smoke tests (#17883) --- package.json | 2 +- tests/page/selectors-get-by.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index cc1a0c874eb3f..7f136f4175467 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/tests/page/selectors-get-by.spec.ts b/tests/page/selectors-get-by.spec.ts index 21210681ce426..63510c10074f2 100644 --- a/tests/page/selectors-get-by.spec.ts +++ b/tests/page/selectors-get-by.spec.ts @@ -38,7 +38,7 @@ it('getByText should work', async ({ page }) => { expect(await page.getByText('ye', { exact: true }).first().evaluate(e => e.outerHTML)).toContain('> ye '); await page.setContent(`
Hello world
Hello
`); - expect(await page.getByText('Hello', { exact: true }).evaluate(e => e.outerHTML)).toBe('
Hello
'); + expect(await page.getByText('Hello', { exact: true }).evaluate(e => e.outerHTML)).toContain('>Hello'); }); it('getByLabel should work', async ({ page }) => {