Files
raven-test/e2e/tests/regression/1-smoke/3.1-service-wo.js
2021-12-19 19:59:39 +00:00

35 lines
1.1 KiB
JavaScript

// Basic smoke test, visit every form to ensure they load
describe("SMOKE SERVICE WO SECTION", () => {
it("Service WO forms open without error", () => {
cy.visit("/login");
cy.get("input[name=username]").clear().type(Cypress.env("adminusername"));
// {enter} causes the form to submit
cy.get("input[name=password]")
.clear()
.type(`${Cypress.env("adminpassword")}{enter}`);
//################# SERVICE WO
cy.visit("/svc-workorders");
cy.url().should("include", "/svc-workorders");
cy.get("[data-cy=generalerror]").should("not.exist");
cy.get("[data-cy=workordersTable]");
cy.visit("/svc-workorders/1");
cy.url().should("include", "svc-workorders/1");
cy.get("[data-cy=generalerror]").should("not.exist");
cy.get("[data-cy=customerId]", { timeout: 10000 });
//LOGOUT
cy.get("[data-cy=navicon]").click();
cy.get("[data-cy=logout]").click();
cy.url().should("include", "/login");
cy.get("[data-cy=generalerror]").should("not.exist");
//-----------------------------------------------------
});
});