Expect a HomePage now instead of a directory, because one is now shown by default

pull/4076/head
Luke Barnard 2017-05-30 12:55:50 +01:00
parent f085d2db39
commit 6cc7fa3a36
1 changed files with 11 additions and 11 deletions

View File

@ -273,7 +273,7 @@ describe('loading:', function () {
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('POST', '/filter').respond(200, { filter_id: 'fid' });
@ -283,11 +283,11 @@ describe('loading:', function () {
// we got a sync spinner - let the sync complete
return expectAndAwaitSync();
}).then(() => {
// once the sync completes, we should have a directory
// once the sync completes, we should have a home page
httpBackend.verifyNoOutstandingExpectation();
ReactTestUtils.findRenderedComponentWithType(
matrixChat, sdk.getComponent('structures.RoomDirectory'));
expect(windowLocation.hash).toEqual("#/directory");
matrixChat, sdk.getComponent('structures.HomePage'));
expect(windowLocation.hash).toEqual("#/home");
}).done(done, done);
});
@ -314,7 +314,7 @@ describe('loading:', function () {
});
describe('Guest auto-registration:', function() {
it('shows a directory by default', function (done) {
it('shows a home page by default', function (done) {
loadApp();
q.delay(1).then(() => {
@ -336,11 +336,11 @@ describe('loading:', function () {
// we got a sync spinner - let the sync complete
return expectAndAwaitSync();
}).then(() => {
// once the sync completes, we should have a directory
// once the sync completes, we should have a home page
httpBackend.verifyNoOutstandingExpectation();
ReactTestUtils.findRenderedComponentWithType(
matrixChat, sdk.getComponent('structures.RoomDirectory'));
expect(windowLocation.hash).toEqual("#/directory");
matrixChat, sdk.getComponent('structures.HomePage'));
expect(windowLocation.hash).toEqual("#/home");
}).done(done, done);
});
@ -371,11 +371,11 @@ describe('loading:', function () {
}).then((req) => {
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();
ReactTestUtils.findRenderedComponentWithType(
matrixChat, sdk.getComponent('structures.RoomDirectory'));
expect(windowLocation.hash).toEqual("#/directory");
matrixChat, sdk.getComponent('structures.HomePage'));
expect(windowLocation.hash).toEqual("#/home");
expect(MatrixClientPeg.get().baseUrl).toEqual("https://homeserver");
expect(MatrixClientPeg.get().idBaseUrl).toEqual("https://idserver");
}).done(done, done);