Skip to content

Commit

Permalink
Fix loading tests for welcome page
Browse files Browse the repository at this point in the history
  • Loading branch information
jryans committed Feb 11, 2019
1 parent 6aff746 commit 585d286
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions test/app-tests/loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,7 @@ describe('loading:', function() {
});

describe('Guest auto-registration:', function() {
// TODO: Repair this test in https://github.com/vector-im/riot-web/issues/8468
/* it('shows a welcome page by default', function(done) {
it('shows a welcome page by default', function(done) {
loadApp();

Promise.delay(1).then(() => {
Expand Down Expand Up @@ -426,10 +425,9 @@ describe('loading:', function() {
matrixChat, sdk.getComponent('auth.Welcome'));
expect(windowLocation.hash).toEqual("#/welcome");
}).done(done, done);
}); */
});

// TODO: Repair this test in https://github.com/vector-im/riot-web/issues/8468
/* it('uses the default homeserver to register with', function(done) {
it('uses the default homeserver to register with', function(done) {
loadApp();

Promise.delay(1).then(() => {
Expand All @@ -453,15 +451,15 @@ describe('loading:', function() {
}).then((req) => {
expect(req.path).toStartWith(DEFAULT_HS_URL);

// once the sync completes, we should have a home page
// once the sync completes, we should have a welcome page
httpBackend.verifyNoOutstandingExpectation();
ReactTestUtils.findRenderedComponentWithType(
matrixChat, sdk.getComponent('structures.EmbeddedPage'));
expect(windowLocation.hash).toEqual("#/home");
matrixChat, sdk.getComponent('auth.Welcome'));
expect(windowLocation.hash).toEqual("#/welcome");
expect(MatrixClientPeg.get().baseUrl).toEqual(DEFAULT_HS_URL);
expect(MatrixClientPeg.get().idBaseUrl).toEqual(DEFAULT_IS_URL);
}).done(done, done);
}); */
});

it('shows a room view if we followed a room link', function(done) {
loadApp({
Expand Down Expand Up @@ -530,15 +528,14 @@ describe('loading:', function() {
});
});

// TODO: Repair this test in https://github.com/vector-im/riot-web/issues/8468
/* it('should give us a login page', function() {
it('should give us a login page', function() {
expect(windowLocation.hash).toEqual("#/login");

// we expect a single <Login> component
ReactTestUtils.findRenderedComponentWithType(
matrixChat, sdk.getComponent('structures.auth.Login'),
);
}); */
});

/*
// ILAG renders this obsolete. I think.
Expand Down Expand Up @@ -680,8 +677,6 @@ function awaitSyncingSpinner(matrixChat, retryLimit, retryCount) {

console.log(Date.now() + " Awaiting sync spinner: load complete.");

// state looks good, check the rendered output
assertAtSyncingSpinner(matrixChat);
return Promise.resolve();
}

Expand Down

0 comments on commit 585d286

Please sign in to comment.