install cypress and add initial test
This commit is contained in:
12
cypress/e2e/login.cy.ts
Normal file
12
cypress/e2e/login.cy.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
describe('Login test', () => {
|
||||
it('logs user in with correct credentials and logs user out', () => {
|
||||
cy.visit('/login');
|
||||
cy.dataCy('input-username').type(Cypress.env('umami_user'));
|
||||
cy.dataCy('input-password').type(Cypress.env('umami_password'));
|
||||
cy.dataCy('button-submit').click();
|
||||
cy.url().should('eq', Cypress.config().baseUrl + '/dashboard');
|
||||
cy.dataCy('button-profile').click();
|
||||
cy.dataCy('item-logout').click();
|
||||
cy.url().should('eq', Cypress.config().baseUrl + '/login');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user