fix: unify BrowserWindow.isVisible()
logic cross-platform (#38242)
This commit is contained in:
parent
9bd9d312f8
commit
e83197669c
4 changed files with 23 additions and 5 deletions
|
@ -1095,6 +1095,18 @@ describe('BrowserWindow module', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('BrowserWindow.minimize()', () => {
|
||||
// TODO(codebytere): Enable for Linux once maximize/minimize events work in CI.
|
||||
ifit(process.platform !== 'linux')('should not be visible when the window is minimized', async () => {
|
||||
const minimize = once(w, 'minimize');
|
||||
w.minimize();
|
||||
await minimize;
|
||||
|
||||
expect(w.isMinimized()).to.equal(true);
|
||||
expect(w.isVisible()).to.equal(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('BrowserWindow.showInactive()', () => {
|
||||
it('should not focus on window', () => {
|
||||
w.showInactive();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue