This commit is contained in:
@@ -38,9 +38,9 @@ Cypress.Commands.add("ayChooseGZPickList", (dataCyTag, selectionText) => {
|
||||
});
|
||||
|
||||
Cypress.Commands.add("ayLogin", (user, urlAfterLogin) => {
|
||||
if(!urlAfterLogin){
|
||||
urlAfterLogin="/ay-evaluate"
|
||||
}
|
||||
if (!urlAfterLogin) {
|
||||
urlAfterLogin = "/ay-evaluate";
|
||||
}
|
||||
cy.visit("/login");
|
||||
|
||||
cy.get("input[name=username]").clear().type(Cypress.env(user).login);
|
||||
@@ -54,23 +54,19 @@ if(!urlAfterLogin){
|
||||
});
|
||||
|
||||
Cypress.Commands.add("ayChooseExistingTags", (dataCyTag, tagList) => {
|
||||
;
|
||||
for(let i=0;i<tagList.length;i++){
|
||||
cy.get(`[data-cy='${dataCyTag}']`).click().type(tagList[i]).wait(250).type("{downarrow}{enter}");
|
||||
for (let i = 0; i < tagList.length; i++) {
|
||||
cy.get(`[data-cy='${dataCyTag}']`)
|
||||
.click()
|
||||
.type(tagList[i])
|
||||
.wait(250)
|
||||
.type("{downarrow}{enter}");
|
||||
}
|
||||
|
||||
// cy.get(`[data-cy='${dataCyTag}']`).then(t=>{
|
||||
// t.click();
|
||||
// for(let i=0;i<tagList.length;i++){
|
||||
// t.type(tagList[i]);
|
||||
// cy.wait(250);
|
||||
// t.type("{downarrow}{enter}");
|
||||
// }
|
||||
// tagList.forEach(z=>{
|
||||
// cy.type(z);
|
||||
// cy.contains(z);//look for the text on the page
|
||||
// cy.type("{downarrow}{enter}");
|
||||
// });
|
||||
//})
|
||||
|
||||
});
|
||||
|
||||
Cypress.Commands.add("aySetTestableUserOptions", () => {
|
||||
cy.get("[data-cy=navicon]").click();
|
||||
cy.get("[data-cy=home]").click();
|
||||
cy.get("[data-cy='nav/home-user-settings']").click();
|
||||
cy.url().should("include", "/home-user-settings");
|
||||
cy.get("[data-cy='nativeDateTimeInput']").check({ force: true });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user