Files
raven-test/e2e/tests/regression/1-smoke/009-accounting.js
2021-12-20 17:35:33 +00:00

55 lines
1.8 KiB
JavaScript

// Basic smoke test, visit every form to ensure they load
describe("SMOKE", () => {
it("Every form 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}`);
//################# ACCOUNTING
cy.visit("/acc-service-rates");
cy.url().should("include", "/acc-service-rates");
cy.get("[data-cy=generalerror]").should("not.exist");
cy.get("[data-cy=serviceRatesTable]");
cy.visit("/acc-service-rates/1");
cy.url().should("include", "/acc-service-rates/1");
cy.get("[data-cy=generalerror]").should("not.exist");
cy.get("[data-cy=name]");
cy.visit("/acc-travel-rates");
cy.url().should("include", "/acc-travel-rates");
cy.get("[data-cy=generalerror]").should("not.exist");
cy.get("[data-cy=travelRatesTable]");
cy.visit("/acc-travel-rates/1");
cy.url().should("include", "/acc-travel-rates/1");
cy.get("[data-cy=generalerror]").should("not.exist");
cy.get("[data-cy=name]");
cy.visit("/acc-tax-codes");
cy.url().should("include", "/acc-tax-codes");
cy.get("[data-cy=generalerror]").should("not.exist");
cy.get("[data-cy=taxCodesTable]");
cy.visit("/acc-tax-codes/1");
cy.url().should("include", "/acc-tax-codes/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");
//-----------------------------------------------------
});
});