test: unflake "should close the context without awaiting the failed download" (#9094)

This commit is contained in:
Dmitry Gozman 2021-09-22 17:28:17 -07:00 committed by GitHub
parent de4aa50d55
commit 1bebbc31b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) => {