test: ui test for stock levels

This commit is contained in:
Ankush Menat
2021-07-02 20:36:51 +05:30
committed by Ankush
parent b99469cdab
commit bedb0addf0
2 changed files with 50 additions and 0 deletions

View File

@@ -23,3 +23,9 @@
//
// -- This is will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... });
const slug = (name) => name.toLowerCase().replace(" ", "-");
Cypress.Commands.add("go_to_doc", (doctype, name) => {
cy.visit(`/app/${slug(doctype)}/${encodeURIComponent(name)}`);
});