This commit is contained in:
2021-12-19 19:59:39 +00:00
parent 647f2b7598
commit 5acf1a4e00
6 changed files with 138 additions and 39 deletions

View File

@@ -1,7 +1,7 @@
// Basic smoke test, visit every form to ensure they load
describe("SMOKE SERVICE SECTION", () => {
it("Service forms open without error", () => {
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"));
@@ -17,26 +17,6 @@ describe("SMOKE SERVICE SECTION", () => {
cy.get("[data-cy=generalerror]").should("not.exist");
cy.get("[data-cy=calendar]");
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 });
cy.visit("/svc-quotes");
cy.url().should("include", "/svc-quotes");
cy.get("[data-cy=generalerror]").should("not.exist");
cy.get("[data-cy=quotesTable]");
cy.visit("/svc-pms");
cy.url().should("include", "/svc-pms");
cy.get("[data-cy=generalerror]").should("not.exist");
cy.get("[data-cy=pmsTable]");
cy.visit("/svc-units");
cy.url().should("include", "/svc-units");
cy.get("[data-cy=generalerror]").should("not.exist");
@@ -97,12 +77,60 @@ describe("SMOKE SERVICE SECTION", () => {
cy.get("[data-cy=generalerror]").should("not.exist");
cy.get("[data-cy=name]");
//LOGOUT
cy.get("[data-cy=navicon]").click();
cy.get("[data-cy=logout]").click();
cy.url().should("include", "/login");
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]");
//-----------------------------------------------------
});
});

View File

@@ -0,0 +1,34 @@
// 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");
//-----------------------------------------------------
});
});

View File

@@ -0,0 +1,23 @@
// Basic smoke test, visit every form to ensure they load
describe("SMOKE SERVICE QUOTE SECTION", () => {
it("Service quote 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}`);
cy.visit("/svc-quotes");
cy.url().should("include", "/svc-quotes");
cy.get("[data-cy=generalerror]").should("not.exist");
cy.get("[data-cy=quotesTable]");
//-----------------------------------------------------
});
});

View File

@@ -0,0 +1,23 @@
// Basic smoke test, visit every form to ensure they load
describe("SMOKE SERVICE PM SECTION", () => {
it("Service pm 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}`);
cy.visit("/svc-pms");
cy.url().should("include", "/svc-pms");
cy.get("[data-cy=generalerror]").should("not.exist");
cy.get("[data-cy=pmsTable]");
//-----------------------------------------------------
});
});