fix: multiple dock icons when calling dock.show/hide (#25269)
* fix: mulitple dock icons when calling dock.show/hide * test: run dock.show tests after dock.hide tests
This commit is contained in:
parent
bda6378685
commit
43485b8705
3 changed files with 26 additions and 7 deletions
|
@ -1437,6 +1437,16 @@ describe('app module', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('dock.hide', () => {
|
||||
it('should not throw', () => {
|
||||
app.dock.hide();
|
||||
expect(app.dock.isVisible()).to.equal(false);
|
||||
});
|
||||
});
|
||||
|
||||
// Note that dock.show tests should run after dock.hide tests, to work
|
||||
// around a bug of macOS.
|
||||
// See https://github.com/electron/electron/pull/25269 for more.
|
||||
describe('dock.show', () => {
|
||||
it('should not throw', () => {
|
||||
return app.dock.show().then(() => {
|
||||
|
@ -1452,13 +1462,6 @@ describe('app module', () => {
|
|||
await expect(app.dock.show()).to.eventually.be.fulfilled.equal(undefined);
|
||||
});
|
||||
});
|
||||
|
||||
describe('dock.hide', () => {
|
||||
it('should not throw', () => {
|
||||
app.dock.hide();
|
||||
expect(app.dock.isVisible()).to.equal(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('whenReady', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue