This commit is contained in:
2021-11-01 18:35:40 +00:00
parent 5c7ab0d1e6
commit 75c14c7053

View File

@@ -1,16 +1,12 @@
/// <reference types="cypress" />
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");