-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not render full navbar until user has left /login
As part of this, I also removed the loggedIn and loggedOut Vuex getters, which weren't doing a lot of work and which I think would now be slightly confusing.
- Loading branch information
1 parent
8160572
commit 2f0591b
Showing
10 changed files
with
48 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -157,24 +157,27 @@ describe('AccountLogin', () => { | |
}); | ||
}); | ||
|
||
it('does not re-enable buttons before an external redirect', () => { | ||
it('does not update Frontend before an external redirect', () => { | ||
testData.extendedUsers.createPast(1, { email: '[email protected]' }); | ||
return load('/login?next=%2Fenketo%2Fxyz') | ||
.restoreSession(false) | ||
.complete() | ||
.request(app => { | ||
const accountLogin = app.first(AccountLogin); | ||
sinon.replace(accountLogin.vm, 'navigateToNext', sinon.fake(() => { | ||
accountLogin.first('.btn-primary').should.be.disabled(); | ||
accountLogin.first('.btn-link').should.be.disabled(); | ||
})); | ||
sinon.replace(accountLogin.vm, 'navigateToNext', sinon.fake()); | ||
return submitForm(accountLogin, 'form', [ | ||
['input[type="email"]', '[email protected]'], | ||
['input[type="password"]', 'password'] | ||
]); | ||
}) | ||
.respondWithData(() => testData.sessions.createNew()) | ||
.respondWithData(() => testData.extendedUsers.first()); | ||
.respondWithData(() => testData.extendedUsers.first()) | ||
.afterResponses(app => { | ||
app.find('#navbar-links').length.should.equal(0); | ||
app.first('#navbar-actions a').text().trim().should.equal('Not logged in'); | ||
app.first('#account-login .btn-primary').should.be.disabled(); | ||
app.first('#account-login .btn-link').should.be.disabled(); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters