flip titles

This commit is contained in:
Simon Knott 2024-10-17 11:33:27 +02:00
parent ccdfeee40e
commit 3389fdd8f1
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC
2 changed files with 2 additions and 4 deletions

View file

@ -445,9 +445,9 @@ function snapshotScript(...targetIds: (string | undefined)[]) {
if (xEnd > 1 || yEnd > 1) {
if (xStart > 1 || yStart > 1)
canvas.title = `Playwright couldn't capture full canvas contents because it's located partially outside the viewport.`;
else
canvas.title = `Playwright couldn't capture canvas contents because it's located outside the viewport.`;
else
canvas.title = `Playwright couldn't capture full canvas contents because it's located partially outside the viewport.`;
} else {
canvas.title = `Canvas contents are displayed on a best-effort basis based on viewport screenshots taken during test execution.`;
}

View file

@ -1445,8 +1445,6 @@ test('canvas clipping', async ({ runAndTrace, page, server }) => {
await page.waitForTimeout(1000); // ensure we could take a screenshot
});
await traceViewer.page.pause();
const msg = await traceViewer.page.waitForEvent('console', { predicate: msg => msg.text().startsWith('canvas drawn:') });
expect(msg.text()).toEqual('canvas drawn: [0,91,12,111]');