diff --git a/package.json b/package.json index 22fe3cd5a..098de7c94 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/integration", "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", 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, ''))