fix review findings

This commit is contained in:
Eduard Heimbuch
2020-08-11 10:34:29 +02:00
parent a46d8c4749
commit c1cfff603b
63 changed files with 578 additions and 494 deletions

View File

@@ -46,3 +46,16 @@
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
const login = (username, password) => {
cy.visit( "/login");
cy.byTestId("username-input").type(username);
cy.byTestId("password-input").type(password);
cy.byTestId("login-button").click();
};
Cypress.Commands.add("login", login);
Cypress.Commands.add("byTestId", (testId) => cy.get("[data-testid=" + testId + "]"));
Cypress.Commands.add("containsNotByTestId", (container, testId) => cy.get(container).not("[data-testid=" + testId + "]"));