test: enable hasShadow
tests on Linux (#46984)
refactor: enable hasShadow tests on Linux
This commit is contained in:
parent
54a6bbb4cb
commit
d4ca829069
1 changed files with 51 additions and 51 deletions
|
@ -5495,6 +5495,57 @@ describe('BrowserWindow module', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('hasShadow state', () => {
|
||||||
|
describe('with properties', () => {
|
||||||
|
it('returns a boolean on all platforms', () => {
|
||||||
|
const w = new BrowserWindow({ show: false });
|
||||||
|
expect(w.shadow).to.be.a('boolean');
|
||||||
|
});
|
||||||
|
|
||||||
|
// On Windows there's no shadow by default & it can't be changed dynamically.
|
||||||
|
it('can be changed with hasShadow option', () => {
|
||||||
|
const hasShadow = process.platform !== 'darwin';
|
||||||
|
const w = new BrowserWindow({ show: false, hasShadow });
|
||||||
|
expect(w.shadow).to.equal(hasShadow);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('can be changed with setHasShadow method', () => {
|
||||||
|
const w = new BrowserWindow({ show: false });
|
||||||
|
w.shadow = false;
|
||||||
|
expect(w.shadow).to.be.false('hasShadow');
|
||||||
|
w.shadow = true;
|
||||||
|
expect(w.shadow).to.be.true('hasShadow');
|
||||||
|
w.shadow = false;
|
||||||
|
expect(w.shadow).to.be.false('hasShadow');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('with functions', () => {
|
||||||
|
it('returns a boolean on all platforms', () => {
|
||||||
|
const w = new BrowserWindow({ show: false });
|
||||||
|
const hasShadow = w.hasShadow();
|
||||||
|
expect(hasShadow).to.be.a('boolean');
|
||||||
|
});
|
||||||
|
|
||||||
|
// On Windows there's no shadow by default & it can't be changed dynamically.
|
||||||
|
it('can be changed with hasShadow option', () => {
|
||||||
|
const hasShadow = process.platform !== 'darwin';
|
||||||
|
const w = new BrowserWindow({ show: false, hasShadow });
|
||||||
|
expect(w.hasShadow()).to.equal(hasShadow);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('can be changed with setHasShadow method', () => {
|
||||||
|
const w = new BrowserWindow({ show: false });
|
||||||
|
w.setHasShadow(false);
|
||||||
|
expect(w.hasShadow()).to.be.false('hasShadow');
|
||||||
|
w.setHasShadow(true);
|
||||||
|
expect(w.hasShadow()).to.be.true('hasShadow');
|
||||||
|
w.setHasShadow(false);
|
||||||
|
expect(w.hasShadow()).to.be.false('hasShadow');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
ifdescribe(process.platform !== 'linux')('window states (excluding Linux)', () => {
|
ifdescribe(process.platform !== 'linux')('window states (excluding Linux)', () => {
|
||||||
|
@ -6244,57 +6295,6 @@ describe('BrowserWindow module', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('hasShadow state', () => {
|
|
||||||
describe('with properties', () => {
|
|
||||||
it('returns a boolean on all platforms', () => {
|
|
||||||
const w = new BrowserWindow({ show: false });
|
|
||||||
expect(w.shadow).to.be.a('boolean');
|
|
||||||
});
|
|
||||||
|
|
||||||
// On Windows there's no shadow by default & it can't be changed dynamically.
|
|
||||||
it('can be changed with hasShadow option', () => {
|
|
||||||
const hasShadow = process.platform !== 'darwin';
|
|
||||||
const w = new BrowserWindow({ show: false, hasShadow });
|
|
||||||
expect(w.shadow).to.equal(hasShadow);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('can be changed with setHasShadow method', () => {
|
|
||||||
const w = new BrowserWindow({ show: false });
|
|
||||||
w.shadow = false;
|
|
||||||
expect(w.shadow).to.be.false('hasShadow');
|
|
||||||
w.shadow = true;
|
|
||||||
expect(w.shadow).to.be.true('hasShadow');
|
|
||||||
w.shadow = false;
|
|
||||||
expect(w.shadow).to.be.false('hasShadow');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('with functions', () => {
|
|
||||||
it('returns a boolean on all platforms', () => {
|
|
||||||
const w = new BrowserWindow({ show: false });
|
|
||||||
const hasShadow = w.hasShadow();
|
|
||||||
expect(hasShadow).to.be.a('boolean');
|
|
||||||
});
|
|
||||||
|
|
||||||
// On Windows there's no shadow by default & it can't be changed dynamically.
|
|
||||||
it('can be changed with hasShadow option', () => {
|
|
||||||
const hasShadow = process.platform !== 'darwin';
|
|
||||||
const w = new BrowserWindow({ show: false, hasShadow });
|
|
||||||
expect(w.hasShadow()).to.equal(hasShadow);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('can be changed with setHasShadow method', () => {
|
|
||||||
const w = new BrowserWindow({ show: false });
|
|
||||||
w.setHasShadow(false);
|
|
||||||
expect(w.hasShadow()).to.be.false('hasShadow');
|
|
||||||
w.setHasShadow(true);
|
|
||||||
expect(w.hasShadow()).to.be.true('hasShadow');
|
|
||||||
w.setHasShadow(false);
|
|
||||||
expect(w.hasShadow()).to.be.false('hasShadow');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('window.getMediaSourceId()', () => {
|
describe('window.getMediaSourceId()', () => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue