From 5acf1a4e00381586ebfec9a38d4bbe4c28f259ed Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Sun, 19 Dec 2021 19:59:39 +0000 Subject: [PATCH] --- e2e/cypress.json | 4 +- e2e/notes.txt | 13 +-- .../{3-service.js => 3.0-service-misc.js} | 80 +++++++++++++------ .../regression/1-smoke/3.1-service-wo.js | 34 ++++++++ .../regression/1-smoke/3.2-service-quote.js | 23 ++++++ .../regression/1-smoke/3.3-service-pm.js | 23 ++++++ 6 files changed, 138 insertions(+), 39 deletions(-) rename e2e/tests/regression/1-smoke/{3-service.js => 3.0-service-misc.js} (58%) create mode 100644 e2e/tests/regression/1-smoke/3.1-service-wo.js create mode 100644 e2e/tests/regression/1-smoke/3.2-service-quote.js create mode 100644 e2e/tests/regression/1-smoke/3.3-service-pm.js diff --git a/e2e/cypress.json b/e2e/cypress.json index 8d655bc..fe2157f 100644 --- a/e2e/cypress.json +++ b/e2e/cypress.json @@ -2,9 +2,9 @@ "defaultCommandTimeout":7000, "integrationFolder": "tests", "supportFile":"support", - "baseUrl": "http://localhost:7575", + "xxbaseUrl": "http://localhost:7575", "xbaseUrl": "https://test.helloayanova.com", - "xxbaseUrl":"http://localhost:8080", + "baseUrl":"http://localhost:8080", "video":false, "env": { "apiBaseUrl":"http://localhost:7575/api/v8.0/", diff --git a/e2e/notes.txt b/e2e/notes.txt index 6c2ca2c..6110ec5 100644 --- a/e2e/notes.txt +++ b/e2e/notes.txt @@ -3,16 +3,7 @@ todo: missing smoke tests: path: "/svc-workorder-* (all subitem lists and some others) all svc-quote* except for one main quotes lists (many of these) all svc-pms* except for one main pm list (many many subitems) - path: "/svc-meter-readings/:unitid", - path: "/svc-meter-reading/:recordid", - path: "/svc-work-order-status", - path: "/svc-work-order-status/:recordid", - path: "/svc-work-order-item-status", -path: "/svc-work-order-item-status/:recordid", - path: "/svc-work-order-item-priorities", - path: "/svc-work-order-item-priorities/:recordid", - path: "/svc-task-groups", - path: "/svc-task-group/:recordid", + path: "/inv-part-requests", path: "/adm-attachments", path: "/customer-workorders/:recordid", @@ -31,7 +22,7 @@ path: "/customer-csr/:recordid", - +todo: meter reading table click on item to confirm item page no other way to easily get id of unit metered unless create it or something TODO: high priority grid sort and filter test that excercises *all* options and filter types diff --git a/e2e/tests/regression/1-smoke/3-service.js b/e2e/tests/regression/1-smoke/3.0-service-misc.js similarity index 58% rename from e2e/tests/regression/1-smoke/3-service.js rename to e2e/tests/regression/1-smoke/3.0-service-misc.js index 2d50f0c..537e6da 100644 --- a/e2e/tests/regression/1-smoke/3-service.js +++ b/e2e/tests/regression/1-smoke/3.0-service-misc.js @@ -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]"); + + //----------------------------------------------------- }); }); diff --git a/e2e/tests/regression/1-smoke/3.1-service-wo.js b/e2e/tests/regression/1-smoke/3.1-service-wo.js new file mode 100644 index 0000000..3311097 --- /dev/null +++ b/e2e/tests/regression/1-smoke/3.1-service-wo.js @@ -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"); + + //----------------------------------------------------- + }); +}); diff --git a/e2e/tests/regression/1-smoke/3.2-service-quote.js b/e2e/tests/regression/1-smoke/3.2-service-quote.js new file mode 100644 index 0000000..df0647f --- /dev/null +++ b/e2e/tests/regression/1-smoke/3.2-service-quote.js @@ -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]"); + + //----------------------------------------------------- + }); +}); diff --git a/e2e/tests/regression/1-smoke/3.3-service-pm.js b/e2e/tests/regression/1-smoke/3.3-service-pm.js new file mode 100644 index 0000000..efc1225 --- /dev/null +++ b/e2e/tests/regression/1-smoke/3.3-service-pm.js @@ -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]"); + + + //----------------------------------------------------- + }); +});