95 lines
3.4 KiB
JavaScript
95 lines
3.4 KiB
JavaScript
// Basic smoke test, visit every form to ensure they load
|
|
|
|
describe("SMOKE INVENTORY", () => {
|
|
it("Inventory 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}`);
|
|
|
|
|
|
//################# INVENTORY
|
|
cy.visit("/inv-parts");
|
|
cy.url().should("include", "/inv-parts");
|
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
|
cy.get("[data-cy=partsTable]");
|
|
|
|
cy.visit("/inv-parts/1");
|
|
cy.url().should("include", "/inv-parts/1");
|
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
|
cy.get("[data-cy=name]");
|
|
|
|
cy.visit("/inv-purchase-orders");
|
|
cy.url().should("include", "/inv-purchase-orders");
|
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
|
cy.get("[data-cy=purchaseordersTable]");
|
|
|
|
cy.visit("/inv-purchase-orders/1");
|
|
cy.url().should("include", "/inv-purchase-orders/1");
|
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
|
cy.get("[data-cy=serial]");
|
|
|
|
cy.visit("/inv-part-requests");
|
|
cy.url().should("include", "/inv-part-requests");
|
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
|
cy.get("[data-cy=partInventoryRequestTable]");
|
|
|
|
cy.visit("/inv-part-inventory");
|
|
cy.url().should("include", "/inv-part-inventory");
|
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
|
cy.get("[data-cy=partInventoryTable]");
|
|
|
|
cy.visit("/inv-part-inventory-transactions");
|
|
cy.url().should("include", "/inv-part-inventory-transactions");
|
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
|
cy.get("[data-cy=partInventoryTransactionsTable]");
|
|
|
|
cy.visit("/inv-part-assemblies");
|
|
cy.url().should("include", "/inv-part-assemblies");
|
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
|
cy.get("[data-cy=partassemblysTable]");
|
|
|
|
cy.visit("/inv-part-assemblies/1");
|
|
cy.url().should("include", "/inv-part-assemblies/1");
|
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
|
cy.get("[data-cy=name]");
|
|
|
|
cy.visit("/inv-part-serials/1");
|
|
cy.url().should("include", "/inv-part-serials/1");
|
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
|
cy.get("[data-cy=selectedPartId]");
|
|
|
|
cy.visit("/inv-part-stock-levels/1");
|
|
cy.url().should("include", "/inv-part-stock-levels/1");
|
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
|
cy.get("[data-cy=selectedPartId]");
|
|
|
|
cy.visit("/inv-part-warehouses");
|
|
cy.url().should("include", "/inv-part-warehouses");
|
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
|
cy.get("[data-cy=partwarehousesTable]");
|
|
|
|
cy.visit("/inv-part-warehouses/1");
|
|
cy.url().should("include", "/inv-part-warehouses/1");
|
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
|
cy.get("[data-cy=name]");
|
|
|
|
cy.visit("/inv-part-adjustment");
|
|
cy.url().should("include", "/inv-part-adjustment");
|
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
|
cy.get("[data-cy=description]");
|
|
|
|
//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");
|
|
|
|
//-----------------------------------------------------
|
|
});
|
|
});
|