From bf60a300e7e8182bb7149f528f200ab1448b2cdb Mon Sep 17 00:00:00 2001 From: Henrik Skupin Date: Tue, 16 Mar 2021 15:35:32 +0100 Subject: [PATCH] chore: improve "Page.close should run beforeunload if asked for" unit test for Firefox (#6995) --- test/page.spec.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/page.spec.ts b/test/page.spec.ts index ca41d9d2..89664124 100644 --- a/test/page.spec.ts +++ b/test/page.spec.ts @@ -67,10 +67,7 @@ describe('Page', function () { expect(dialog.type()).toBe('beforeunload'); expect(dialog.defaultValue()).toBe(''); if (isChrome) expect(dialog.message()).toBe(''); - else - expect(dialog.message()).toBe( - 'This page is asking you to confirm that you want to leave - data you have entered may not be saved.' - ); + else expect(dialog.message()).toBeTruthy(); await dialog.accept(); await pageClosingPromise; });