diff --git a/e2e/tests/regression/accounting-user/accounting-features.js b/e2e/tests/regression/accounting-user/accounting-features.js index 079d294..5fc309c 100644 --- a/e2e/tests/regression/accounting-user/accounting-features.js +++ b/e2e/tests/regression/accounting-user/accounting-features.js @@ -1,16 +1,12 @@ /// describe("When Accounting user logs in", () => { - 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()}`; + it("should correctly run all functionality", () => { + + //cleanest way to get dates for input using local time zone and date time control input acceptable values + 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()}:${dNow.getMinutes()}`; + const tOneHourFromNow = `${dNow.getHours()+1}:${dNow.getMinutes()}`; cy.visit("/login");