mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: unmute the console flush test (#23525)
Closes https://github.com/microsoft/playwright/issues/23107
This commit is contained in:
parent
a7b3c773c4
commit
2200892ac3
@ -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('should not flush console events', async ({ context, page }, testInfo) => {
|
||||||
test.fixme(true, 'https://github.com/microsoft/playwright/issues/23107');
|
const testId = test.info().testId;
|
||||||
await context.tracing.start();
|
await context.tracing.start({ name: testId });
|
||||||
const promise = new Promise<void>(f => {
|
const promise = new Promise<void>(f => {
|
||||||
let counter = 0;
|
let counter = 0;
|
||||||
page.on('console', () => {
|
page.on('console', () => {
|
||||||
@ -662,7 +662,7 @@ test('should not flush console events', async ({ context, page }, testInfo) => {
|
|||||||
|
|
||||||
let content: string;
|
let content: string;
|
||||||
await expect(async () => {
|
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');
|
content = await fs.promises.readFile(path.join(dir, traceName), 'utf8');
|
||||||
expect(content).toContain('page.evaluate');
|
expect(content).toContain('page.evaluate');
|
||||||
expect(content).toContain('31415926');
|
expect(content).toContain('31415926');
|
||||||
@ -672,7 +672,7 @@ test('should not flush console events', async ({ context, page }, testInfo) => {
|
|||||||
await page.evaluate(() => 42);
|
await page.evaluate(() => 42);
|
||||||
|
|
||||||
await expect(async () => {
|
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');
|
const content = await fs.promises.readFile(path.join(dir, traceName), 'utf8');
|
||||||
expect(content).toContain('hello 0');
|
expect(content).toContain('hello 0');
|
||||||
expect(content).toContain('hello 99');
|
expect(content).toContain('hello 99');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user