From 9d7e27928e667c4ba95519f55ffd584bda8f2479 Mon Sep 17 00:00:00 2001 From: Kasper Birch Date: Tue, 10 Oct 2023 13:12:47 +0200 Subject: [PATCH 1/2] Change timezone for Cypress in GitHub Action Align local tests with the timezone used in GitHub Actions to ensure consistency. --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7f9db2a6ec..7d0642403b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,6 +10,8 @@ jobs: container: image: cypress/browsers:node-20.6.1-chrome-116.0.5845.187-1-ff-117.0-edge-116.0.1938.76-1 options: --user 1001 + env: + TZ: Europe/Copenhagen steps: - uses: actions/checkout@master - name: Setup Node From d8eb8203012f97998adcef501802b6111d605237 Mon Sep 17 00:00:00 2001 From: Kasper Birch Date: Tue, 10 Oct 2023 13:32:15 +0200 Subject: [PATCH 2/2] Update `reservation-details` test for Danish timezone Adjust the time in the `reservation-details` Cypress test due to the introduction of the Danish timezone in our GitHub Actions environment. --- .../modal/reservation-details/reservation-details.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/reservation-list/modal/reservation-details/reservation-details.test.ts b/src/apps/reservation-list/modal/reservation-details/reservation-details.test.ts index 13151a23b8..f56bf36802 100644 --- a/src/apps/reservation-list/modal/reservation-details/reservation-details.test.ts +++ b/src/apps/reservation-list/modal/reservation-details/reservation-details.test.ts @@ -213,7 +213,7 @@ describe("Reservation details modal test", () => { .find(".list-details") .eq(0) .find(".text-small-caption") - .should("have.text", "Your reservation expires 27-01-2023 22:37!"); + .should("have.text", "Your reservation expires 27-01-2023 23:37!"); // ID 17 2.f. header "date of reservation" cy.get(".modal-details__list") @@ -227,7 +227,7 @@ describe("Reservation details modal test", () => { .find(".list-details") .eq(1) .find(".text-small-caption") - .should("have.text", "16-08-2022 10:52"); + .should("have.text", "16-08-2022 12:52"); }); it("It shows digital reservation details modal, material queued", () => { @@ -328,7 +328,7 @@ describe("Reservation details modal test", () => { .find(".list-details") .eq(0) .find(".text-small-caption") - .should("have.text", "Borrow before 27-01-2023 22:37"); + .should("have.text", "Borrow before 27-01-2023 23:37"); }); it("It shows physical reservation details modal", () => {