This commit is contained in:
2021-11-01 23:25:55 +00:00
parent a4d76aed4b
commit 068905ac97

View File

@@ -6,8 +6,13 @@ describe("When Accounting user logs in", () => {
const dToday = `${dNow.getFullYear()}-${(dNow.getMonth() + 1) const dToday = `${dNow.getFullYear()}-${(dNow.getMonth() + 1)
.toString() .toString()
.padStart(2, "0")}-${dNow.getDate().toString().padStart(2, "0")}`; .padStart(2, "0")}-${dNow.getDate().toString().padStart(2, "0")}`;
const tNow = `${dNow.getHours().toString().padStart(2, "0")}:${dNow.getMinutes().toString().padStart(2, "0")}`; const tNow = `${dNow.getHours().toString().padStart(2, "0")}:${dNow
const tOneHourFromNow = `${(dNow.getHours() + 1).toString().padStart(2, "0")}:${dNow.getMinutes().toString().padStart(2, "0")}`; .getMinutes()
.toString()
.padStart(2, "0")}`;
const tOneHourFromNow = `${(dNow.getHours() + 1)
.toString()
.padStart(2, "0")}:${dNow.getMinutes().toString().padStart(2, "0")}`;
cy.visit("/login"); cy.visit("/login");
@@ -26,12 +31,11 @@ describe("When Accounting user logs in", () => {
//USER OPTIONS //USER OPTIONS
cy.get("[data-cy=home]").click(); cy.get("[data-cy=home]").click();
cy.get("[data-cy='nav/home-user-settings']").click(); cy.get("[data-cy='nav/home-user-settings']").click();
cy.url().should("include", "/home-user-settings"); cy.url().should("include", "/home-user-settings");
cy.get("[data-cy='nativeDateTimeInput']").check({ force: true }); cy.get("[data-cy='nativeDateTimeInput']").check({ force: true });
//DASHBOARD //DASHBOARD
cy.get("[data-cy=navicon]").click(); cy.get("[data-cy=navicon]").click();
@@ -113,13 +117,12 @@ describe("When Accounting user logs in", () => {
cy.get("[data-cy='nav/home-reminders']").click(); cy.get("[data-cy='nav/home-reminders']").click();
cy.url().should("include", "/home-reminders"); cy.url().should("include", "/home-reminders");
//SCHEDULE //SCHEDULE
//should show reminder made above in month display by default //should show reminder made above in month display by default
cy.get("[data-cy=navicon]").click(); cy.get("[data-cy=navicon]").click();
cy.get("[data-cy='nav/home-schedule']").click(); cy.get("[data-cy='nav/home-schedule']").click();
cy.url().should("include", "/home-schedule"); cy.url().should("include", "/home-schedule");
cy.contains(`${Cypress.config("cyid")}-test-reminder`); cy.contains(`${Cypress.config("cyid")}-test-reminder`);
//NOTIFICATION SUBSCRIPTION //NOTIFICATION SUBSCRIPTION
cy.get("[data-cy=navicon]").click(); cy.get("[data-cy=navicon]").click();
@@ -138,7 +141,6 @@ describe("When Accounting user logs in", () => {
cy.contains("Contract"); cy.contains("Contract");
cy.contains("Deliver in application"); cy.contains("Deliver in application");
//CONTRACT //CONTRACT
cy.get("[data-cy=navicon]").click(); cy.get("[data-cy=navicon]").click();
cy.get("[data-cy=accounting]").click(); cy.get("[data-cy=accounting]").click();
@@ -161,6 +163,7 @@ describe("When Accounting user logs in", () => {
cy.get("[data-cy=navicon]").click(); cy.get("[data-cy=navicon]").click();
cy.get("[data-cy='nav/svc-contracts']").click(); cy.get("[data-cy='nav/svc-contracts']").click();
cy.url().should("include", "/svc-contracts"); cy.url().should("include", "/svc-contracts");
//REVIEW CONTRACT //REVIEW CONTRACT
cy.contains(`${Cypress.config("cyid")}-test-contract`).click(); //open it cy.contains(`${Cypress.config("cyid")}-test-contract`).click(); //open it
cy.get("[data-cy=contextmenu]").click(); cy.get("[data-cy=contextmenu]").click();
@@ -186,8 +189,10 @@ describe("When Accounting user logs in", () => {
cy.get("[data-cy=home]").click(); cy.get("[data-cy=home]").click();
cy.get("[data-cy='nav/home-schedule']").click(); cy.get("[data-cy='nav/home-schedule']").click();
cy.url().should("include", "/home-schedule"); cy.url().should("include", "/home-schedule");
cy.get(".v-present > .v-calendar-weekly__day-label > .v-btn").click({force:true}); cy.get(".v-present > .v-calendar-weekly__day-label > .v-btn").click({
cy.contains("12 PM");//just something to find in day view to confirm we made it there 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`); cy.contains(`${Cypress.config("cyid")}-test-review`);
//NOTIFICATION //NOTIFICATION
@@ -196,6 +201,14 @@ describe("When Accounting user logs in", () => {
cy.contains("Object created"); cy.contains("Object created");
cy.contains(`${Cypress.config("cyid")}-test-contract`); cy.contains(`${Cypress.config("cyid")}-test-contract`);
//HISTORY
cy.get("[data-cy=navicon]").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`);
cy.contains(`${Cypress.config("cyid")}-test-reminder`);
cy.contains(`${Cypress.config("cyid")}-test-subject`);
//========================================================= //=========================================================
// cy.get("[data-cy='nav/home-history']"); // cy.get("[data-cy='nav/home-history']");