test: enable hasShadow
tests on Linux (#47001)
refactor: enable hasShadow tests on Linux 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
b59a7ef2c3
commit
057437f739
1 changed files with 51 additions and 51 deletions
|
@ -5428,6 +5428,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)', () => {
|
||||
|
@ -6207,57 +6258,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()', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue