docs: expand dialog window to BaseWindow
(#43334)
docs: expand dialog window to BaseWindow
This commit is contained in:
parent
b497700e36
commit
d7689bb9b5
3 changed files with 44 additions and 29 deletions
|
@ -1,5 +1,5 @@
|
|||
import { expect } from 'chai';
|
||||
import { dialog, BrowserWindow } from 'electron/main';
|
||||
import { dialog, BaseWindow, BrowserWindow } from 'electron/main';
|
||||
import { closeAllWindows } from './lib/window-helpers';
|
||||
import { ifit } from './lib/spec-helpers';
|
||||
import { setTimeout } from 'node:timers/promises';
|
||||
|
@ -16,6 +16,11 @@ describe('dialog module', () => {
|
|||
const w = new BrowserWindow();
|
||||
dialog.showOpenDialog(w, { title: 'i am title' });
|
||||
}).to.not.throw();
|
||||
|
||||
expect(() => {
|
||||
const w = new BaseWindow();
|
||||
dialog.showOpenDialog(w, { title: 'i am title' });
|
||||
}).to.not.throw();
|
||||
});
|
||||
|
||||
it('throws errors when the options are invalid', () => {
|
||||
|
@ -52,6 +57,11 @@ describe('dialog module', () => {
|
|||
const w = new BrowserWindow();
|
||||
dialog.showSaveDialog(w, { title: 'i am title' });
|
||||
}).to.not.throw();
|
||||
|
||||
expect(() => {
|
||||
const w = new BaseWindow();
|
||||
dialog.showSaveDialog(w, { title: 'i am title' });
|
||||
}).to.not.throw();
|
||||
});
|
||||
|
||||
it('throws errors when the options are invalid', () => {
|
||||
|
@ -93,6 +103,11 @@ describe('dialog module', () => {
|
|||
const w = new BrowserWindow();
|
||||
dialog.showMessageBox(w, { message: 'i am message' });
|
||||
}).to.not.throw();
|
||||
|
||||
expect(() => {
|
||||
const w = new BaseWindow();
|
||||
dialog.showMessageBox(w, { message: 'i am message' });
|
||||
}).to.not.throw();
|
||||
});
|
||||
|
||||
it('throws errors when the options are invalid', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue