65 lines
2.1 KiB
JavaScript
65 lines
2.1 KiB
JavaScript
// Basic smoke test, visit every form to ensure they load
|
|
|
|
describe("SMOKE CUSTOMER SECTION", () => {
|
|
it("Customer section forms opens 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}`);
|
|
|
|
|
|
|
|
//################# CUSTOMERS
|
|
cy.visit("/cust-customers");
|
|
cy.url().should("include", "/cust-customers");
|
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
|
cy.get("[data-cy=customersTable]");
|
|
|
|
cy.visit("/cust-customers/1");
|
|
cy.url().should("include", "/cust-customers/1");
|
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
|
cy.get("[data-cy=name]");
|
|
|
|
cy.visit("/cust-customer-notes/1");
|
|
cy.url().should("include", "/cust-customer-notes/1");
|
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
|
cy.get("[data-cy=clickThru]");
|
|
|
|
cy.visit("/cust-customer-note/0");
|
|
cy.url().should("include", "/cust-customer-note/0");
|
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
|
cy.get("[data-cy=notes]");
|
|
|
|
cy.visit("/cust-head-offices");
|
|
cy.url().should("include", "/cust-head-offices");
|
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
|
cy.get("[data-cy=headofficesTable]");
|
|
|
|
cy.visit("/cust-head-offices/1");
|
|
cy.url().should("include", "cust-head-offices/1");
|
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
|
cy.get("[data-cy=name]");
|
|
|
|
cy.visit("/cust-users");
|
|
cy.url().should("include", "/cust-users");
|
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
|
cy.get("[data-cy=custUsersTable]");
|
|
|
|
// cy.visit("/cust-users/0");
|
|
// cy.url().should("include", "/cust-users/0");
|
|
// cy.get("[data-cy=customerId]");
|
|
|
|
//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");
|
|
|
|
//-----------------------------------------------------
|
|
});
|
|
});
|