Add tests for settings

This commit is contained in:
Yuya Ochiai
2016-06-23 00:03:04 +09:00
parent f432846a28
commit 4fca00ec9d
2 changed files with 48 additions and 12 deletions

View File

@@ -141,8 +141,8 @@ var SettingsPage = React.createClass({
onChange={ this.handleChangeHideMenuBar } />);
}
if (process.platform === 'darwin' || process.platform === 'linux') {
options.push(<Input key="inputShowTrayIcon" ref="showTrayIcon" type="checkbox" label="Show Icon on Menu Bar (Need to restart the application)" checked={ this.state.showTrayIcon } onChange={ this.handleChangeShowTrayIcon }
/>);
options.push(<Input key="inputShowTrayIcon" id="inputShowTrayIcon" ref="showTrayIcon" type="checkbox" label="Show Icon on Menu Bar (Need to restart the application)" checked={ this.state.showTrayIcon }
onChange={ this.handleChangeShowTrayIcon } />);
}
if (process.platform === 'linux') {
options.push(<Input key="inputTrayIconTheme" ref="trayIconTheme" type="select" label="Icon theme (Need to restart the application)" value={ this.state.trayIconTheme } onChange={ this.handleChangeTrayIconTheme }>
@@ -154,7 +154,8 @@ var SettingsPage = React.createClass({
checked={ this.state.disablewebsecurity } onChange={ this.handleChangeDisableWebSecurity } />);
//OSX has an option in the Dock, to set the app to autostart, so we choose to not support this option for OSX
if (process.platform === 'win32' || process.platform === 'linux') {
options.push(<Input key="inputAutoStart" ref="autostart" type="checkbox" label="Start app on login." checked={ this.state.autostart } onChange={ this.handleChangeAutoStart } />);
options.push(<Input key="inputAutoStart" id="inputAutoStart" ref="autostart" type="checkbox" label="Start app on login." checked={ this.state.autostart } onChange={ this.handleChangeAutoStart }
/>);
}
var options_row = (options.length > 0) ? (
<Row>
@@ -193,7 +194,7 @@ var SettingsPage = React.createClass({
});
notifications_row = (
<Row>
<Row id="notificationsRow">
<Col md={ 12 }>
<h3>Notifications</h3> Configure, that the taskicon in the taskbar blinks when new message arrives.
{ notificationElements }