From 5ad5ad41c794a9e88fcf335eb67c9fae7f57cd33 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Wed, 14 Jul 2021 11:47:00 +1000 Subject: [PATCH] Added login test --- test/cypress/integration/ui/SetupLogin.spec.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/cypress/integration/ui/SetupLogin.spec.js b/test/cypress/integration/ui/SetupLogin.spec.js index 42eec942..e1652b0f 100644 --- a/test/cypress/integration/ui/SetupLogin.spec.js +++ b/test/cypress/integration/ui/SetupLogin.spec.js @@ -15,6 +15,18 @@ describe('UI Setup and Login', () => { cy.get('input[name="password"]').type('changeme'); cy.get('form button:first').click(); cy.get('.navbar-nav .avatar').should('be.visible'); + // logout: + cy.clearLocalStorage(); + }); + + it('Should be able to login', function() { + cy.visit('/'); + cy.get('input[name="email"]').type('cypress@example.com'); + cy.get('input[name="password"]').type('changeme'); + cy.get('form button:first').click(); + cy.get('.navbar-nav .avatar').should('be.visible'); + // logout: + cy.clearLocalStorage(); }); });