fix: run visibleOnAllWorkspaces
tests on the right platforms (#46815)
* test: add platform test on visibleOnAllWorkspaces tests visibleOnAllWorkspaces is not supported on Windows * test: do not skip visibleOnAllWorkspaces tests on Windows That feature is supported on Linux, so move the test from the "window states (excluding Linux)" section into the "window states" section. * fix: nested it() calls in visibleOnAllWorkspaces specs * chore: make the process.platform test simpler
This commit is contained in:
parent
b03c71213e
commit
27f6adf8df
1 changed files with 20 additions and 20 deletions
|
@ -5407,6 +5407,26 @@ describe('BrowserWindow module', () => {
|
||||||
expect(w.webContents.isLoadingMainFrame()).to.be.true('isLoadingMainFrame');
|
expect(w.webContents.isLoadingMainFrame()).to.be.true('isLoadingMainFrame');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ifdescribe(process.platform !== 'win32')('visibleOnAllWorkspaces state', () => {
|
||||||
|
describe('with properties', () => {
|
||||||
|
it('can be changed', () => {
|
||||||
|
const w = new BrowserWindow({ show: false });
|
||||||
|
expect(w.visibleOnAllWorkspaces).to.be.false();
|
||||||
|
w.visibleOnAllWorkspaces = true;
|
||||||
|
expect(w.visibleOnAllWorkspaces).to.be.true();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('with functions', () => {
|
||||||
|
it('can be changed', () => {
|
||||||
|
const w = new BrowserWindow({ show: false });
|
||||||
|
expect(w.isVisibleOnAllWorkspaces()).to.be.false();
|
||||||
|
w.setVisibleOnAllWorkspaces(true);
|
||||||
|
expect(w.isVisibleOnAllWorkspaces()).to.be.true();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
ifdescribe(process.platform !== 'linux')('window states (excluding Linux)', () => {
|
ifdescribe(process.platform !== 'linux')('window states (excluding Linux)', () => {
|
||||||
|
@ -5447,26 +5467,6 @@ describe('BrowserWindow module', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('visibleOnAllWorkspaces state', () => {
|
|
||||||
it('with properties', () => {
|
|
||||||
it('can be changed', () => {
|
|
||||||
const w = new BrowserWindow({ show: false });
|
|
||||||
expect(w.visibleOnAllWorkspaces).to.be.false();
|
|
||||||
w.visibleOnAllWorkspaces = true;
|
|
||||||
expect(w.visibleOnAllWorkspaces).to.be.true();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('with functions', () => {
|
|
||||||
it('can be changed', () => {
|
|
||||||
const w = new BrowserWindow({ show: false });
|
|
||||||
expect(w.isVisibleOnAllWorkspaces()).to.be.false();
|
|
||||||
w.setVisibleOnAllWorkspaces(true);
|
|
||||||
expect(w.isVisibleOnAllWorkspaces()).to.be.true();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
ifdescribe(process.platform === 'darwin')('documentEdited state', () => {
|
ifdescribe(process.platform === 'darwin')('documentEdited state', () => {
|
||||||
it('with properties', () => {
|
it('with properties', () => {
|
||||||
it('can be changed', () => {
|
it('can be changed', () => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue