This commit is contained in:
@@ -1,6 +1,17 @@
|
|||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
describe("When Accounting user logs in", () => {
|
describe("When Accounting user logs in", () => {
|
||||||
it("should allow user all functionality available to them", () => {
|
it("should allow user all functionality available to them", () => {
|
||||||
|
// const dToday = new Date().toISOString().split("T")[0];
|
||||||
|
//const tNow = new Date().toISOString().split("T")[1];
|
||||||
|
|
||||||
|
const date=new Date();
|
||||||
|
const dToday = new Date(date.getTime() - date.getTimezoneOffset() * 60000)
|
||||||
|
.toISOString()
|
||||||
|
.split("T")[0];
|
||||||
|
|
||||||
|
const tNow = `${date.getHours()}:${date.getMinutes()}`;
|
||||||
|
const tOneHourFromNow = `${date.getHours()+1}:${date.getMinutes()}`;
|
||||||
|
|
||||||
cy.visit("/login");
|
cy.visit("/login");
|
||||||
|
|
||||||
cy.get("input[name=username]").clear().type(Cypress.env("accountinguser"));
|
cy.get("input[name=username]").clear().type(Cypress.env("accountinguser"));
|
||||||
@@ -15,10 +26,18 @@ describe("When Accounting user logs in", () => {
|
|||||||
//open nav pane
|
//open nav pane
|
||||||
cy.get("[data-cy=navicon]").click();
|
cy.get("[data-cy=navicon]").click();
|
||||||
cy.contains("Accounting"); //accounting is part of name displayed at top
|
cy.contains("Accounting"); //accounting is part of name displayed at top
|
||||||
|
|
||||||
|
//USER OPTIONS
|
||||||
cy.get("[data-cy=home]").click();
|
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 });
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
//DASHBOARD
|
//DASHBOARD
|
||||||
/* */
|
|
||||||
|
cy.get("[data-cy=navicon]").click();
|
||||||
cy.get("[data-cy='nav/home-dashboard']").click();
|
cy.get("[data-cy='nav/home-dashboard']").click();
|
||||||
cy.url().should("include", "/home-dashboard");
|
cy.url().should("include", "/home-dashboard");
|
||||||
|
|
||||||
@@ -44,7 +63,7 @@ describe("When Accounting user logs in", () => {
|
|||||||
cy.url().should("include", "/home-memos/");
|
cy.url().should("include", "/home-memos/");
|
||||||
cy.get("[data-cy=pickListSelectedUserId]")
|
cy.get("[data-cy=pickListSelectedUserId]")
|
||||||
.click()
|
.click()
|
||||||
.type("accounting{enter}");//select Accounting user (self)
|
.type("accounting{enter}"); //select Accounting user (self)
|
||||||
cy.get("[data-cy=name]").type(
|
cy.get("[data-cy=name]").type(
|
||||||
`${Cypress.config("cyid")}-test-subject{enter}`
|
`${Cypress.config("cyid")}-test-subject{enter}`
|
||||||
);
|
);
|
||||||
@@ -73,16 +92,15 @@ describe("When Accounting user logs in", () => {
|
|||||||
cy.get("[data-cy=contextmenu]").click();
|
cy.get("[data-cy=contextmenu]").click();
|
||||||
cy.get("[data-cy='memo-edit:forward']").click();
|
cy.get("[data-cy='memo-edit:forward']").click();
|
||||||
cy.url().should("include", "/home-memos/");
|
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=notes]").type(
|
||||||
cy.get("[data-cy=pickListSelectedUserId]")
|
`Hello SuperUser this is my forward to you!{enter}eot{enter}`
|
||||||
.click()
|
);
|
||||||
.type("SuperUser{enter}");
|
cy.get("[data-cy=pickListSelectedUserId]").click().type("SuperUser{enter}");
|
||||||
cy.get("[data-cy='memo-edit:save'] > .v-btn__content").click();
|
cy.get("[data-cy='memo-edit:save'] > .v-btn__content").click();
|
||||||
|
*/
|
||||||
|
//REMINDERS
|
||||||
//REMINDERS
|
cy.get("[data-cy=navicon]").click();
|
||||||
cy.get("[data-cy=navicon]").click();
|
//new reminder
|
||||||
//new reminder
|
|
||||||
|
|
||||||
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");
|
||||||
@@ -91,12 +109,18 @@ describe("When Accounting user logs in", () => {
|
|||||||
cy.get("[data-cy=name]").type(
|
cy.get("[data-cy=name]").type(
|
||||||
`${Cypress.config("cyid")}-test-reminder{enter}`
|
`${Cypress.config("cyid")}-test-reminder{enter}`
|
||||||
);
|
);
|
||||||
cy.get("[data-cy='dtfpick:startDate']:first").click();
|
|
||||||
cy.get('[data-cy="dpicktoday:startDate"] > .v-btn__content').click();//select today
|
//set date and time
|
||||||
cy.get('[data-cy="ttfpick:startDate"]').click();
|
//format for typing input and setting value is always YYYY-MM-DD for date and HH:MM in 24 hour time for time
|
||||||
cy.get('[data-cy="ttfpicknow:startDate"] > .v-btn__content').click();//select now
|
|
||||||
|
cy.get("[data-cy='dpick:startDate']").type(dToday);
|
||||||
|
cy.get("[data-cy='tpick:startDate']").type(tNow);
|
||||||
|
|
||||||
|
cy.get("[data-cy='dpick:stopDate']").type(dToday);
|
||||||
|
cy.get("[data-cy='tpick:stopDate']").type(tOneHourFromNow);
|
||||||
|
|
||||||
cy.get("[data-cy=notes]").type(`This is a reminder{enter}eot{enter}`);
|
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(".v-color-picker__input > input").clear().type("#11E1D07E{enter}"); //select a color
|
||||||
cy.get('[data-cy="reminder-edit:save"] > .v-btn__content').click();
|
cy.get('[data-cy="reminder-edit:save"] > .v-btn__content').click();
|
||||||
cy.get("[data-cy=navicon]").click();
|
cy.get("[data-cy=navicon]").click();
|
||||||
cy.get("[data-cy='nav/home-reminders']").click();
|
cy.get("[data-cy='nav/home-reminders']").click();
|
||||||
|
|||||||
Reference in New Issue
Block a user