From a9c91b0703850973fdfc97a80f2e7feffb363d90 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Fri, 19 Feb 2021 10:54:05 -0800 Subject: [PATCH] test: fix test sanitization (#5515) This was regressed in https://github.com/microsoft/playwright/pull/5502 Three pause tests are broken: https://devops.aslushnikov.com/flakiness2.html#timestamp=1613756319661 --- test/pause.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/pause.spec.ts b/test/pause.spec.ts index db3340c074..609ee0b395 100644 --- a/test/pause.spec.ts +++ b/test/pause.spec.ts @@ -234,7 +234,7 @@ describe('pause', (suite, { mode }) => { async function sanitizeLog(recorderPage: Page): Promise { const results = []; for (const entry of await recorderPage.$$('.call-log-call')) { - const header = await (await (await entry.$('.call-log-call-header')).textContent()).replace(/— \d+(ms|s)/, '- XXms'); + const header = await (await (await entry.$('.call-log-call-header')).textContent()).replace(/— \d+(\.\d+)?(ms|s)/, '- XXms'); results.push(header); results.push(...await entry.$$eval('.call-log-message', ee => ee.map(e => e.textContent))); const errorElement = await entry.$('.call-log-error');