
* 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
16 lines
408 B
JavaScript
16 lines
408 B
JavaScript
Cypress.Commands.add("getTextFromElement", element =>
|
|
cy.get(element).invoke("text")
|
|
);
|
|
|
|
Cypress.Commands.add("clearAndType", { prevSubject: true }, (subject, text) => {
|
|
cy.wrap(subject)
|
|
.clear()
|
|
.type(text);
|
|
});
|
|
|
|
Cypress.Commands.add("waitForRequestAndCheckIfNoErrors", alias => {
|
|
cy.wait(alias).then(resp => {
|
|
expect(resp.response.body.errors).to.be.undefined;
|
|
return resp;
|
|
});
|
|
});
|