#389: fix logout in case, when all the accounts have invalid tokens

This commit is contained in:
SleepWalker
2018-02-27 23:17:31 +02:00
parent 206627be17
commit f1d33bf7ec
8 changed files with 95 additions and 45 deletions

View File

@@ -1,11 +1,13 @@
{
"account1": {
"username": "SleepWalker",
"email": "danilenkos@auroraglobal.com",
"login": "SleepWalker",
"password": "qwer1234"
},
"account2": {
"username": "test",
"email": "admin@udf.su",
"login": "test",
"password": "qwer1234"
}

View File

@@ -24,6 +24,7 @@ describe('when user\'s token and refreshToken are invalid', () => {
});
it('should allow select account', () => {
// TODO: need a way to get valid token for one of the accounts
cy.visit('/');
cy.get('[data-e2e-go-back]').click();
@@ -39,6 +40,16 @@ describe('when user\'s token and refreshToken are invalid', () => {
cy.contains('account preferences');
});
it('should allow logout', () => {
cy.visit('/');
cy.get('[data-e2e-toolbar]').contains(account2.username).click();
cy.get('[data-e2e-toolbar]').contains('Log out').click();
cy.contains(account2.email).should('not.exist');
cy.get('[data-e2e-toolbar]').contains(account2.username).should('not.exist');
});
it('should allow enter new login from choose account', () => {
cy.visit('/');