add first test

This commit is contained in:
Simon Knott 2024-09-06 10:28:41 +02:00
parent 0430b84841
commit b4d60deb74
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -1465,3 +1465,13 @@ test('should serve css without content-type', async ({ page, runAndTrace, server
const snapshotFrame = await traceViewer.snapshotFrame('page.goto');
await expect(snapshotFrame.locator('body')).toHaveCSS('background-color', 'rgb(255, 0, 0)', { timeout: 0 });
});
test('should allow showing screenshots instead of snapshots', async ({ runAndTrace, page, server }) => {
const traceViewer = await runAndTrace(async () => {
await page.goto(server.PREFIX + '/one-style.html');
});
const snapshotFrame = await traceViewer.snapshotFrame('page.goto');
await expect(snapshotFrame.locator('body')).toHaveCSS('background-color', 'pink', { timeout: 0 });
});