Write some tests for the RTS UI

Add tests that make assertions about the UI during registration when registration is done with a user recognised as a team member (by the mock rtsClient).
This commit is contained in:
Luke Barnard 2017-05-17 09:46:17 +01:00
parent ca907f42dc
commit e1089574ae
4 changed files with 206 additions and 2 deletions

View file

@ -98,7 +98,7 @@ module.exports = React.createClass({
this.props.teamServerConfig.teamServerURL &&
!this._rtsClient
) {
this._rtsClient = new RtsClient(this.props.teamServerConfig.teamServerURL);
this._rtsClient = this.props.rtsClient || new RtsClient(this.props.teamServerConfig.teamServerURL);
this.setState({
teamServerBusy: true,
@ -221,7 +221,6 @@ module.exports = React.createClass({
}
trackPromise.then((teamToken) => {
console.info('Team token promise',teamToken);
this.props.onLoggedIn({
userId: response.user_id,
deviceId: response.device_id,