Test actual behavior for Hide Menu Bar
This commit is contained in:
parent
b52dfa5348
commit
05bcda5eab
|
@ -25,5 +25,13 @@ module.exports = {
|
||||||
path: electron_binary_path,
|
path: electron_binary_path,
|
||||||
args: [`${path.join(source_root_dir, 'dist')}`, '--config-file=' + config_file_path]
|
args: [`${path.join(source_root_dir, 'dist')}`, '--config-file=' + config_file_path]
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
shouldTestForPlatforms: function(testCase, platforms) {
|
||||||
|
if (platforms.indexOf(process.platform) !== -1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
testCase.skip();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,9 +87,9 @@ describe('browser/settings.html', function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
if (process.platform === 'win32' || process.platform === 'linux') {
|
|
||||||
[true, false].forEach(function(v) {
|
[true, false].forEach(function(v) {
|
||||||
it(`should be loaded from config: ${v}`, function() {
|
it(`should be loaded from config: ${v}`, function() {
|
||||||
|
env.shouldTestForPlatforms(this, ['win32', 'linux']);
|
||||||
var new_config = {};
|
var new_config = {};
|
||||||
Object.assign(new_config, config);
|
Object.assign(new_config, config);
|
||||||
new_config.hideMenuBar = v;
|
new_config.hideMenuBar = v;
|
||||||
|
@ -98,12 +98,14 @@ describe('browser/settings.html', function() {
|
||||||
initClient(this.app.client)
|
initClient(this.app.client)
|
||||||
.isSelected('#inputHideMenuBar input').then(function(value) {
|
.isSelected('#inputHideMenuBar input').then(function(value) {
|
||||||
value.should.equal(v);
|
value.should.equal(v);
|
||||||
|
this.app.browserWindow.isMenuBarAutoHide().should.equal(v);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be saved as config.json', function() {
|
it('should be saved as config.json', function() {
|
||||||
|
env.shouldTestForPlatforms(this, ['win32', 'linux']);
|
||||||
return this.app.start().then(() => {
|
return this.app.start().then(() => {
|
||||||
initClient(this.app.client)
|
initClient(this.app.client)
|
||||||
.click('#inputHideMenuBar input')
|
.click('#inputHideMenuBar input')
|
||||||
|
@ -115,7 +117,6 @@ describe('browser/settings.html', function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue