Skip to content

Commit dd6868c

Browse files
committed
Fix joining test
This had been broken by matrix-org/matrix-react-sdk#399. Change the way we populate the matrixclient used for the joining tests.
1 parent b742342 commit dd6868c

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

test/app-tests/joining.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ describe('joining a room', function () {
4747
var parentDiv;
4848
var httpBackend;
4949
var matrixChat;
50-
50+
5151
beforeEach(function() {
5252
test_utils.beforeEach(this);
5353
httpBackend = new MockHttpBackend();
@@ -66,11 +66,11 @@ describe('joining a room', function () {
6666
parentDiv = null;
6767
}
6868
});
69-
69+
7070
it('should not get stuck at a spinner', function(done) {
7171
var ROOM_ALIAS = '#alias:localhost';
7272
var ROOM_ID = '!id:localhost';
73-
73+
7474
httpBackend.when('PUT', '/presence/'+encodeURIComponent(USER_ID)+'/status')
7575
.respond(200, {});
7676
httpBackend.when('GET', '/pushrules').respond(200, {});
@@ -80,14 +80,11 @@ describe('joining a room', function () {
8080
httpBackend.when('GET', '/directory/room/'+encodeURIComponent(ROOM_ALIAS)).respond(200, { room_id: ROOM_ID });
8181

8282
// start with a logged-in client
83-
peg.replaceUsingCreds({
84-
homeserverUrl: HS_URL,
85-
identityServerUrl: IS_URL,
86-
userId: USER_ID,
87-
accessToken: ACCESS_TOKEN,
88-
guest: false,
89-
});
90-
83+
localStorage.setItem("mx_hs_url", HS_URL );
84+
localStorage.setItem("mx_is_url", IS_URL );
85+
localStorage.setItem("mx_access_token", ACCESS_TOKEN );
86+
localStorage.setItem("mx_user_id", USER_ID);
87+
9188
var mc = <MatrixChat config={{}}/>;
9289
matrixChat = ReactDOM.render(mc, parentDiv);
9390

0 commit comments

Comments
 (0)