From 8a6cd267f96993aa35251f43f70a01c9d96fa19d Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 24 Feb 2025 18:15:25 +0100 Subject: [PATCH] fix: refs #8581 update date format in checkDate command to MM/DD/YYYY for consistency --- test/cypress/support/commands.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js index 5fc54ecab..84dab231c 100755 --- a/test/cypress/support/commands.js +++ b/test/cypress/support/commands.js @@ -480,8 +480,9 @@ Cypress.Commands.add('checkNumber', (text, expectedVal, operation) => { }); Cypress.Commands.add('checkDate', (rawDate, expectedVal, operation) => { - const date = moment(rawDate.trim(), 'DD/MM/YYYY'); + const date = moment(rawDate.trim(), 'MM/DD/YYYY'); const compareDate = moment(expectedVal, 'DD/MM/YYYY'); + switch (operation) { case 'equal': expect(text.trim()).to.equal(compareDate);