This commit is contained in:
136
e2e/tests/regression/1-smoke/3.0-service-misc.js
Normal file
136
e2e/tests/regression/1-smoke/3.0-service-misc.js
Normal file
@@ -0,0 +1,136 @@
|
||||
// Basic smoke test, visit every form to ensure they load
|
||||
|
||||
describe("SMOKE SERVICE MISC SECTION", () => {
|
||||
it("Service MISC 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
|
||||
cy.visit("/svc-schedule");
|
||||
cy.url().should("include", "/svc-schedule");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=calendar]");
|
||||
|
||||
cy.visit("/svc-units");
|
||||
cy.url().should("include", "/svc-units");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=unitsTable]");
|
||||
|
||||
cy.visit("/svc-units/1");
|
||||
cy.url().should("include", "/svc-units/1");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=serial]");
|
||||
|
||||
cy.visit("/svc-unit-models");
|
||||
cy.url().should("include", "/svc-unit-models");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=unitmodelsTable]");
|
||||
|
||||
cy.visit("/svc-unit-models/1");
|
||||
cy.url().should("include", "svc-unit-models/1");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=name]");
|
||||
|
||||
cy.visit("/svc-loaners");
|
||||
cy.url().should("include", "/svc-loaners");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=loanUnitsTable]");
|
||||
|
||||
cy.visit("/svc-loaners/1");
|
||||
cy.url().should("include", "/svc-loaners/1");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=name]");
|
||||
|
||||
cy.visit("/svc-contracts");
|
||||
cy.url().should("include", "/svc-contracts");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=contractsTable]");
|
||||
|
||||
cy.visit("/svc-contracts/1");
|
||||
cy.url().should("include", "/svc-contracts/1");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=name]");
|
||||
|
||||
cy.visit("/svc-projects");
|
||||
cy.url().should("include", "/svc-projects");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=projectsTable]");
|
||||
|
||||
cy.visit("/svc-projects/1");
|
||||
cy.url().should("include", "/svc-projects/1");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=name]");
|
||||
|
||||
cy.visit("/svc-csr");
|
||||
cy.url().should("include", "/svc-csr");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=csrTable]");
|
||||
|
||||
cy.visit("/svc-csr/1");
|
||||
cy.url().should("include", "/svc-csr/1");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=name]");
|
||||
|
||||
cy.visit("/svc-meter-readings");
|
||||
cy.url().should("include", "/svc-meter-readings");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=MeterReadingsTable]");
|
||||
|
||||
//HMMM need a meter reading id to be certain, maybe a click on an item in the above table will take care of it
|
||||
// path: "/svc-meter-readings/:unitid",
|
||||
|
||||
cy.visit("/svc-meter-reading/0");
|
||||
cy.url().should("include", "/svc-meter-reading/0");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=meter]");
|
||||
|
||||
cy.visit("/svc-work-order-status");
|
||||
cy.url().should("include", "/svc-work-order-status");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=woStatusTable]");
|
||||
|
||||
cy.visit("/svc-work-order-status/1");
|
||||
cy.url().should("include", "/svc-work-order-status/1");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=name]");
|
||||
|
||||
cy.visit("/svc-work-order-item-status");
|
||||
cy.url().should("include", "/svc-work-order-item-status");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=woItemStatusTable]");
|
||||
|
||||
cy.visit("/svc-work-order-item-status/1");
|
||||
cy.url().should("include", "/svc-work-order-item-status/1");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=name]");
|
||||
|
||||
cy.visit("/svc-work-order-item-priorities");
|
||||
cy.url().should("include", "/svc-work-order-item-priorities");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=woItemPriorityTable]");
|
||||
|
||||
cy.visit("/svc-work-order-item-priorities/1");
|
||||
cy.url().should("include", "/svc-work-order-item-priorities/1");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=name]");
|
||||
|
||||
cy.visit("/svc-task-groups");
|
||||
cy.url().should("include", "/svc-task-groups");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=taskGroupTable]");
|
||||
|
||||
cy.visit("/svc-task-groups/1");
|
||||
cy.url().should("include", "/svc-task-groups/1");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=name]");
|
||||
|
||||
|
||||
//-----------------------------------------------------
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user