From 5f8580a5c42cbaa72e965fe2ecc2bb8dce0b55d1 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 2 Nov 2021 20:55:50 +0000 Subject: [PATCH] --- e2e/support/dayjs.min.js | 1 + .../regression/service-user/service-user-features.js | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 e2e/support/dayjs.min.js diff --git a/e2e/support/dayjs.min.js b/e2e/support/dayjs.min.js new file mode 100644 index 0000000..d284eec --- /dev/null +++ b/e2e/support/dayjs.min.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",$="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date() + +import dayjs from "../../../support/dayjs.min.js" + describe("When Service user logs in", () => { 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 + const dNow = new Date(); const dToday = `${dNow.getFullYear()}-${(dNow.getMonth() + 1) .toString() @@ -64,6 +68,10 @@ describe("When Service user logs in", () => { cy.get("[data-cy=notes]").type(`Test summary workorder information`); + //complete by now plus 7 days + cy.get("[data-cy='completeByDate:date']").type( dayjs().add(7,'day').format('YYYY-MM-DD')); + cy.get("[data-cy='completeByDate:time']").type( dayjs().add(7,'day').format('HH:mm')); + // //LOGOUT // cy.get("[data-cy=navicon]").click(); // cy.get("[data-cy=logout]").click();