chore: unmute the console flush test (#23525)

Closes https://github.com/microsoft/playwright/issues/23107
This commit is contained in:
Pavel Feldman 2023-06-05 12:19:25 -07:00 committed by GitHub
parent a7b3c773c4
commit 2200892ac3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<void>(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');