You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-31 13:44:28 +03:00
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:
@ -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.
|
||||
|
Reference in New Issue
Block a user