From f2c4e2c0c14533e36eca29051fb6e2e57cb001db Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 13 Mar 2025 10:17:03 +0100 Subject: [PATCH] ci: refs #8581 update Cypress tests to use dynamic date generation for InvoiceIn --- test/cypress/cypressParallel.sh | 2 +- .../integration/invoiceIn/invoiceInBasicData.spec.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/test/cypress/cypressParallel.sh b/test/cypress/cypressParallel.sh index 105768b3d..8ef26bcde 100644 --- a/test/cypress/cypressParallel.sh +++ b/test/cypress/cypressParallel.sh @@ -1,6 +1,6 @@ #!/bin/bash -find 'test/cypress/integration/invoiceIn' \ +find 'test/cypress/integration' \ -mindepth 1 \ -maxdepth 1 \ -type d | \ diff --git a/test/cypress/integration/invoiceIn/invoiceInBasicData.spec.js b/test/cypress/integration/invoiceIn/invoiceInBasicData.spec.js index c47c25565..c798a69cb 100644 --- a/test/cypress/integration/invoiceIn/invoiceInBasicData.spec.js +++ b/test/cypress/integration/invoiceIn/invoiceInBasicData.spec.js @@ -43,10 +43,10 @@ describe('InvoiceInBasicData', () => { supplierRef: '1234', serial: 'R', supplierFk: 1, - issued: new Date(Date.UTC(2001, 0, 1, 11)), + issued: getVnNew(), companyFk: 442, docFk: 1, - bookEntried: new Date(Date.UTC(2001, 0, 1, 11)), + bookEntried: getVnNew(), currencyFk: 1, operated: null, booked: null, @@ -86,3 +86,7 @@ describe('InvoiceInBasicData', () => { cy.checkNotification('Data saved'); }); }); + +function getVnNew() { + return new Date(Date.UTC(2001, 0, 1, 11)); +}