This commit is contained in:
2021-12-20 19:12:32 +00:00
parent c08b169919
commit f3ff88229e
20 changed files with 99 additions and 229 deletions

View File

@@ -34,7 +34,21 @@ Cypress.Commands.add("chooseVSelect", (dataCyTag, selectionText) => {
Cypress.Commands.add("choosePickList", (dataCyTag, selectionText) => {
cy.get(`[data-cy='${dataCyTag}']`).click({ force: true }).type(selectionText);
cy.wait(500);
cy.get(".v-list-item__title")
.contains(new RegExp(selectionText))
.click();
cy.get(".v-list-item__title").contains(new RegExp(selectionText)).click();
});
Cypress.Commands.add("ayLogin", (user, urlAfterLogin) => {
if(!urlAfterLogin){
urlAfterLogin="/ay-evaluate"
}
cy.visit("/login");
cy.get("input[name=username]").clear().type(Cypress.env(user).login);
// {enter} causes the form to submit
cy.get("input[name=password]")
.clear()
.type(`${Cypress.env(user).password}{enter}`);
cy.url().should("include", urlAfterLogin);
});