fix: enable some tests that were accidentally disabled (#46844)
* fix: tests that were not run in api-app-spec due to nested it() Co-authored-by: Charles Kerr <charles@charleskerr.com> * fix: tests that were not run in api-browser-window-spec due to nested it() Co-authored-by: Charles Kerr <charles@charleskerr.com> * chore: annotate disabled test Co-authored-by: Charles Kerr <charles@charleskerr.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
643b35503f
commit
77b945dd0a
2 changed files with 24 additions and 23 deletions
|
@ -84,7 +84,7 @@ describe('app module', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('app name APIs', () => {
|
describe('app name APIs', () => {
|
||||||
it('with properties', () => {
|
describe('with properties', () => {
|
||||||
it('returns the name field of package.json', () => {
|
it('returns the name field of package.json', () => {
|
||||||
expect(app.name).to.equal('Electron Test Main');
|
expect(app.name).to.equal('Electron Test Main');
|
||||||
});
|
});
|
||||||
|
@ -98,7 +98,7 @@ describe('app module', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('with functions', () => {
|
describe('with functions', () => {
|
||||||
it('returns the name field of package.json', () => {
|
it('returns the name field of package.json', () => {
|
||||||
expect(app.getName()).to.equal('Electron Test Main');
|
expect(app.getName()).to.equal('Electron Test Main');
|
||||||
});
|
});
|
||||||
|
@ -988,7 +988,7 @@ describe('app module', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('with functions', () => {
|
describe('with functions', () => {
|
||||||
it('can set accessibility support enabled', () => {
|
it('can set accessibility support enabled', () => {
|
||||||
expect(app.isAccessibilitySupportEnabled()).to.eql(false);
|
expect(app.isAccessibilitySupportEnabled()).to.eql(false);
|
||||||
|
|
||||||
|
|
|
@ -2102,13 +2102,14 @@ describe('BrowserWindow module', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
ifdescribe(process.platform === 'win32')('Fullscreen state', () => {
|
ifdescribe(process.platform === 'win32')('Fullscreen state', () => {
|
||||||
it('with properties', () => {
|
describe('with properties', () => {
|
||||||
it('can be set with the fullscreen constructor option', () => {
|
it('can be set with the fullscreen constructor option', () => {
|
||||||
w = new BrowserWindow({ fullscreen: true });
|
w = new BrowserWindow({ fullscreen: true });
|
||||||
expect(w.fullScreen).to.be.true();
|
expect(w.fullScreen).to.be.true();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('does not go fullscreen if roundedCorners are enabled', async () => {
|
// FIXME: this test needs to be fixed and re-enabled.
|
||||||
|
it.skip('does not go fullscreen if roundedCorners are enabled', async () => {
|
||||||
w = new BrowserWindow({ frame: false, roundedCorners: false, fullscreen: true });
|
w = new BrowserWindow({ frame: false, roundedCorners: false, fullscreen: true });
|
||||||
expect(w.fullScreen).to.be.false();
|
expect(w.fullScreen).to.be.false();
|
||||||
});
|
});
|
||||||
|
@ -2186,7 +2187,7 @@ describe('BrowserWindow module', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('with functions', () => {
|
describe('with functions', () => {
|
||||||
it('can be set with the fullscreen constructor option', () => {
|
it('can be set with the fullscreen constructor option', () => {
|
||||||
w = new BrowserWindow({ fullscreen: true });
|
w = new BrowserWindow({ fullscreen: true });
|
||||||
expect(w.isFullScreen()).to.be.true();
|
expect(w.isFullScreen()).to.be.true();
|
||||||
|
@ -5434,7 +5435,7 @@ describe('BrowserWindow module', () => {
|
||||||
afterEach(closeAllWindows);
|
afterEach(closeAllWindows);
|
||||||
|
|
||||||
describe('movable state', () => {
|
describe('movable state', () => {
|
||||||
it('with properties', () => {
|
describe('with properties', () => {
|
||||||
it('can be set with movable constructor option', () => {
|
it('can be set with movable constructor option', () => {
|
||||||
const w = new BrowserWindow({ show: false, movable: false });
|
const w = new BrowserWindow({ show: false, movable: false });
|
||||||
expect(w.movable).to.be.false('movable');
|
expect(w.movable).to.be.false('movable');
|
||||||
|
@ -5450,7 +5451,7 @@ describe('BrowserWindow module', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('with functions', () => {
|
describe('with functions', () => {
|
||||||
it('can be set with movable constructor option', () => {
|
it('can be set with movable constructor option', () => {
|
||||||
const w = new BrowserWindow({ show: false, movable: false });
|
const w = new BrowserWindow({ show: false, movable: false });
|
||||||
expect(w.isMovable()).to.be.false('movable');
|
expect(w.isMovable()).to.be.false('movable');
|
||||||
|
@ -5468,7 +5469,7 @@ describe('BrowserWindow module', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
ifdescribe(process.platform === 'darwin')('documentEdited state', () => {
|
ifdescribe(process.platform === 'darwin')('documentEdited state', () => {
|
||||||
it('with properties', () => {
|
describe('with properties', () => {
|
||||||
it('can be changed', () => {
|
it('can be changed', () => {
|
||||||
const w = new BrowserWindow({ show: false });
|
const w = new BrowserWindow({ show: false });
|
||||||
expect(w.documentEdited).to.be.false();
|
expect(w.documentEdited).to.be.false();
|
||||||
|
@ -5477,7 +5478,7 @@ describe('BrowserWindow module', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('with functions', () => {
|
describe('with functions', () => {
|
||||||
it('can be changed', () => {
|
it('can be changed', () => {
|
||||||
const w = new BrowserWindow({ show: false });
|
const w = new BrowserWindow({ show: false });
|
||||||
expect(w.isDocumentEdited()).to.be.false();
|
expect(w.isDocumentEdited()).to.be.false();
|
||||||
|
@ -5508,7 +5509,7 @@ describe('BrowserWindow module', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('native window title', () => {
|
describe('native window title', () => {
|
||||||
it('with properties', () => {
|
describe('with properties', () => {
|
||||||
it('can be set with title constructor option', () => {
|
it('can be set with title constructor option', () => {
|
||||||
const w = new BrowserWindow({ show: false, title: 'mYtItLe' });
|
const w = new BrowserWindow({ show: false, title: 'mYtItLe' });
|
||||||
expect(w.title).to.eql('mYtItLe');
|
expect(w.title).to.eql('mYtItLe');
|
||||||
|
@ -5522,7 +5523,7 @@ describe('BrowserWindow module', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('with functions', () => {
|
describe('with functions', () => {
|
||||||
it('can be set with minimizable constructor option', () => {
|
it('can be set with minimizable constructor option', () => {
|
||||||
const w = new BrowserWindow({ show: false, title: 'mYtItLe' });
|
const w = new BrowserWindow({ show: false, title: 'mYtItLe' });
|
||||||
expect(w.getTitle()).to.eql('mYtItLe');
|
expect(w.getTitle()).to.eql('mYtItLe');
|
||||||
|
@ -5538,7 +5539,7 @@ describe('BrowserWindow module', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('minimizable state', () => {
|
describe('minimizable state', () => {
|
||||||
it('with properties', () => {
|
describe('with properties', () => {
|
||||||
it('can be set with minimizable constructor option', () => {
|
it('can be set with minimizable constructor option', () => {
|
||||||
const w = new BrowserWindow({ show: false, minimizable: false });
|
const w = new BrowserWindow({ show: false, minimizable: false });
|
||||||
expect(w.minimizable).to.be.false('minimizable');
|
expect(w.minimizable).to.be.false('minimizable');
|
||||||
|
@ -5554,7 +5555,7 @@ describe('BrowserWindow module', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('with functions', () => {
|
describe('with functions', () => {
|
||||||
it('can be set with minimizable constructor option', () => {
|
it('can be set with minimizable constructor option', () => {
|
||||||
const w = new BrowserWindow({ show: false, minimizable: false });
|
const w = new BrowserWindow({ show: false, minimizable: false });
|
||||||
expect(w.isMinimizable()).to.be.false('movable');
|
expect(w.isMinimizable()).to.be.false('movable');
|
||||||
|
@ -5640,7 +5641,7 @@ describe('BrowserWindow module', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
ifdescribe(process.platform === 'win32')('maximizable state', () => {
|
ifdescribe(process.platform === 'win32')('maximizable state', () => {
|
||||||
it('with properties', () => {
|
describe('with properties', () => {
|
||||||
it('is reset to its former state', () => {
|
it('is reset to its former state', () => {
|
||||||
const w = new BrowserWindow({ show: false });
|
const w = new BrowserWindow({ show: false });
|
||||||
w.maximizable = false;
|
w.maximizable = false;
|
||||||
|
@ -5654,7 +5655,7 @@ describe('BrowserWindow module', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('with functions', () => {
|
describe('with functions', () => {
|
||||||
it('is reset to its former state', () => {
|
it('is reset to its former state', () => {
|
||||||
const w = new BrowserWindow({ show: false });
|
const w = new BrowserWindow({ show: false });
|
||||||
w.setMaximizable(false);
|
w.setMaximizable(false);
|
||||||
|
@ -5767,7 +5768,7 @@ describe('BrowserWindow module', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
ifdescribe(process.platform === 'darwin')('fullscreenable state', () => {
|
ifdescribe(process.platform === 'darwin')('fullscreenable state', () => {
|
||||||
it('with functions', () => {
|
describe('with functions', () => {
|
||||||
it('can be set with fullscreenable constructor option', () => {
|
it('can be set with fullscreenable constructor option', () => {
|
||||||
const w = new BrowserWindow({ show: false, fullscreenable: false });
|
const w = new BrowserWindow({ show: false, fullscreenable: false });
|
||||||
expect(w.isFullScreenable()).to.be.false('isFullScreenable');
|
expect(w.isFullScreenable()).to.be.false('isFullScreenable');
|
||||||
|
@ -5834,7 +5835,7 @@ describe('BrowserWindow module', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
ifdescribe(process.platform === 'darwin')('isHiddenInMissionControl state', () => {
|
ifdescribe(process.platform === 'darwin')('isHiddenInMissionControl state', () => {
|
||||||
it('with functions', () => {
|
describe('with functions', () => {
|
||||||
it('can be set with ignoreMissionControl constructor option', () => {
|
it('can be set with ignoreMissionControl constructor option', () => {
|
||||||
const w = new BrowserWindow({ show: false, hiddenInMissionControl: true });
|
const w = new BrowserWindow({ show: false, hiddenInMissionControl: true });
|
||||||
expect(w.isHiddenInMissionControl()).to.be.true('isHiddenInMissionControl');
|
expect(w.isHiddenInMissionControl()).to.be.true('isHiddenInMissionControl');
|
||||||
|
@ -5854,7 +5855,7 @@ describe('BrowserWindow module', () => {
|
||||||
// fullscreen events are dispatched eagerly and twiddling things too fast can confuse poor Electron
|
// fullscreen events are dispatched eagerly and twiddling things too fast can confuse poor Electron
|
||||||
|
|
||||||
ifdescribe(process.platform === 'darwin')('kiosk state', () => {
|
ifdescribe(process.platform === 'darwin')('kiosk state', () => {
|
||||||
it('with properties', () => {
|
describe('with properties', () => {
|
||||||
it('can be set with a constructor property', () => {
|
it('can be set with a constructor property', () => {
|
||||||
const w = new BrowserWindow({ kiosk: true });
|
const w = new BrowserWindow({ kiosk: true });
|
||||||
expect(w.kiosk).to.be.true();
|
expect(w.kiosk).to.be.true();
|
||||||
|
@ -5875,7 +5876,7 @@ describe('BrowserWindow module', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('with functions', () => {
|
describe('with functions', () => {
|
||||||
it('can be set with a constructor property', () => {
|
it('can be set with a constructor property', () => {
|
||||||
const w = new BrowserWindow({ kiosk: true });
|
const w = new BrowserWindow({ kiosk: true });
|
||||||
expect(w.isKiosk()).to.be.true();
|
expect(w.isKiosk()).to.be.true();
|
||||||
|
@ -6174,7 +6175,7 @@ describe('BrowserWindow module', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('closable state', () => {
|
describe('closable state', () => {
|
||||||
it('with properties', () => {
|
describe('with properties', () => {
|
||||||
it('can be set with closable constructor option', () => {
|
it('can be set with closable constructor option', () => {
|
||||||
const w = new BrowserWindow({ show: false, closable: false });
|
const w = new BrowserWindow({ show: false, closable: false });
|
||||||
expect(w.closable).to.be.false('closable');
|
expect(w.closable).to.be.false('closable');
|
||||||
|
@ -6190,7 +6191,7 @@ describe('BrowserWindow module', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('with functions', () => {
|
describe('with functions', () => {
|
||||||
it('can be set with closable constructor option', () => {
|
it('can be set with closable constructor option', () => {
|
||||||
const w = new BrowserWindow({ show: false, closable: false });
|
const w = new BrowserWindow({ show: false, closable: false });
|
||||||
expect(w.isClosable()).to.be.false('isClosable');
|
expect(w.isClosable()).to.be.false('isClosable');
|
||||||
|
@ -6208,7 +6209,7 @@ describe('BrowserWindow module', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('hasShadow state', () => {
|
describe('hasShadow state', () => {
|
||||||
it('with properties', () => {
|
describe('with properties', () => {
|
||||||
it('returns a boolean on all platforms', () => {
|
it('returns a boolean on all platforms', () => {
|
||||||
const w = new BrowserWindow({ show: false });
|
const w = new BrowserWindow({ show: false });
|
||||||
expect(w.shadow).to.be.a('boolean');
|
expect(w.shadow).to.be.a('boolean');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue