4643
This commit is contained in:
12
e2e/tests/regression/3-accounting-user/000-setup.cy.js
Normal file
12
e2e/tests/regression/3-accounting-user/000-setup.cy.js
Normal file
@@ -0,0 +1,12 @@
|
||||
/// <reference types="cypress" />
|
||||
describe("Login nav menu", () => {
|
||||
it("should display user name", () => {
|
||||
cy.ayLogin("accounting");
|
||||
|
||||
//open nav pane
|
||||
cy.get("[data-cy=navicon]").click();
|
||||
cy.contains("- Accounting"); //part of name displayed at top
|
||||
|
||||
//-----------------------------------------------------
|
||||
});
|
||||
});
|
||||
19
e2e/tests/regression/3-accounting-user/0100-search.cy.js
Normal file
19
e2e/tests/regression/3-accounting-user/0100-search.cy.js
Normal file
@@ -0,0 +1,19 @@
|
||||
/// <reference types="cypress" />
|
||||
describe("Search", () => {
|
||||
it("should work", () => {
|
||||
|
||||
cy.ayLogin("accounting");
|
||||
cy.visit("/home-search");
|
||||
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
|
||||
//-----------------------------------------------------
|
||||
});
|
||||
});
|
||||
|
||||
48
e2e/tests/regression/3-accounting-user/0200-memo.cy.js
Normal file
48
e2e/tests/regression/3-accounting-user/0200-memo.cy.js
Normal file
@@ -0,0 +1,48 @@
|
||||
/// <reference types="cypress" />
|
||||
describe("Memo features", () => {
|
||||
it("should work", () => {
|
||||
cy.ayLogin("accounting");
|
||||
|
||||
cy.visit("/home-memos");
|
||||
cy.url().should("include", "/home-memos");
|
||||
cy.get("[data-cy=memosTable]");
|
||||
cy.get("[data-cy='memo-list:new']").click();
|
||||
cy.url().should("include", "/home-memos/");
|
||||
cy.get("[data-cy=pickListSelectedUserId]")
|
||||
.click()
|
||||
.type("accounting{downarrow}{enter}"); //select Accounting user (self)
|
||||
cy.get("[data-cy=name]").type(
|
||||
`${Cypress.config("cyid")}-test-subject{enter}`
|
||||
);
|
||||
cy.get("[data-cy=notes]").type(
|
||||
`The quick brown fox jumped{enter}over the six lazy dogs{enter}eot`
|
||||
);
|
||||
cy.ayChooseExistingTags("tags", ["zone1", "blue", "zone2"]);
|
||||
cy.get("[data-cy='memo-edit:save'] > .v-btn__content").click();
|
||||
cy.url().should("include", "/home-memos");
|
||||
cy.contains(`${Cypress.config("cyid")}-test-subject`).click(); //find and open memo record
|
||||
cy.contains("zone1");
|
||||
cy.contains("blue");
|
||||
cy.contains("zone2");
|
||||
|
||||
//reply
|
||||
cy.get("[data-cy=contextmenu]").click();
|
||||
cy.get("[data-cy='memo-edit:reply']").click();
|
||||
cy.url().should("include", "/home-memos/");
|
||||
cy.get("[data-cy=notes]").type(`this is my reply`);
|
||||
cy.get("[data-cy='memo-edit:save'] > .v-btn__content").click();
|
||||
cy.contains(`RE: ${Cypress.config("cyid")}-test-subject`).click(); //find and open reply
|
||||
|
||||
//forward to superuser
|
||||
cy.get("[data-cy=contextmenu]").click();
|
||||
cy.get("[data-cy='memo-edit:forward']").click();
|
||||
cy.url().should("include", "/home-memos/");
|
||||
cy.get("[data-cy=notes]").type(
|
||||
`Hello SuperUser this is my forward to you!{enter}eot{enter}`
|
||||
);
|
||||
cy.get("[data-cy=pickListSelectedUserId]")
|
||||
.click()
|
||||
.type("SuperUser{downarrow}{enter}");
|
||||
cy.get("[data-cy='memo-edit:save'] > .v-btn__content").click();
|
||||
});
|
||||
});
|
||||
40
e2e/tests/regression/3-accounting-user/0300-reminder.cy.js
Normal file
40
e2e/tests/regression/3-accounting-user/0300-reminder.cy.js
Normal file
@@ -0,0 +1,40 @@
|
||||
/// <reference types="cypress" />
|
||||
describe("Reminder features", () => {
|
||||
it("should work", () => {
|
||||
const dNow = new Date();
|
||||
const dToday = `${dNow.getFullYear()}-${(dNow.getMonth() + 1)
|
||||
.toString()
|
||||
.padStart(2, "0")}-${dNow.getDate().toString().padStart(2, "0")}`;
|
||||
const tNow = `${dNow.getHours().toString().padStart(2, "0")}:${dNow
|
||||
.getMinutes()
|
||||
.toString()
|
||||
.padStart(2, "0")}`;
|
||||
const tOneHourFromNow = `${(dNow.getHours() + 1)
|
||||
.toString()
|
||||
.padStart(2, "0")}:${dNow.getMinutes().toString().padStart(2, "0")}`;
|
||||
|
||||
cy.ayLogin("accounting");
|
||||
cy.aySetTestableUserOptions();
|
||||
cy.visit("/home-reminders");
|
||||
cy.url().should("include", "/home-reminders");
|
||||
cy.get("[data-cy='reminder-list:new']:first").click();
|
||||
cy.url().should("include", "/home-reminders/");
|
||||
cy.get("[data-cy=name]").type(
|
||||
`${Cypress.config("cyid")}-test-reminder{enter}`
|
||||
);
|
||||
cy.get("[data-cy='startDate:date']").type(dToday);
|
||||
cy.get("[data-cy='startDate:time']").type(tNow);
|
||||
cy.get("[data-cy='stopDate:date']").type(dToday);
|
||||
cy.get("[data-cy='stopDate:time']").type(tOneHourFromNow);
|
||||
cy.get("[data-cy=notes]").type(`This is a reminder{enter}eot{enter}`);
|
||||
cy.get(".v-color-picker__input > input").clear().type("#11E1D07E{enter}"); //select a color
|
||||
cy.get('[data-cy="reminder-edit:save"] > .v-btn__content').click();
|
||||
cy.visit("/home-reminders");
|
||||
cy.url().should("include", "/home-reminders");
|
||||
|
||||
//should show reminder made above in month display by default
|
||||
cy.visit("/home-schedule");
|
||||
cy.url().should("include", "/home-schedule");
|
||||
cy.contains(`${Cypress.config("cyid")}-test-reminder`);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
/// <reference types="cypress" />
|
||||
describe("Notify subscribe", () => {
|
||||
it("should work", () => {
|
||||
cy.ayLogin("accounting");
|
||||
cy.aySetTestableUserOptions();
|
||||
cy.visit("/home-notify-subscriptions");
|
||||
cy.url().should("include", "/home-notify-subscriptions");
|
||||
cy.get("[data-cy='notify-subscriptions:new']:first").click();
|
||||
cy.url().should("include", "/home-notify-subscriptions/0");
|
||||
cy.ayChooseVSelect("eventType", "Object created");
|
||||
cy.ayChooseVSelect("ayaType", "Contract");
|
||||
cy.get("[data-cy='notify-subscription:save'] > .v-btn__content").click();
|
||||
cy.visit("/home-notify-subscriptions");
|
||||
cy.url().should("include", "/home-notify-subscriptions");
|
||||
cy.contains("Object created");
|
||||
cy.contains("Contract");
|
||||
cy.contains("Deliver in application");
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,75 @@
|
||||
/// <reference types="cypress" />
|
||||
describe("Contract create, review, history", () => {
|
||||
it("should work", () => {
|
||||
const dNow = new Date();
|
||||
const dToday = `${dNow.getFullYear()}-${(dNow.getMonth() + 1)
|
||||
.toString()
|
||||
.padStart(2, "0")}-${dNow.getDate().toString().padStart(2, "0")}`;
|
||||
// const tNow = `${dNow.getHours().toString().padStart(2, "0")}:${dNow
|
||||
// .getMinutes()
|
||||
// .toString()
|
||||
// .padStart(2, "0")}`;
|
||||
const tOneHourFromNow = `${(dNow.getHours() + 1)
|
||||
.toString()
|
||||
.padStart(2, "0")}:${dNow.getMinutes().toString().padStart(2, "0")}`;
|
||||
|
||||
cy.ayLogin("accounting");
|
||||
cy.aySetTestableUserOptions();
|
||||
|
||||
cy.visit("/svc-contracts");
|
||||
cy.url().should("include", "/svc-contracts");
|
||||
cy.get("[data-cy=contractsTable]");
|
||||
cy.get("[data-cy='contract-list:new']:first").click();
|
||||
cy.get("[data-cy=name]").type(
|
||||
`${Cypress.config("cyid")}-test-contract{enter}`
|
||||
);
|
||||
cy.get("[data-cy='responseTime:days']").type("7");
|
||||
cy.get("[data-cy='partsOverridePct']").type("2");
|
||||
cy.get("[data-cy='serviceRatesOverridePct']").type("3");
|
||||
cy.get("[data-cy='travelRatesOverridePct']").type("4");
|
||||
cy.get("[data-cy=notes]").type(`Test contract NOTES!!!{enter}eot{enter}`);
|
||||
cy.get("[data-cy=alertNotes]").type(
|
||||
`Test contract alert message{enter}eot{enter}`
|
||||
);
|
||||
cy.get("[data-cy='contract-edit:save'] > .v-btn__content").click();
|
||||
cy.visit("/svc-contracts");
|
||||
cy.url().should("include", "/svc-contracts");
|
||||
|
||||
//REVIEW CONTRACT
|
||||
cy.contains(`${Cypress.config("cyid")}-test-contract`).click(); //open it
|
||||
cy.get("[data-cy=contextmenu]").click();
|
||||
cy.get("[data-cy='app:review']").click();
|
||||
cy.url().should("include", "/home-reviews");
|
||||
cy.get("[data-cy='review-list:new']:first").click();
|
||||
cy.get("[data-cy=name]").type(
|
||||
`${Cypress.config("cyid")}-test-review{enter}`
|
||||
);
|
||||
cy.get("[data-cy='reviewDate:date']").type(dToday);
|
||||
cy.get("[data-cy='reviewDate:time']").type(tOneHourFromNow);
|
||||
cy.get("[data-cy=notes]").type(
|
||||
`I'm a review for a contract{enter}eot{enter}`
|
||||
);
|
||||
cy.get("[data-cy='review-edit:save'] > .v-btn__content").click();
|
||||
cy.get("[data-cy='review-edit:save']").should("be.disabled");
|
||||
cy.go("back"); //back to list
|
||||
//confirm it's in the list
|
||||
cy.contains(`${Cypress.config("cyid")}-test-review`);
|
||||
cy.contains(`${Cypress.config("cyid")}-test-contract`);
|
||||
cy.visit("/home-schedule");
|
||||
cy.url().should("include", "/home-schedule");
|
||||
cy.get(".v-present > .v-calendar-weekly__day-label > .v-btn").click({
|
||||
force: true
|
||||
});
|
||||
cy.contains("12 PM"); //just something to find in day view to confirm we made it there
|
||||
cy.contains(`${Cypress.config("cyid")}-test-review`);
|
||||
|
||||
//HISTORY
|
||||
//NOTE: this must be done through menu or else would need to lookup user id etc
|
||||
cy.get("[data-cy=navicon]").click();
|
||||
cy.get("[data-cy=home]").click();
|
||||
cy.get("[data-cy='nav/home-history']").click();
|
||||
cy.url().should("include", "/history");
|
||||
cy.contains(`${Cypress.config("cyid")}-test-contract`);
|
||||
cy.contains(`${Cypress.config("cyid")}-test-review`);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,28 @@
|
||||
/// <reference types="cypress" />
|
||||
describe("Service rate", () => {
|
||||
it("should work", () => {
|
||||
cy.ayLogin("accounting");
|
||||
|
||||
cy.visit("/acc-service-rates");
|
||||
cy.url().should("include", "/acc-service-rates");
|
||||
cy.get("[data-cy=serviceRatesTable]");
|
||||
cy.get("[data-cy='service-rate-list:new']:first").click();
|
||||
cy.get("[data-cy=name]").type(
|
||||
`${Cypress.config("cyid")}-test-service-rate{enter}`
|
||||
);
|
||||
cy.get("[data-cy=accountNumber]").type(
|
||||
`${Cypress.config("cyid")}-svc-act-#{enter}`
|
||||
);
|
||||
cy.get("[data-cy=charge]").type("100.00");
|
||||
cy.get("[data-cy=cost]").type("50.00");
|
||||
cy.ayChooseVSelect("unit", "hour");
|
||||
cy.get("[data-cy=notes]").type(`Test svc rate NOTES!!!{enter}eot{enter}`);
|
||||
cy.get("[data-cy='service-rate-edit:save'] > .v-btn__content").click();
|
||||
cy.visit("/acc-service-rates");
|
||||
cy.url().should("include", "/acc-service-rates");
|
||||
cy.contains(`${Cypress.config("cyid")}-test-service-rate`);
|
||||
|
||||
//END OF TEST
|
||||
//-----------------------------------------------------
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,28 @@
|
||||
/// <reference types="cypress" />
|
||||
describe("Travel rate", () => {
|
||||
it("should work", () => {
|
||||
cy.ayLogin("accounting");
|
||||
cy.visit("/acc-travel-rates");
|
||||
cy.url().should("include", "/acc-travel-rates");
|
||||
cy.get("[data-cy=travelRatesTable]");
|
||||
cy.get("[data-cy='travel-rate-list:new']:first").click();
|
||||
cy.get("[data-cy=name]").type(
|
||||
`${Cypress.config("cyid")}-test-travel-rate{enter}`
|
||||
);
|
||||
cy.get("[data-cy=accountNumber]").type(
|
||||
`${Cypress.config("cyid")}-trvl-act-#{enter}`
|
||||
);
|
||||
cy.get("[data-cy=charge]").type("2.00");
|
||||
cy.get("[data-cy=cost]").type("1.00");
|
||||
cy.get("[data-cy=unit]").type("{downarrow}{enter}"); //choose first in list
|
||||
cy.get("[data-cy=notes]").type(`Test trvl rate NOTES!!!{enter}eot{enter}`);
|
||||
cy.get("[data-cy='travel-rate-edit:save'] > .v-btn__content").click();
|
||||
|
||||
cy.visit("/acc-travel-rates");
|
||||
cy.url().should("include", "/acc-travel-rates");
|
||||
cy.contains(`${Cypress.config("cyid")}-test-travel-rate`);
|
||||
|
||||
//END OF TEST
|
||||
//-----------------------------------------------------
|
||||
});
|
||||
});
|
||||
23
e2e/tests/regression/3-accounting-user/0800-tax-code.cy.js
Normal file
23
e2e/tests/regression/3-accounting-user/0800-tax-code.cy.js
Normal file
@@ -0,0 +1,23 @@
|
||||
/// <reference types="cypress" />
|
||||
describe("Tax code", () => {
|
||||
it("should work", () => {
|
||||
cy.ayLogin("accounting");
|
||||
cy.visit("/acc-tax-codes");
|
||||
cy.url().should("include", "/acc-tax-codes");
|
||||
cy.get("[data-cy=taxCodesTable]");
|
||||
cy.get("[data-cy='tax-code-list:new']:first").click();
|
||||
cy.get("[data-cy=name]").type(
|
||||
`${Cypress.config("cyid")}-test-tax-code{enter}`
|
||||
);
|
||||
|
||||
cy.get("[data-cy=taxAPct]").type("7");
|
||||
cy.get("[data-cy=taxBPct]").type("5");
|
||||
|
||||
cy.get("[data-cy=notes]").type(`Test tax code NOTES!!!{enter}eot{enter}`);
|
||||
cy.get("[data-cy='tax-code-edit:save'] > .v-btn__content").click();
|
||||
cy.visit("/acc-tax-codes");
|
||||
cy.url().should("include", "/acc-tax-codes");
|
||||
cy.contains(`${Cypress.config("cyid")}-test-tax-code`);
|
||||
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,14 @@
|
||||
/// <reference types="cypress" />
|
||||
describe("Tax code", () => {
|
||||
it("should work", () => {
|
||||
cy.ayLogin("accounting");
|
||||
|
||||
|
||||
cy.get("[data-cy=notification]").click();
|
||||
cy.url().should("include", "/home-notifications");
|
||||
cy.contains("Object created");
|
||||
//Going to assume this is a virgin run so test contract text should be there but not going to assume it's due to current run so not checking for cyid
|
||||
//cy.contains(`${Cypress.config("cyid")}-test-contract`);
|
||||
cy.contains('-test-contract');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user