diff --git a/tests/download.spec.ts b/tests/download.spec.ts index a2318fcb6c..39a22f5f59 100644 --- a/tests/download.spec.ts +++ b/tests/download.spec.ts @@ -406,7 +406,10 @@ it.describe('download event', () => { page.context().close(), ]); expect(downloadPath).toBe(null); - expect(saveError.message).toContain('File not found on disk. Check download.failure() for details.'); + expect([ + 'download.saveAs: File not found on disk. Check download.failure() for details.', + 'download.saveAs: canceled', + ]).toContain(saveError.message); }); it('should close the context without awaiting the download', async ({browser, server, browserName, platform}, testInfo) => {