109 lines
3.7 KiB
JavaScript
109 lines
3.7 KiB
JavaScript
// Basic smoke test, visit every form to ensure they load
|
|
|
|
describe("SMOKE SERVICE SECTION", () => {
|
|
it("Service 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-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");
|
|
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]");
|
|
|
|
//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");
|
|
|
|
//-----------------------------------------------------
|
|
});
|
|
});
|