Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
test: unflake some more tests (#27546)
Dmitry Gozmana5be8ce86a31
diff --git a/tests/library/tracing.spec.ts b/tests/library/tracing.spec.tsindex 9ac0eba2e8..2c85afbd28 100644--- a/tests/library/tracing.spec.ts+++ b/tests/library/tracing.spec.ts@@ -487,6 +487,7 @@ test('should work with multiple chunks', async ({ context, page, server }, testIawait page.setContent('<button>Click</button>');await page.click('"Click"');page.click('"ClickNoButton"', { timeout: 0 }).catch(() => {});+ await page.evaluate(() => {});await context.tracing.stopChunk({ path: testInfo.outputPath('trace.zip') });await context.tracing.startChunk();@@ -503,6 +504,7 @@ test('should work with multiple chunks', async ({ context, page, server }, testI'page.setContent','page.click','page.click',+ 'page.evaluate',]);expect(trace1.events.some(e => e.type === 'frame-snapshot')).toBeTruthy();expect(trace1.events.some(e => e.type === 'resource-snapshot' && e.snapshot.request.url.endsWith('style.css'))).toBeTruthy();diff --git a/tests/page/page-screenshot.spec.ts b/tests/page/page-screenshot.spec.tsindex 7985bf2fb5..1b4bb17169 100644--- a/tests/page/page-screenshot.spec.ts+++ b/tests/page/page-screenshot.spec.ts@@ -817,8 +817,8 @@ it.describe('page screenshot animations', () => {// Ensure CSS animation is finite.expect(await div.evaluate(async el => Number.isFinite(el.getAnimations()[0].effect.getComputedTiming().endTime))).toBe(true);await Promise.all([- page.screenshot({ animations: 'disabled' }),page.waitForEvent('console', msg => msg.text() === 'animationend'),+ page.screenshot({ animations: 'disabled' }),]);expect(await page.evaluate(() => window._EVENTS)).toEqual(['onfinish', 'animationend'