Expect a HomePage now instead of a directory, because one is now shown by default
This commit is contained in:
parent
f085d2db39
commit
6cc7fa3a36
|
@ -273,7 +273,7 @@ describe('loading:', function () {
|
||||||
localStorage.setItem("mx_user_id", "@me:localhost");
|
localStorage.setItem("mx_user_id", "@me:localhost");
|
||||||
});
|
});
|
||||||
|
|
||||||
it('shows a directory by default if we have no joined rooms', function(done) {
|
it('shows a home page by default if we have no joined rooms', function(done) {
|
||||||
httpBackend.when('GET', '/pushrules').respond(200, {});
|
httpBackend.when('GET', '/pushrules').respond(200, {});
|
||||||
httpBackend.when('POST', '/filter').respond(200, { filter_id: 'fid' });
|
httpBackend.when('POST', '/filter').respond(200, { filter_id: 'fid' });
|
||||||
|
|
||||||
|
@ -283,11 +283,11 @@ describe('loading:', function () {
|
||||||
// we got a sync spinner - let the sync complete
|
// we got a sync spinner - let the sync complete
|
||||||
return expectAndAwaitSync();
|
return expectAndAwaitSync();
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
// once the sync completes, we should have a directory
|
// once the sync completes, we should have a home page
|
||||||
httpBackend.verifyNoOutstandingExpectation();
|
httpBackend.verifyNoOutstandingExpectation();
|
||||||
ReactTestUtils.findRenderedComponentWithType(
|
ReactTestUtils.findRenderedComponentWithType(
|
||||||
matrixChat, sdk.getComponent('structures.RoomDirectory'));
|
matrixChat, sdk.getComponent('structures.HomePage'));
|
||||||
expect(windowLocation.hash).toEqual("#/directory");
|
expect(windowLocation.hash).toEqual("#/home");
|
||||||
}).done(done, done);
|
}).done(done, done);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -314,7 +314,7 @@ describe('loading:', function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Guest auto-registration:', function() {
|
describe('Guest auto-registration:', function() {
|
||||||
it('shows a directory by default', function (done) {
|
it('shows a home page by default', function (done) {
|
||||||
loadApp();
|
loadApp();
|
||||||
|
|
||||||
q.delay(1).then(() => {
|
q.delay(1).then(() => {
|
||||||
|
@ -336,11 +336,11 @@ describe('loading:', function () {
|
||||||
// we got a sync spinner - let the sync complete
|
// we got a sync spinner - let the sync complete
|
||||||
return expectAndAwaitSync();
|
return expectAndAwaitSync();
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
// once the sync completes, we should have a directory
|
// once the sync completes, we should have a home page
|
||||||
httpBackend.verifyNoOutstandingExpectation();
|
httpBackend.verifyNoOutstandingExpectation();
|
||||||
ReactTestUtils.findRenderedComponentWithType(
|
ReactTestUtils.findRenderedComponentWithType(
|
||||||
matrixChat, sdk.getComponent('structures.RoomDirectory'));
|
matrixChat, sdk.getComponent('structures.HomePage'));
|
||||||
expect(windowLocation.hash).toEqual("#/directory");
|
expect(windowLocation.hash).toEqual("#/home");
|
||||||
}).done(done, done);
|
}).done(done, done);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -371,11 +371,11 @@ describe('loading:', function () {
|
||||||
}).then((req) => {
|
}).then((req) => {
|
||||||
expect(req.path).toMatch(new RegExp("^https://homeserver/"));
|
expect(req.path).toMatch(new RegExp("^https://homeserver/"));
|
||||||
|
|
||||||
// once the sync completes, we should have a directory
|
// once the sync completes, we should have a home page
|
||||||
httpBackend.verifyNoOutstandingExpectation();
|
httpBackend.verifyNoOutstandingExpectation();
|
||||||
ReactTestUtils.findRenderedComponentWithType(
|
ReactTestUtils.findRenderedComponentWithType(
|
||||||
matrixChat, sdk.getComponent('structures.RoomDirectory'));
|
matrixChat, sdk.getComponent('structures.HomePage'));
|
||||||
expect(windowLocation.hash).toEqual("#/directory");
|
expect(windowLocation.hash).toEqual("#/home");
|
||||||
expect(MatrixClientPeg.get().baseUrl).toEqual("https://homeserver");
|
expect(MatrixClientPeg.get().baseUrl).toEqual("https://homeserver");
|
||||||
expect(MatrixClientPeg.get().idBaseUrl).toEqual("https://idserver");
|
expect(MatrixClientPeg.get().idBaseUrl).toEqual("https://idserver");
|
||||||
}).done(done, done);
|
}).done(done, done);
|
||||||
|
|
Loading…
Reference in New Issue