This commit is contained in:
@@ -2,15 +2,7 @@
|
||||
|
||||
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}`);
|
||||
cy.url().should("include", "/ay-evaluate");
|
||||
cy.ayLogin("admin");
|
||||
|
||||
//################# HOME
|
||||
cy.visit("/home-dashboard");
|
||||
|
||||
@@ -2,15 +2,7 @@
|
||||
|
||||
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}`);
|
||||
cy.url().should("include", "/ay-evaluate");
|
||||
cy.ayLogin("admin");
|
||||
|
||||
//################# CUSTOMERS
|
||||
cy.visit("/cust-customers");
|
||||
|
||||
@@ -2,15 +2,7 @@
|
||||
|
||||
describe("SMOKE SERVICE MISC SECTION", () => {
|
||||
it("Service 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}`);
|
||||
cy.url().should("include", "/ay-evaluate");
|
||||
cy.ayLogin("admin");
|
||||
//################# SERVICE
|
||||
cy.visit("/svc-schedule");
|
||||
cy.url().should("include", "/svc-schedule");
|
||||
|
||||
@@ -2,15 +2,7 @@
|
||||
|
||||
describe("SMOKE SERVICE WO SECTION", () => {
|
||||
it("Service WO 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}`);
|
||||
cy.url().should("include", "/ay-evaluate");
|
||||
cy.ayLogin("admin");
|
||||
//################# SERVICE WO
|
||||
|
||||
cy.visit("/svc-workorders");
|
||||
|
||||
@@ -2,14 +2,7 @@
|
||||
|
||||
describe("SMOKE SERVICE QUOTE SECTION", () => {
|
||||
it("Service quote 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}`);
|
||||
cy.ayLogin("admin");
|
||||
|
||||
|
||||
cy.visit("/svc-quotes");
|
||||
|
||||
@@ -2,15 +2,7 @@
|
||||
|
||||
describe("SMOKE SERVICE PM SECTION", () => {
|
||||
it("Service pm 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}`);
|
||||
cy.url().should("include", "/ay-evaluate");
|
||||
cy.ayLogin("admin");
|
||||
|
||||
cy.visit("/svc-pms");
|
||||
cy.url().should("include", "/svc-pms");
|
||||
|
||||
@@ -2,15 +2,7 @@
|
||||
|
||||
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}`);
|
||||
cy.url().should("include", "/ay-evaluate");
|
||||
cy.ayLogin("admin");
|
||||
|
||||
//################# INVENTORY
|
||||
cy.visit("/inv-parts");
|
||||
|
||||
@@ -2,17 +2,7 @@
|
||||
|
||||
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}`);
|
||||
cy.url().should("include", "/ay-evaluate");
|
||||
|
||||
//################# VENDORS
|
||||
cy.ayLogin("admin");
|
||||
cy.visit("/vendors");
|
||||
cy.url().should("include", "/vendors");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
|
||||
@@ -2,17 +2,7 @@
|
||||
|
||||
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}`);
|
||||
cy.url().should("include", "/ay-evaluate");
|
||||
|
||||
//################# ACCOUNTING
|
||||
cy.ayLogin("accounting");
|
||||
|
||||
cy.visit("/acc-service-rates");
|
||||
cy.url().should("include", "/acc-service-rates");
|
||||
|
||||
@@ -2,16 +2,7 @@
|
||||
|
||||
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}`);
|
||||
cy.url().should("include", "/ay-evaluate");
|
||||
//################# ADMIN
|
||||
cy.ayLogin("admin");
|
||||
cy.visit("/adm-global-settings");
|
||||
cy.url().should("include", "/adm-global-settings");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
|
||||
@@ -2,17 +2,7 @@
|
||||
|
||||
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}`);
|
||||
cy.url().should("include", "/ay-evaluate");
|
||||
|
||||
//################# OPERATIONS
|
||||
cy.ayLogin("admin");
|
||||
cy.visit("/ops-backup");
|
||||
cy.url().should("include", "/ops-backup");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
|
||||
@@ -2,17 +2,7 @@
|
||||
|
||||
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}`);
|
||||
cy.url().should("include", "/ay-evaluate");
|
||||
cy.url().should("include", "/ay-evaluate");
|
||||
//################# MISC
|
||||
cy.ayLogin("admin");
|
||||
cy.visit("/about");
|
||||
cy.url().should("include", "/about");
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
|
||||
@@ -2,13 +2,8 @@
|
||||
|
||||
describe("SMOKE CUSTOMER SECTION", () => {
|
||||
it("Customer User forms open without error", () => {
|
||||
cy.visit("/login");
|
||||
cy.ayLogin("accounting", "/customer-csr");
|
||||
|
||||
//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]");
|
||||
|
||||
@@ -17,7 +12,7 @@ describe("SMOKE CUSTOMER SECTION", () => {
|
||||
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||
cy.get("[data-cy=workordersTable]");
|
||||
|
||||
//todo:
|
||||
//todo:
|
||||
//path: "/customer-workorders/:recordid",
|
||||
//path: "/customer-csr/:recordid"
|
||||
|
||||
|
||||
20
e2e/tests/regression/accounting-user/000-setup.js
Normal file
20
e2e/tests/regression/accounting-user/000-setup.js
Normal file
@@ -0,0 +1,20 @@
|
||||
/// <reference types="cypress" />
|
||||
describe("When Accounting user logs in", () => {
|
||||
it("should set up accounting block user options", () => {
|
||||
cy.ayLogin("accounting");
|
||||
|
||||
//open nav pane
|
||||
cy.get("[data-cy=navicon]").click();
|
||||
cy.contains("- Accounting"); //part of name displayed at top
|
||||
|
||||
//USER OPTIONS
|
||||
cy.get("[data-cy=home]").click();
|
||||
|
||||
cy.get("[data-cy='nav/home-user-settings']").click();
|
||||
cy.url().should("include", "/home-user-settings");
|
||||
cy.get("[data-cy='nativeDateTimeInput']").check({ force: true });
|
||||
|
||||
//END OF TEST
|
||||
//-----------------------------------------------------
|
||||
});
|
||||
});
|
||||
19
e2e/tests/regression/accounting-user/0100-search.js
Normal file
19
e2e/tests/regression/accounting-user/0100-search.js
Normal file
@@ -0,0 +1,19 @@
|
||||
/// <reference types="cypress" />
|
||||
describe("Search", () => {
|
||||
it("should work", () => {
|
||||
//SEARCH
|
||||
cy.get("[data-cy=navicon]").click();
|
||||
cy.get("[data-cy='nav/home-search']").click();
|
||||
cy.url().should("include", "/home-search");
|
||||
cy.get("[data-cy=phrase]").clear().type("xyz{enter}");
|
||||
//check for expected results
|
||||
cy.contains("Customer");
|
||||
cy.contains("XYZ Accounting");
|
||||
cy.contains("Head Office");
|
||||
cy.contains("XYZ Head Office");
|
||||
|
||||
//END OF TEST
|
||||
//-----------------------------------------------------
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/// <reference types="cypress" />
|
||||
describe("When Accounting user logs in", () => {
|
||||
describe.skip("When Accounting user logs in", () => {
|
||||
it("should correctly run all functionality", () => {
|
||||
//format for typing input and setting value is always YYYY-MM-DD for date and HH:MM in 24 hour time for time
|
||||
const dNow = new Date();
|
||||
@@ -14,16 +14,7 @@ describe("When Accounting user logs in", () => {
|
||||
.toString()
|
||||
.padStart(2, "0")}:${dNow.getMinutes().toString().padStart(2, "0")}`;
|
||||
|
||||
cy.visit("/login");
|
||||
|
||||
cy.get("input[name=username]").clear().type(Cypress.env("accountinguser"));
|
||||
|
||||
// {enter} causes the form to submit
|
||||
cy.get("input[name=password]")
|
||||
.clear()
|
||||
.type(`${Cypress.env("accountingpassword")}{enter}`);
|
||||
|
||||
cy.url().should("include", "/ay-evaluate");
|
||||
cy.ayLogin("accounting");
|
||||
|
||||
//open nav pane
|
||||
cy.get("[data-cy=navicon]").click();
|
||||
|
||||
@@ -2,16 +2,9 @@
|
||||
|
||||
import dayjs from "../../../support/dayjs.min.js";
|
||||
|
||||
describe("When Service user logs in", () => {
|
||||
describe.skip("When Service user logs in", () => {
|
||||
it("should correctly run all functionality", () => {
|
||||
cy.visit("/login");
|
||||
cy.get("input[name=username]").clear().type(Cypress.env("serviceuser"));
|
||||
// {enter} causes the form to submit
|
||||
cy.get("input[name=password]")
|
||||
.clear()
|
||||
.type(`${Cypress.env("servicepassword")}{enter}`);
|
||||
|
||||
cy.url().should("include", "/ay-evaluate");
|
||||
cy.ayLogin("service");
|
||||
|
||||
//open nav pane
|
||||
cy.get("[data-cy=navicon]").click();
|
||||
|
||||
Reference in New Issue
Block a user