From 0764f1f23c5a325994c5de9c0a114ad192d10e9f Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Wed, 22 Sep 2021 15:38:23 -0700 Subject: [PATCH] test: unflake "should close the context without awaiting the failed download" --- tests/download.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/download.spec.ts b/tests/download.spec.ts index a2318fcb6ca37..39a22f5f59698 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) => {