dx: avoid reporting errors when a screenshot is missing

Massimo Melina committed May 1, 2026 at 10:11 UTC 0126dfcf9018daa5e3d2615e073c22fb5646be88
2 files changed +3 -1
e2e/serial.spec.ts
+2 -1
@@ -34,7 +34,7 @@ test('upload1', async ({ page, context, browserName }) => {
34 await page.getByRole('button', { name: 'Pick files' }).click();
35 const fileChooser = await fileChooserPromise;
36 await fileChooser.setFiles(fileToUpload);
37 - // can't do without. I tried using route.continue, but i can't send half-body keeping the full content-length, and i also cannot pass a stream (to throttle)
37 + // can't do without cdp to slow down the upload. I tried using route.continue, but i can't send half-body keeping the full content-length, and i also cannot pass a stream (to throttle)
38 const cdpSession = await context.newCDPSession(page)
39 await cdpSession.send('Network.emulateNetworkConditions', NETWORK_PRESETS.Regular2G)
40 await page.getByRole('button', { name: 'Edit' }).click();
@@ -44,6 +44,7 @@ test('upload1', async ({ page, context, browserName }) => {
44 await renameInput.fill(uploadName);
45 await renameDialog.getByRole('button', { name: 'Continue' }).click();
46 await expect(page.getByText(uploadName)).toBeVisible() // rename was effective
47 + // we send the upload, slowly, so that we can interrupt it in the admin-panel to test the upload resume
48 await page.getByRole('button', { name: 'Send 1 file' }).click();
49 const uploadCells = pageAdmin.getByRole('cell', { name: `${uploadName} /for-admins/upload` })
50 await expect(uploadCells.first()).toBeVisible()
playwright.config.ts
+1
@@ -26,6 +26,7 @@ export default defineConfig({
26 fullyParallel: true, // Run tests in files in parallel
27 forbidOnly: !!process.env.CI, // Fail the build on CI if you accidentally left test.only in the source code.
28 retries: process.env.CI ? 2 : 0, // Retry on CI only
29 + updateSnapshots: 'missing', // keep new baseline screenshots from failing the run; existing screenshots still compare normally
30 //workers: process.env.CI ? 1 : undefined, // Opt out of parallel tests on CI.
31 reporter: 'html', // Reporter to use. See https://playwright.dev/docs/test-reporters
32 use: { // Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions.