From 2200892ac327fcaf54a7654c04cd7a01b5ce8cd2 Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Mon, 5 Jun 2023 12:19:25 -0700 Subject: [PATCH] chore: unmute the console flush test (#23525) Closes https://github.com/microsoft/playwright/issues/23107 --- tests/library/tracing.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/library/tracing.spec.ts b/tests/library/tracing.spec.ts index 34ee8d5f22..1d5300269c 100644 --- a/tests/library/tracing.spec.ts +++ b/tests/library/tracing.spec.ts @@ -638,8 +638,8 @@ test('should store postData for global request', async ({ request, server }, tes }); test('should not flush console events', async ({ context, page }, testInfo) => { - test.fixme(true, 'https://github.com/microsoft/playwright/issues/23107'); - await context.tracing.start(); + const testId = test.info().testId; + await context.tracing.start({ name: testId }); const promise = new Promise(f => { let counter = 0; page.on('console', () => { @@ -662,7 +662,7 @@ test('should not flush console events', async ({ context, page }, testInfo) => { let content: string; await expect(async () => { - const traceName = fs.readdirSync(dir).find(name => name.endsWith('.trace')); + const traceName = fs.readdirSync(dir).find(name => name.endsWith(testId + '.trace')); content = await fs.promises.readFile(path.join(dir, traceName), 'utf8'); expect(content).toContain('page.evaluate'); expect(content).toContain('31415926'); @@ -672,7 +672,7 @@ test('should not flush console events', async ({ context, page }, testInfo) => { await page.evaluate(() => 42); await expect(async () => { - const traceName = fs.readdirSync(dir).find(name => name.endsWith('.trace')); + const traceName = fs.readdirSync(dir).find(name => name.endsWith(testId + '.trace')); const content = await fs.promises.readFile(path.join(dir, traceName), 'utf8'); expect(content).toContain('hello 0'); expect(content).toContain('hello 99');