Skip to content

Commit

Permalink
test: add an extra resize test
Browse files Browse the repository at this point in the history
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
  • Loading branch information
trop[bot] and codebytere committed Aug 25, 2023
1 parent 045facf commit 22fbf05
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions spec/api-browser-window-spec.ts
Expand Up @@ -5042,18 +5042,38 @@ describe('BrowserWindow module', () => {
it('does not open non-fullscreenable child windows in fullscreen if parent is fullscreen', async () => {
const w = new BrowserWindow();

const enterFS = once(w, 'enter-full-screen');
const enterFS = emittedOnce(w, 'enter-full-screen');
w.setFullScreen(true);
await enterFS;

const child = new BrowserWindow({ parent: w, resizable: false, fullscreenable: false });
const shown = once(child, 'show');
const shown = emittedOnce(child, 'show');
await shown;

expect(child.resizable).to.be.false('resizable');
expect(child.fullScreen).to.be.false('fullscreen');
expect(child.fullScreenable).to.be.false('fullscreenable');
});

it('is set correctly with different resizable values', async () => {
const w1 = new BrowserWindow({
resizable: false,
fullscreenable: false
});

const w2 = new BrowserWindow({
resizable: true,
fullscreenable: false
});

const w3 = new BrowserWindow({
fullscreenable: false
});

expect(w1.isFullScreenable()).to.be.false('isFullScreenable');
expect(w2.isFullScreenable()).to.be.false('isFullScreenable');
expect(w3.isFullScreenable()).to.be.false('isFullScreenable');
});
});

ifdescribe(process.platform === 'darwin')('isHiddenInMissionControl state', () => {
Expand Down

0 comments on commit 22fbf05

Please sign in to comment.