This commit is contained in:
2021-11-02 19:24:36 +00:00
parent f673929eda
commit db39062c52
4 changed files with 95 additions and 13 deletions

View File

@@ -25,7 +25,15 @@
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
Cypress.Commands.add("chooseVSelect", (dataCyTag, selectionText) => {
cy.get(`[data-cy=${dataCyTag}]`).click({ force: true });
cy.get(`[data-cy='${dataCyTag}']`).click({ force: true });
cy.get(".v-list-item__title")
.contains(new RegExp("^" + selectionText + "$", "g"))
.click({ force: true });
});
Cypress.Commands.add("choosePickList", (dataCyTag, selectionText) => {
cy.get(`[data-cy='${dataCyTag}']`).click({ force: true }).type('xyz');
cy.get(".v-list-item__title")
.contains(new RegExp("^" + selectionText + "$", "g"))
.click({ force: true });