👷 Create firsts e2e tests

This commit is contained in:
Pablo Alba 2022-01-19 17:10:53 +01:00 committed by Andrés Moya
parent 36bb5cbe01
commit 6a6f079a84
14 changed files with 21759 additions and 928 deletions

View file

@ -23,3 +23,16 @@
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
Cypress.Commands.add('login', (email, password) => {
cy.visit("http://localhost:3449/#/auth/login");
cy.get("#email").type(email);
cy.get("#password").type(password);
cy.get("input[type=submit]").first().click();
})
Cypress.Commands.add('demoLogin', () => {
cy.visit("http://localhost:3449/#/auth/login");
cy.get("a").contains("Create demo account").click()
})