From 5fc02aa73666e7a45d27c44b8cb4b3c9477c1ccc Mon Sep 17 00:00:00 2001 From: Brice Schaffner Date: Tue, 22 Nov 2022 15:34:21 +0100 Subject: [PATCH 1/3] Improved mouse position e2e tests This test did sometimes not pass without a useful info of the failure reason. Hopefully with this changes we can have a better understanding why this test is sometimes failing. --- tests/e2e-cypress/integration/mouseposition.cy.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/e2e-cypress/integration/mouseposition.cy.js b/tests/e2e-cypress/integration/mouseposition.cy.js index 9d2ffc02b..61181ff58 100644 --- a/tests/e2e-cypress/integration/mouseposition.cy.js +++ b/tests/e2e-cypress/integration/mouseposition.cy.js @@ -21,7 +21,9 @@ const defaultCenter = [47.5, 7.5] * @param {String} text A string containing an LV95 or LV03 coordinate. */ function parseLV(text) { - const matches = text.match(/([-\d'.]+), ([-\d'.]+)$/) + const matches = text.match(/([-\d'.]+),\s*([-\d'.]+)$/) + expect(matches).be.an('array', `Cannot parse LV coordinate from ${text}`) + expect(matches.length).not.be.eq(0, `Cannot parse LV coordinate from ${text}`) return matches .slice(1) .map((value) => value.replace(/'/g, '')) From 4c1c071242dc3f36da80bce7547043f87b33615a Mon Sep 17 00:00:00 2001 From: Brice Schaffner Date: Wed, 23 Nov 2022 07:26:56 +0100 Subject: [PATCH 2/3] BGDIINF_SB-2671: Fixed CI int staging e2e tests Those tests are triggered when merging into master. --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index 22fe3cd5a..ae5be2d23 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "dev": "vite --port 8080", "preview": "npm run build:prod && vite preview --port 8080 --outDir dist/production", "preview:dev": "npm run build:dev && vite preview --port 8080 --outDir dist/development", + "preview:int": "npm run build:int && vite preview --port 8080 --outDir dist/development", "test:unit": "vitest --run --environment jsdom", "test:unit:watch": "vitest --environment jsdom", "test:e2e": "start-server-and-test dev 8080 'cypress open'", @@ -13,6 +14,7 @@ "test:e2e:desktop": "start-server-and-test preview 8080 'cypress open --config viewportWidth=1440,viewportHeight=900'", "test:e2e:ci": "start-server-and-test preview 8080 'cypress run'", "test:e2e:ci:dev": "start-server-and-test preview:dev 8080 'cypress run'", + "test:e2e:ci:int": "start-server-and-test preview:int 8080 'cypress run'", "test:e2e:ci:prod": "npm run test:e2e:ci", "test:ci": "npm run test:unit && npm run test:e2e:ci", "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", From 4abb4aa3f21de9626b43af78dbcb41e83b6bfa66 Mon Sep 17 00:00:00 2001 From: Brice Schaffner Date: Wed, 23 Nov 2022 08:56:36 +0100 Subject: [PATCH 3/3] BGDIINF_SB-2671: Fixed test:e2e:ci:int --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ae5be2d23..098de7c94 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "dev": "vite --port 8080", "preview": "npm run build:prod && vite preview --port 8080 --outDir dist/production", "preview:dev": "npm run build:dev && vite preview --port 8080 --outDir dist/development", - "preview:int": "npm run build:int && vite preview --port 8080 --outDir dist/development", + "preview:int": "npm run build:int && vite preview --port 8080 --outDir dist/integration", "test:unit": "vitest --run --environment jsdom", "test:unit:watch": "vitest --environment jsdom", "test:e2e": "start-server-and-test dev 8080 'cypress open'",