Skip to content

Commit

Permalink
Only resolve 'hasDialog' to true for the 'beforeunload' type
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Feb 9, 2024
1 parent 4162963 commit a05a995
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/e2e/specs/editor/various/change-detection.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ class ChangeDetectionUtils {
const hasDialog = new Promise( ( resolve ) => {
this.#page.on( 'dialog', ( dialog ) => {
void dialog.accept();
resolve( true );
resolve( dialog.type() === 'beforeunload' );
} );
this.#page.on( 'load', () => resolve( false ) );
} );
Expand Down

0 comments on commit a05a995

Please sign in to comment.