mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
test: unflake some more tests (#27546)
This commit is contained in:
parent
ebd0ff9422
commit
a5be8ce86a
@ -487,6 +487,7 @@ test('should work with multiple chunks', async ({ context, page, server }, testI
|
|||||||
await page.setContent('<button>Click</button>');
|
await page.setContent('<button>Click</button>');
|
||||||
await page.click('"Click"');
|
await page.click('"Click"');
|
||||||
page.click('"ClickNoButton"', { timeout: 0 }).catch(() => {});
|
page.click('"ClickNoButton"', { timeout: 0 }).catch(() => {});
|
||||||
|
await page.evaluate(() => {});
|
||||||
await context.tracing.stopChunk({ path: testInfo.outputPath('trace.zip') });
|
await context.tracing.stopChunk({ path: testInfo.outputPath('trace.zip') });
|
||||||
|
|
||||||
await context.tracing.startChunk();
|
await context.tracing.startChunk();
|
||||||
@ -503,6 +504,7 @@ test('should work with multiple chunks', async ({ context, page, server }, testI
|
|||||||
'page.setContent',
|
'page.setContent',
|
||||||
'page.click',
|
'page.click',
|
||||||
'page.click',
|
'page.click',
|
||||||
|
'page.evaluate',
|
||||||
]);
|
]);
|
||||||
expect(trace1.events.some(e => e.type === 'frame-snapshot')).toBeTruthy();
|
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();
|
expect(trace1.events.some(e => e.type === 'resource-snapshot' && e.snapshot.request.url.endsWith('style.css'))).toBeTruthy();
|
||||||
|
@ -817,8 +817,8 @@ it.describe('page screenshot animations', () => {
|
|||||||
// Ensure CSS animation is finite.
|
// Ensure CSS animation is finite.
|
||||||
expect(await div.evaluate(async el => Number.isFinite(el.getAnimations()[0].effect.getComputedTiming().endTime))).toBe(true);
|
expect(await div.evaluate(async el => Number.isFinite(el.getAnimations()[0].effect.getComputedTiming().endTime))).toBe(true);
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
page.screenshot({ animations: 'disabled' }),
|
|
||||||
page.waitForEvent('console', msg => msg.text() === 'animationend'),
|
page.waitForEvent('console', msg => msg.text() === 'animationend'),
|
||||||
|
page.screenshot({ animations: 'disabled' }),
|
||||||
]);
|
]);
|
||||||
expect(await page.evaluate(() => window._EVENTS)).toEqual([
|
expect(await page.evaluate(() => window._EVENTS)).toEqual([
|
||||||
'onfinish', 'animationend'
|
'onfinish', 'animationend'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user