diff --git a/e2e/tests/regression/smoke-accounting-section-forms.js b/e2e/tests/regression/smoke-accounting-section-forms.js new file mode 100644 index 0000000..3e212f2 --- /dev/null +++ b/e2e/tests/regression/smoke-accounting-section-forms.js @@ -0,0 +1,54 @@ +// 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"); + + //----------------------------------------------------- + }); +}); diff --git a/e2e/tests/regression/smoke-admin-section-forms.js b/e2e/tests/regression/smoke-admin-section-forms.js new file mode 100644 index 0000000..5e9453a --- /dev/null +++ b/e2e/tests/regression/smoke-admin-section-forms.js @@ -0,0 +1,93 @@ +// Basic smoke test, visit every form to ensure they load + +describe("SMOKE ADMIN SECTION", () => { + it("Admin 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}`); + + //################# ADMIN + cy.visit("/adm-global-settings"); + cy.url().should("include", "/adm-global-settings"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=filterCaseSensitive]"); + + cy.visit("/adm-global-select-templates"); + cy.url().should("include", "/adm-global-select-templates"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=selectTemplate]"); + + cy.visit("/adm-global-logo"); + cy.url().should("include", "/adm-global-logo"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=uploadSmall]"); + + cy.visit("/adm-global-seeds"); + cy.url().should("include", "/adm-global-seeds"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=purchaseOrderNextSerial]"); + + cy.visit("/adm-license"); + cy.url().should("include", "/adm-license"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=licenseForm]"); + + cy.visit("/adm-users"); + cy.url().should("include", "/adm-users"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=usersTable]"); + + cy.visit("/adm-users/1"); + cy.url().should("include", "/adm-users/1"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=name]"); + + cy.visit("/adm-translations"); + cy.url().should("include", "/adm-translations"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=transTable]"); + + cy.visit("/adm-translations/1"); + cy.url().should("include", "/adm-translations/1"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=name]"); + + cy.visit("/adm-report-templates"); + cy.url().should("include", "/adm-report-templates"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=reportTemplatesTable]"); + + cy.visit("/report-edit/1"); + cy.url().should("include", "/report-edit/1"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=viewChange]"); + + cy.visit("/adm-attachments"); + cy.url().should("include", "/adm-attachments"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=attachTable]"); + + cy.visit("/adm-history"); + cy.url().should("include", "/adm-history"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=historyTable]"); + + cy.visit("/adm-import"); + cy.url().should("include", "/adm-import"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=ayaType]"); + + //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"); + + //----------------------------------------------------- + }); +}); diff --git a/e2e/tests/regression/smoke-customer-section-forms.js b/e2e/tests/regression/smoke-customer-section-forms.js new file mode 100644 index 0000000..8c437f9 --- /dev/null +++ b/e2e/tests/regression/smoke-customer-section-forms.js @@ -0,0 +1,64 @@ +// 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"); + + //----------------------------------------------------- + }); +}); diff --git a/e2e/tests/regression/smoke-customer-user-section-forms.js b/e2e/tests/regression/smoke-customer-user-section-forms.js new file mode 100644 index 0000000..11baff6 --- /dev/null +++ b/e2e/tests/regression/smoke-customer-user-section-forms.js @@ -0,0 +1,28 @@ +// Basic smoke test, visit every form to ensure they load + +describe("SMOKE CUSTOMER SECTION", () => { + it("Customer User forms open without error", () => { + cy.visit("/login"); + + //CUSTOMER PAGES + cy.get("input[name=username]").clear().type("Customer"); + cy.get("input[name=password]").clear().type("Customer{enter}"); + + cy.url().should("include", "/customer-csr"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=csrTable]"); + + cy.visit("/customer-workorders"); + cy.url().should("include", "/customer-workorders"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=workordersTable]"); + + //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"); + + //----------------------------------------------------- + }); +}); diff --git a/e2e/tests/regression/smoke-home-section-forms.js b/e2e/tests/regression/smoke-home-section-forms.js new file mode 100644 index 0000000..28270d5 --- /dev/null +++ b/e2e/tests/regression/smoke-home-section-forms.js @@ -0,0 +1,114 @@ +// Basic smoke test, visit every form to ensure they load + +describe("SMOKE HOME SECTION", () => { + it("Home 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}`); + + //################# HOME + cy.visit("/home-dashboard"); + cy.url().should("include", "/home-dashboard"); + cy.get("[data-cy=generalerror]").should("not.exist"); + + cy.visit("/home-search"); + cy.url().should("include", "/home-search"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=phrase]"); + + cy.visit("/home-schedule"); + cy.url().should("include", "/home-schedule"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=calendar]"); + + cy.visit("/home-memos"); + cy.url().should("include", "/home-memos"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=memosTable]"); + + cy.visit("/home-memos/0"); //no reliable single id would work for existing + cy.url().should("include", "/home-memos/0"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=pickListSelectedUserId]"); + + cy.visit("/home-reminders"); + cy.url().should("include", "/home-reminders"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=remindersTable]"); + + cy.visit("/home-reminders/0"); + cy.url().should("include", "/home-reminders/0"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=name]"); + + cy.visit("/home-reviews"); + cy.url().should("include", "/home-reviews"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=reviewsTable]"); + + cy.visit("/home-reviews/8/1"); + cy.url().should("include", "/home-reviews/8/1"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=clickThru]"); + + cy.visit("/home-user-settings"); + cy.url().should("include", "/home-user-settings"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=emailAddress]"); + + cy.visit("/home-password"); + cy.url().should("include", "/home-password"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=loginName]"); + + cy.visit("/home-security"); + cy.url().should("include", "/home-security"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=tfa]"); + //confirm a qrCode is actually being displayed + cy.get("[data-cy=qrCodeImage]", { timeout: 15000 }) //this can be slow at times + .should("be.visible") + .and(($img) => { + // "naturalWidth" and "naturalHeight" are set when the image loads + expect($img[0].naturalWidth).to.be.greaterThan(0); + }); + + //can't do this without reset code etc, just logs out + // cy.visit("/home-reset"); + // cy.url().should("include", "/home-reset"); + // cy.get("[data-cy=loginName]"); + + cy.visit("/home-notify-subscriptions"); + cy.url().should("include", "/home-notify-subscriptions"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=subsTable]"); + + cy.visit("/home-notify-subscriptions/0"); + cy.url().should("include", "/home-notify-subscriptions/0"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=eventType]"); + + cy.visit("/home-notifications"); + cy.url().should("include", "/home-notifications"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=notifications]"); + + cy.visit("/home-notify-direct"); + cy.url().should("include", "/home-notify-direct"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=pickListSelectedUserId]"); + + //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"); + + //----------------------------------------------------- + }); +}); diff --git a/e2e/tests/regression/smoke-inventory-section-forms.js b/e2e/tests/regression/smoke-inventory-section-forms.js new file mode 100644 index 0000000..633b54b --- /dev/null +++ b/e2e/tests/regression/smoke-inventory-section-forms.js @@ -0,0 +1,89 @@ +// 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-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"); + + //----------------------------------------------------- + }); +}); diff --git a/e2e/tests/regression/smoke-misc-forms.js b/e2e/tests/regression/smoke-misc-forms.js new file mode 100644 index 0000000..55b9296 --- /dev/null +++ b/e2e/tests/regression/smoke-misc-forms.js @@ -0,0 +1,62 @@ +// Basic smoke test, visit every form to ensure they load + +describe("SMOKE MISC", () => { + it("Misc. 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}`); + + + //################# MISC + cy.visit("/about"); + cy.url().should("include", "/about"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=versionCard]"); + + cy.visit("/applog"); + cy.url().should("include", "/applog"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=logText]"); + + cy.visit("/customize/Customer"); + cy.url().should("include", "/customize/Customer"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=customizeForm]"); + + cy.visit("/data-list-column-view/CustomerDataList"); + cy.url().should("include", "/data-list-column-view/CustomerDataList"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=dlcForm]"); + + cy.visit("/home-reviews/2/1"); + cy.url().should("include", "/home-reviews/2/1"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=reviewsTable]"); + + cy.visit("/history/3/1"); + cy.url().should("include", "/history/3/1"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=timeLine]"); + + cy.visit("/open/8/1"); + cy.url().should("include", "/cust-customers/1"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=name]"); + + cy.visit("/NOTFOUND"); + cy.contains("404"); + + //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"); + + //----------------------------------------------------- + }); +}); diff --git a/e2e/tests/regression/smoke-ops-section-forms.js b/e2e/tests/regression/smoke-ops-section-forms.js new file mode 100644 index 0000000..9ef759a --- /dev/null +++ b/e2e/tests/regression/smoke-ops-section-forms.js @@ -0,0 +1,69 @@ +// Basic smoke test, visit every form to ensure they load + +describe("SMOKE OPERATIONS SECTION", () => { + it("Ops 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}`); + + + //################# OPERATIONS + cy.visit("/ops-backup"); + cy.url().should("include", "/ops-backup"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=backupTable]"); + + cy.visit("/ops-server-state"); + cy.url().should("include", "/ops-server-state"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=serverStateOpen]"); + + cy.visit("/ops-jobs"); + cy.url().should("include", "/ops-jobs"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=jobsTable]"); + + cy.visit("/ops-log"); + cy.url().should("include", "/ops-log"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=selectedLog]"); + + cy.visit("/ops-metrics"); + cy.url().should("include", "/ops-metrics"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=selectedTimePeriod]"); + + cy.visit("/ops-profile"); + cy.url().should("include", "/ops-profile"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=profileCard]"); + + cy.visit("/ops-notification-settings"); + cy.url().should("include", "/ops-notification-settings"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=smtpDeliveryActive]"); + + cy.visit("/ops-notify-queue"); + cy.url().should("include", "/ops-notify-queue"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=notifyQueueTable]"); + + cy.visit("/ops-view-configuration"); + cy.url().should("include", "/ops-view-configuration"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=configCard]"); + + //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"); + + //----------------------------------------------------- + }); +}); diff --git a/e2e/tests/regression/smoke-service-section-forms.js b/e2e/tests/regression/smoke-service-section-forms.js new file mode 100644 index 0000000..2d50f0c --- /dev/null +++ b/e2e/tests/regression/smoke-service-section-forms.js @@ -0,0 +1,108 @@ +// 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"); + + //----------------------------------------------------- + }); +}); diff --git a/e2e/tests/regression/smoke-vendors-section-forms.js b/e2e/tests/regression/smoke-vendors-section-forms.js new file mode 100644 index 0000000..3b17b25 --- /dev/null +++ b/e2e/tests/regression/smoke-vendors-section-forms.js @@ -0,0 +1,34 @@ +// Basic smoke test, visit every form to ensure they load + +describe("SMOKE VENDORS SECTION", () => { + it("Vendors 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}`); + + + //################# VENDORS + cy.visit("/vendors"); + cy.url().should("include", "/vendors"); + cy.get("[data-cy=generalerror]").should("not.exist"); + cy.get("[data-cy=vendorsTable]"); + + cy.visit("/vendors/1"); + cy.url().should("include", "vendors/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"); + + //----------------------------------------------------- + }); +}); diff --git a/e2e/tests/regression/smoke.js b/e2e/tests/regression/smoke.js index 933ea4c..cf9e470 100644 --- a/e2e/tests/regression/smoke.js +++ b/e2e/tests/regression/smoke.js @@ -71,7 +71,7 @@ describe("SMOKE", () => { cy.get("[data-cy=generalerror]").should("not.exist"); cy.get("[data-cy=tfa]"); //confirm a qrCode is actually being displayed - cy.get("[data-cy=qrCodeImage]") + cy.get("[data-cy=qrCodeImage]", { timeout: 15000 }) //this can be slow at times .should("be.visible") .and(($img) => { // "naturalWidth" and "naturalHeight" are set when the image loads @@ -157,7 +157,7 @@ describe("SMOKE", () => { 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.get("[data-cy=customerId]", { timeout: 10000 }); cy.visit("/svc-quotes"); cy.url().should("include", "/svc-quotes");