From f1814a16f8dc53a2ee2973382e949dcbeb1c1eff Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 21 Dec 2021 18:27:06 +0000 Subject: [PATCH] --- e2e/package.json | 8 +-- e2e/tests/regression/1-smoke/014-nav-menu.js | 76 +++++++++++++++----- 2 files changed, 64 insertions(+), 20 deletions(-) diff --git a/e2e/package.json b/e2e/package.json index fd5e629..01e48b4 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -6,13 +6,13 @@ "directories": { "test": "tests" }, - "dependencies": { - "cypress": "^9.1.1" + "dependencies": {}, + "devDependencies": { + "cypress": "^9.2.0" }, - "devDependencies": {}, "scripts": { "open": "./node_modules/.bin/cypress open", - "all-chrome": "./node_modules/.bin/cypress run --browser chrome", + "all-chrome": "./node_modules/.bin/cypress run --browser chrome", "all-ff": "./node_modules/.bin/cypress run --browser firefox", "smoke-ff": "./node_modules/.bin/cypress run --browser firefox --spec ./tests/regression/1-smoke/*.js", "smoke-chrome": "./node_modules/.bin/cypress run --browser chrome --spec ./tests/regression/1-smoke/*.js" diff --git a/e2e/tests/regression/1-smoke/014-nav-menu.js b/e2e/tests/regression/1-smoke/014-nav-menu.js index 8bbe010..6a5a3f5 100644 --- a/e2e/tests/regression/1-smoke/014-nav-menu.js +++ b/e2e/tests/regression/1-smoke/014-nav-menu.js @@ -1,27 +1,71 @@ -// Basic smoke test, visit every form to ensure they load - +// Basic nav and menu test just to confirm each section menu works describe("SMOKE NAV", () => { it("Nav and menu functions correctly", () => { cy.ayLogin("admin"); + cy.get("[data-cy=navicon]").click(); cy.get("[data-cy=home]").click(); - cy.get("[data-cy='nav/home-memos']").click(); + cy.get("[data-cy='nav/home-dashboard']").click(); + cy.get("[data-cy=generalerror]").should("not.exist"); - // cy.visit("/vendors"); - // cy.url().should("include", "/vendors"); - // cy.get("[data-cy=generalerror]").should("not.exist"); - // cy.get("[data-cy=vendorsTable]"); + cy.get("[data-cy=navicon]").click(); + cy.get("[data-cy=customer]").click(); + cy.get("[data-cy='nav/cust-head-offices']").click(); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=headofficesTable]"); - // cy.visit("/vendors/1"); - // cy.url().should("include", "vendors/1"); - // cy.get("[data-cy=generalerror]").should("not.exist"); - // cy.get("[data-cy=name]"); + cy.get("[data-cy=navicon]").click(); + cy.get("[data-cy=service]").click(); + cy.get("[data-cy='nav/svc-projects']").click(); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=projectsTable]"); - // //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"); + cy.get("[data-cy=navicon]").click(); + cy.get("[data-cy=inventory]").click(); + cy.get("[data-cy='nav/inv-part-warehouses']").click(); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=partwarehousesTable]"); + + cy.get("[data-cy=navicon]").click(); + cy.get("[data-cy=vendor]").click(); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=vendorsTable]"); + + cy.get("[data-cy=navicon]").click(); + cy.get("[data-cy=accounting]").click(); + cy.get("[data-cy='nav/acc-tax-codes']").click(); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=taxCodesTable]"); + + cy.get("[data-cy=navicon]").click(); + cy.get("[data-cy=administration]").click(); + cy.get("[data-cy='nav/adm-import']").click(); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=ayaType]"); + + cy.get("[data-cy=navicon]").click(); + cy.get("[data-cy=operations]").click(); + cy.get("[data-cy='nav/ops-jobs']").click(); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=jobsTable]"); + + cy.get("[data-cy=navicon]").click(); + cy.get("[data-cy=evaluate]").click(); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=btnSeed]"); + + cy.get("[data-cy=notification]").click(); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=notifications]"); + + cy.get("[data-cy=contextmenu]").click(); + cy.get("[data-cy='app:help']") + cy.get("[data-cy='app:nav:abt']"); + + 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"); //----------------------------------------------------- });