This commit is contained in:
2021-11-01 20:22:55 +00:00
parent b6b1ffa7f6
commit ee8a717153
2 changed files with 38 additions and 1 deletions

View File

@@ -23,3 +23,10 @@
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
Cypress.Commands.add("chooseVSelect", (dataCyTag, selectionText) => {
cy.get(`[data-cy=${dataCyTag}]`).click({ force: true });
cy.get(".v-list-item__title")
.contains(new RegExp("^" + selectionText + "$", "g"))
.click({ force: true });
});