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:
parent
ca907f42dc
commit
e1089574ae
4 changed files with 206 additions and 2 deletions
|
@ -137,6 +137,20 @@ export function createTestClient() {
|
|||
};
|
||||
}
|
||||
|
||||
export function createTestRtsClient(teamMap, sidMap) {
|
||||
return {
|
||||
getTeamsConfig() {
|
||||
return q(Object.keys(teamMap).map((token) => teamMap[token]));
|
||||
},
|
||||
trackReferral(referrer, emailSid, clientSecret) {
|
||||
return q({team_token: sidMap[emailSid]});
|
||||
},
|
||||
getTeam(teamToken) {
|
||||
return q(teamMap[teamToken]);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an Event.
|
||||
* @param {Object} opts Values for the event.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue