Bug 32030: Fix Cypress tests - flatpickr date format

...but then we don't have access to the formatted date values, and need
to compare the ISO dates.
FIXME - Find a way to compare the displayed/formatted dates

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2022-10-26 08:17:48 +02:00 committed by Tomas Cohen Arazi
parent a5f919d5f9
commit 183e3ea1d2
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 6 additions and 6 deletions

View file

@ -257,15 +257,15 @@ describe("Agreement CRUD operations", () => {
);
cy.get("#agreement_status .vs__selected").contains("Active");
cy.get("#agreement_is_perpetual_no").should("be.checked");
cy.get("#started_on_0").invoke("val").should("eq", dates["today_us"]);
cy.get("#ended_on_0").invoke("val").should("eq", dates["tomorrow_us"]);
cy.get("#started_on_0").invoke("val").should("eq", dates["today_iso"]);
cy.get("#ended_on_0").invoke("val").should("eq", dates["tomorrow_iso"]);
cy.get("#cancellation_deadline_0").invoke("val").should("eq", "");
cy.get("#notes_0").should("have.value", "");
cy.get("#started_on_1").invoke("val").should("eq", dates["today_us"]);
cy.get("#started_on_1").invoke("val").should("eq", dates["today_iso"]);
cy.get("#ended_on_1").invoke("val").should("eq", "");
cy.get("#cancellation_deadline_1")
.invoke("val")
.should("eq", dates["tomorrow_us"]);
.should("eq", dates["tomorrow_iso"]);
cy.get("#notes_1").should("have.value", "this is a note");
// Submit the form, get 500

View file

@ -145,8 +145,8 @@ describe("License CRUD operations", () => {
);
cy.get("#license_type .vs__selected").contains("Local");
cy.get("#license_status .vs__selected").contains("Active");
cy.get("#started_on").invoke("val").should("eq", dates["today_us"]);
cy.get("#ended_on").invoke("val").should("eq", dates["tomorrow_us"]);
cy.get("#started_on").invoke("val").should("eq", dates["today_iso"]);
cy.get("#ended_on").invoke("val").should("eq", dates["tomorrow_iso"]);
// Submit the form, get 500
cy.intercept("PUT", "/api/v1/erm/licenses/*", {