/// describe('Logout', () => { beforeEach(() => { cy.login('developer'); cy.visit(`/#/dashboard`); cy.waitForElement('.q-page', 6000); }); describe('by user', () => { it('should logout', () => { cy.get('#user').click(); cy.get('#logout').click(); }); }); describe('not user', () => { beforeEach(() => { cy.intercept('GET', '**/VnUsers/acl', { statusCode: 401, body: { error: { statusCode: 401, name: 'Error', message: 'Authorization Required', code: 'AUTHORIZATION_REQUIRED', }, }, statusMessage: 'AUTHORIZATION_REQUIRED', }).as('someRoute'); }); it('when token not exists', () => { cy.reload(); cy.get('.q-notification__message').should( 'have.text', 'Authorization Required' ); }); }); });