This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user