forked from matrix/element-web
Merge remote-tracking branch 'origin/new-guest-access' into experimental
This commit is contained in:
commit
5c51797420
|
@ -163,6 +163,13 @@ describe('joining a room', function () {
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
// wait for the join request to be made
|
// wait for the join request to be made
|
||||||
return q.delay(1);
|
return q.delay(1);
|
||||||
|
}).then(() => {
|
||||||
|
// and again, because the state update has to go to the store and
|
||||||
|
// then one dispatch within the store, then to the view
|
||||||
|
// XXX: This is *super flaky*: a better way would be to declare
|
||||||
|
// that we expect a certain state transition to happen, then wait
|
||||||
|
// for that transition to occur.
|
||||||
|
return q.delay(1);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
// the roomview should now be loading
|
// the roomview should now be loading
|
||||||
expect(roomView.state.room).toBe(null);
|
expect(roomView.state.room).toBe(null);
|
||||||
|
@ -177,6 +184,8 @@ describe('joining a room', function () {
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
httpBackend.verifyNoOutstandingExpectation();
|
httpBackend.verifyNoOutstandingExpectation();
|
||||||
|
|
||||||
|
return q.delay(1);
|
||||||
|
}).then(() => {
|
||||||
// We've joined, expect this to false
|
// We've joined, expect this to false
|
||||||
expect(roomView.state.joining).toBe(false);
|
expect(roomView.state.joining).toBe(false);
|
||||||
|
|
||||||
|
|
|
@ -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