This commit is contained in:
2021-11-01 18:50:59 +00:00
parent 75c14c7053
commit 7fef4050b2
2 changed files with 10 additions and 24 deletions

View File

@@ -1,11 +1,4 @@
todo: flow native date time input option to the standalone date and standalone time pickers accounting user works
remove the native pickers that were separate objects and the backup datetime no longer required
test and confirm native AND material pickers work / still work with date/time/datetime
Update e2e test to set to native on first task before it starts doing input
todo: some elements like buttons and nav menu etc are repetitive and prone to breakage so perhaps centralize that so can just provide a hint and it will pick it properly every time

View File

@@ -1,12 +1,13 @@
/// <reference types="cypress" /> /// <reference types="cypress" />
describe("When Accounting user logs in", () => { describe("When Accounting user logs in", () => {
it("should correctly run all functionality", () => { 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
//cleanest way to get dates for input using local time zone and date time control input acceptable values const dNow = new Date();
const dNow=new Date(); const dToday = `${dNow.getFullYear()}-${(dNow.getMonth() + 1)
const dToday=`${dNow.getFullYear()}-${(dNow.getMonth() + 1).toString().padStart(2, "0")}-${dNow.getDate().toString().padStart(2, "0")}`; .toString()
.padStart(2, "0")}-${dNow.getDate().toString().padStart(2, "0")}`;
const tNow = `${dNow.getHours()}:${dNow.getMinutes()}`; const tNow = `${dNow.getHours()}:${dNow.getMinutes()}`;
const tOneHourFromNow = `${dNow.getHours()+1}:${dNow.getMinutes()}`; const tOneHourFromNow = `${dNow.getHours() + 1}:${dNow.getMinutes()}`;
cy.visit("/login"); cy.visit("/login");
@@ -29,7 +30,7 @@ describe("When Accounting user logs in", () => {
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
@@ -93,11 +94,9 @@ describe("When Accounting user logs in", () => {
); );
cy.get("[data-cy=pickListSelectedUserId]").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
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");
cy.get("[data-cy='reminder-list:new']:first").click(); cy.get("[data-cy='reminder-list:new']:first").click();
@@ -105,16 +104,10 @@ 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}`
); );
//set date and time
//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='dpick:startDate']").type(dToday); cy.get("[data-cy='dpick:startDate']").type(dToday);
cy.get("[data-cy='tpick:startDate']").type(tNow); cy.get("[data-cy='tpick:startDate']").type(tNow);
cy.get("[data-cy='dpick:stopDate']").type(dToday); cy.get("[data-cy='dpick:stopDate']").type(dToday);
cy.get("[data-cy='tpick:stopDate']").type(tOneHourFromNow); 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();