Added login test
This commit is contained in:
parent
309c1ab0c9
commit
5ad5ad41c7
1 changed files with 12 additions and 0 deletions
|
@ -15,6 +15,18 @@ describe('UI Setup and Login', () => {
|
||||||
cy.get('input[name="password"]').type('changeme');
|
cy.get('input[name="password"]').type('changeme');
|
||||||
cy.get('form button:first').click();
|
cy.get('form button:first').click();
|
||||||
cy.get('.navbar-nav .avatar').should('be.visible');
|
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();
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue