Use primitive and promise-style test cases

On OS X, tests for multiple elements often failed (#5). So I replaced them with primitive way.
This commit is contained in:
Yuya Ochiai
2016-01-10 00:53:58 +09:00
parent 0b2ad75712
commit e53a43d17a
2 changed files with 54 additions and 70 deletions

View File

@@ -75,7 +75,8 @@ var MainPage = React.createClass({
var handleNotificationClick = function() {
thisObj.handleSelect(index);
}
return (<MattermostView style={ thisObj.visibleStyle(thisObj.state.key === index) } src={ team.url } onUnreadCountChange={ handleUnreadCountChange } onNotificationClick={ handleNotificationClick } />)
return (<MattermostView id={ 'mattermostView' + index } style={ thisObj.visibleStyle(thisObj.state.key === index) } src={ team.url } onUnreadCountChange={ handleUnreadCountChange } onNotificationClick={ handleNotificationClick }
/>)
});
return (
<Grid fluid>
@@ -166,7 +167,7 @@ var MattermostView = React.createClass({
// 'disablewebsecurity' is necessary to display external images.
// However, it allows also CSS/JavaScript.
// So webview should use 'allowDisplayingInsecureContent' as same as BrowserWindow.
return (<webview className="mattermostView" style={ this.props.style } preload="webview/mattermost.js" src={ this.props.src } ref="webview"></webview>);
return (<webview id={ this.props.id } className="mattermostView" style={ this.props.style } preload="webview/mattermost.js" src={ this.props.src } ref="webview"></webview>);
}
});