mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Partially revert https://github.com/vector-im/riot-web/pull/4201
The q.delay is needed to make sure (or at least reasonably sure...) that the login component has appeared by that point. The done handler needs to be the error callback too otherwise failures result in timeouts rather than the actual failure.
This commit is contained in:
parent
d06934c5f6
commit
15d0bd9271
@ -192,13 +192,15 @@ describe('loading:', function () {
|
|||||||
}).respond(403, "Guest access is disabled");
|
}).respond(403, "Guest access is disabled");
|
||||||
|
|
||||||
return httpBackend.flush();
|
return httpBackend.flush();
|
||||||
|
}).then(() => {
|
||||||
|
// Wait for another trip around the event loop for the UI to update
|
||||||
|
return q.delay(1);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
// we expect a single <Login> component following session load
|
// we expect a single <Login> component following session load
|
||||||
ReactTestUtils.findRenderedComponentWithType(
|
ReactTestUtils.findRenderedComponentWithType(
|
||||||
matrixChat, sdk.getComponent('structures.login.Login'));
|
matrixChat, sdk.getComponent('structures.login.Login'));
|
||||||
expect(windowLocation.hash).toEqual("");
|
expect(windowLocation.hash).toEqual("");
|
||||||
done();
|
}).done(done, done);
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should follow the original link after successful login', function(done) {
|
it('should follow the original link after successful login', function(done) {
|
||||||
|
Loading…
Reference in New Issue
Block a user