fix: close all open sheets before closing window on macOS (#43952)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Beutner <beutner.john@gmail.com>
This commit is contained in:
trop[bot] 2024-09-25 13:30:56 -05:00 committed by GitHub
parent 0ffafbc295
commit 53cc8aef9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

View file

@ -116,6 +116,14 @@ describe('BrowserWindow module', () => {
await closed;
});
it('should work if called when multiple messageBoxes are showing', async () => {
const closed = once(w, 'closed');
dialog.showMessageBox(w, { message: 'Hello Error' });
dialog.showMessageBox(w, { message: 'Hello Error' });
w.close();
await closed;
});
it('closes window without rounded corners', async () => {
await closeWindow(w);
w = new BrowserWindow({ show: false, frame: false, roundedCorners: false });