mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
#389: fix logout in case, when all the accounts have invalid tokens
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
@@ -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('/');
|
||||
|
||||
|
Reference in New Issue
Block a user