
* reference type cypress working * refactor * remove screenshots * add reference * add slash marker * run tests based on shop version * fix run tests based on shop version * fix run tests based on shop version * change base url to localhost * fix plugins * fix plugins * fix plugins * fix plugins * fix plugins * fix plugins * fix yml * fix yml * chage file names * fix files names * fix broken imports add checking for errors in grpah responses * fix broken imports add checking for errors in grpah responses * update jest * fix snapshot
27 lines
981 B
JavaScript
27 lines
981 B
JavaScript
import { ASSIGN_ELEMENTS_SELECTORS } from "../../../elements/shared/assign-elements-selectors";
|
|
|
|
// export function assignElements(name, withLoader = true) {
|
|
// cy.get(ASSIGN_ELEMENTS_SELECTORS.searchInput).type(name);
|
|
// if (withLoader) {
|
|
// cy.get(ASSIGN_ELEMENTS_SELECTORS.dialogContent);
|
|
// waitForProgressBarToNotBeVisible();
|
|
// }
|
|
// cy.contains(ASSIGN_ELEMENTS_SELECTORS.tableRow, name)
|
|
// .find(ASSIGN_ELEMENTS_SELECTORS.checkbox)
|
|
// .click()
|
|
// .get(ASSIGN_ELEMENTS_SELECTORS.submitButton)
|
|
// .click();
|
|
// }
|
|
|
|
Cypress.Commands.add("assignElements", (name, withLoader = true) => {
|
|
cy.get(ASSIGN_ELEMENTS_SELECTORS.searchInput).type(name);
|
|
if (withLoader) {
|
|
cy.get(ASSIGN_ELEMENTS_SELECTORS.dialogContent);
|
|
cy.waitForProgressBarToNotBeVisible();
|
|
}
|
|
cy.contains(ASSIGN_ELEMENTS_SELECTORS.tableRow, name)
|
|
.find(ASSIGN_ELEMENTS_SELECTORS.checkbox)
|
|
.click()
|
|
.get(ASSIGN_ELEMENTS_SELECTORS.submitButton)
|
|
.click();
|
|
});
|