Fix tests for new-guest-access

This time the test wasn't being flaky, but it does inspect a lot of the internal of RoomView, which has had some modifications recently. I've updated the test to reflect this and it passes locally.

Also, fix a bug in HomePage with an undeclared "error" which should be "err".

Let's see what Travis thinks of this!
This commit is contained in:
Luke Barnard 2017-06-05 20:16:44 +01:00
parent 0919b7ce3a
commit feaff9d99d
3 changed files with 24 additions and 25 deletions

View file

@ -122,7 +122,7 @@ describe('loading:', function () {
function routeUrl(location, matrixChat) {
console.log(Date.now() + ` routing URL '${location}'`);
const s = getScreenFromLocation(location);
console.log("Showing screen "+ s);
console.log("Showing screen ", s);
matrixChat.showScreen(s.screen, s.params);
}
@ -193,14 +193,12 @@ describe('loading:', function () {
return httpBackend.flush();
}).then(() => {
// Wait for another trip around the event loop for the UI to update
return q.delay(1);
}).then(() => {
// we expect a single <Login> component
// we expect a single <Login> component following session load
ReactTestUtils.findRenderedComponentWithType(
matrixChat, sdk.getComponent('structures.login.Login'));
expect(windowLocation.hash).toEqual("");
}).done(done, done);
done();
});
});
it('should follow the original link after successful login', function(done) {