Skip to content

Commit

Permalink
rafraf
Browse files Browse the repository at this point in the history
  • Loading branch information
Skn0tt committed Oct 18, 2024
1 parent ea4116e commit 5d4d73d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/library/trace-viewer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import path from 'path';
import { pathToFileURL } from 'url';
import { expect, playwrightTest } from '../config/browserTest';
import type { FrameLocator } from '@playwright/test';
import { rafraf } from 'tests/page/pageTest';

const test = playwrightTest.extend<TraceViewerFixtures>(traceViewerFixtures);

Expand Down Expand Up @@ -1442,7 +1443,7 @@ test.skip('should allow showing screenshots instead of snapshots', async ({ runA
test('canvas clipping', async ({ runAndTrace, page, server }) => {
const traceViewer = await runAndTrace(async () => {
await page.goto(server.PREFIX + '/screenshots/canvas.html#canvas-on-edge');
await page.waitForTimeout(1000); // ensure we could take a screenshot
await rafraf(page, 5);
});

const msg = await traceViewer.page.waitForEvent('console', { predicate: msg => msg.text().startsWith('canvas drawn:') });
Expand All @@ -1457,7 +1458,7 @@ test('canvas clipping in iframe', async ({ runAndTrace, page, server }) => {
await page.setContent(`
<iframe src="${server.PREFIX}/screenshots/canvas.html#canvas-on-edge"></iframe>
`);
await page.waitForTimeout(1000); // ensure we could take a screenshot
await rafraf(page, 5);
});

const snapshot = await traceViewer.snapshotFrame('page.waitForTimeout');
Expand Down

0 comments on commit 5d4d73d

Please sign in to comment.