MinimizeToTray-Setting is only shown on Windows

This commit is contained in:
Martin Gondermann
2016-06-27 09:36:22 +02:00
parent fa1ddcb623
commit d6de73458c
2 changed files with 12 additions and 0 deletions

View File

@@ -162,6 +162,8 @@ var SettingsPage = React.createClass({
if (process.platform === 'win32' || process.platform === 'linux') {
options.push(<Input key="inputAutoStart" id="inputAutoStart" ref="autostart" type="checkbox" label="Start app on login." checked={ this.state.autostart } onChange={ this.handleChangeAutoStart }
/>);
}
if (process.platform === 'win32') {
options.push(<Input key="inputMinimizeToTray" id="inputMinimizeToTray" ref="minimizeToTray" type="checkbox" label="Minimize app to tray." checked={ this.state.minimizeToTray } onChange={ this.handleChangeMinimizeToTray }
/>);
}

View File

@@ -151,6 +151,16 @@ describe('browser/settings.html', function() {
});
});
describe('Minimize to tray', function() {
it('should appear win32', function() {
const expected = (process.platform === 'win32');
env.addClientCommands(this.app.client);
return this.app.client
.loadSettingsPage()
.isExisting('#inputMinimizeToTray').should.eventually.equal(expected)
});
});
describe('Notifications', function() {
it('should appear on win32', function() {
const expected = (process.platform === 'win32');