chore: improve "Page.close should run beforeunload if asked for" unit test for Firefox (#6995)
This commit is contained in:
parent
5f24f60819
commit
bf60a300e7
@ -67,10 +67,7 @@ describe('Page', function () {
|
|||||||
expect(dialog.type()).toBe('beforeunload');
|
expect(dialog.type()).toBe('beforeunload');
|
||||||
expect(dialog.defaultValue()).toBe('');
|
expect(dialog.defaultValue()).toBe('');
|
||||||
if (isChrome) expect(dialog.message()).toBe('');
|
if (isChrome) expect(dialog.message()).toBe('');
|
||||||
else
|
else expect(dialog.message()).toBeTruthy();
|
||||||
expect(dialog.message()).toBe(
|
|
||||||
'This page is asking you to confirm that you want to leave - data you have entered may not be saved.'
|
|
||||||
);
|
|
||||||
await dialog.accept();
|
await dialog.accept();
|
||||||
await pageClosingPromise;
|
await pageClosingPromise;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user