From 5f0a2f9181cfcbb7c44a1a1a169f11f9534063a9 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Thu, 24 Oct 2024 14:09:28 -0300 Subject: [PATCH] New login test --- src/test/cypress/integration/login/LoginView.spec.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/test/cypress/integration/login/LoginView.spec.js b/src/test/cypress/integration/login/LoginView.spec.js index beca0ba1..7245fcd3 100644 --- a/src/test/cypress/integration/login/LoginView.spec.js +++ b/src/test/cypress/integration/login/LoginView.spec.js @@ -88,4 +88,13 @@ describe('Login Tests', () => { expect(window.sessionStorage.getItem('hederaLastUser')).to.eq(null); }); }); + + it('should redirect to login if storage token is removed', () => { + cy.loginFlow('employee', false); + cy.window().then(window => { + window.sessionStorage.removeItem('token'); + cy.visit('/#/account/conf'); + cy.url().should('contain', '/#/login'); + }); + }); });