diff --git a/.github/workflows/build-test-and-deploy.yml b/.github/workflows/build-test-and-deploy.yml index 652601a200..cc41300fc4 100644 --- a/.github/workflows/build-test-and-deploy.yml +++ b/.github/workflows/build-test-and-deploy.yml @@ -581,49 +581,65 @@ jobs: matrix: include: - browser: chromium + project: chromium shard: 1 nbShards: 3 renderer: auto - browser: chromium + project: chromium shard: 2 nbShards: 3 renderer: auto - browser: chromium + project: chromium shard: 3 nbShards: 3 renderer: auto - browser: firefox + project: firefox shard: 1 nbShards: 3 renderer: auto - browser: firefox + project: firefox shard: 2 nbShards: 3 renderer: auto - browser: firefox + project: firefox shard: 3 nbShards: 3 renderer: auto - browser: webkit + project: webkit shard: 1 nbShards: 5 renderer: headless - browser: webkit + project: webkit shard: 2 nbShards: 5 renderer: headless - browser: webkit + project: webkit shard: 3 nbShards: 5 renderer: headless - browser: webkit + project: webkit shard: 4 nbShards: 5 renderer: headless - browser: webkit + project: webkit shard: 5 nbShards: 5 renderer: headless + - browser: chromium + project: mobilechromium + shard: 1 + nbShards: 1 + renderer: auto needs: - build-play - build-chat @@ -726,7 +742,7 @@ jobs: run: sleep 30 && npm run upload-test-map working-directory: map-storage - name: Run Playwright tests - run: npm run test-prod-like -- --project=${{ matrix.browser }} --shard=${{ matrix.shard }}/${{ matrix.nbShards }} + run: npm run test-prod-like -- --project=${{ matrix.project }} --shard=${{ matrix.shard }}/${{ matrix.nbShards }} working-directory: tests env: DOCKER_TAG: ${{ github.event_name == 'pull_request' && env.GITHUB_HEAD_REF_SLUG || env.GITHUB_REF_SLUG }} diff --git a/package-lock.json b/package-lock.json index 7591af48cf..699f481b15 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10024,6 +10024,14 @@ "yarn": ">=1" } }, + "node_modules/cross-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", + "dependencies": { + "node-fetch": "^2.6.12" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -13350,26 +13358,6 @@ "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", "dev": true }, - "node_modules/handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", - "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "handlebars": "bin/handlebars" - }, - "engines": { - "node": ">=0.4.7" - }, - "optionalDependencies": { - "uglify-js": "^3.1.4" - } - }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -13703,6 +13691,36 @@ "node": ">=6.6.0" } }, + "node_modules/i18next": { + "version": "22.5.1", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-22.5.1.tgz", + "integrity": "sha512-8TGPgM3pAD+VRsMtUMNknRz3kzqwp/gPALrWMsDnmC1mKqJwpWyooQRLMcbTwq8z8YwSmuj+ZYvc+xCuEpkssA==", + "funding": [ + { + "type": "individual", + "url": "https://locize.com" + }, + { + "type": "individual", + "url": "https://locize.com/i18next.html" + }, + { + "type": "individual", + "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" + } + ], + "dependencies": { + "@babel/runtime": "^7.20.6" + } + }, + "node_modules/i18next-http-backend": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/i18next-http-backend/-/i18next-http-backend-2.5.0.tgz", + "integrity": "sha512-Z/aQsGZk1gSxt2/DztXk92DuDD20J+rNudT7ZCdTrNOiK8uQppfvdjq9+DFQfpAnFPn3VZS+KQIr1S/W1KxhpQ==", + "dependencies": { + "cross-fetch": "4.0.0" + } + }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -17056,7 +17074,9 @@ "node_modules/neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "peer": true }, "node_modules/nice-try": { "version": "1.0.5", @@ -17082,9 +17102,9 @@ } }, "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -18413,9 +18433,9 @@ } }, "node_modules/papaparse": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.3.2.tgz", - "integrity": "sha512-6dNZu0Ki+gyV0eBsFKJhYr+MdQYAzFUGlBMNj3GNrmHxmz1lfRa24CjFObPXtjcetlOv5Ad299MhIK0znp3afw==" + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.4.1.tgz", + "integrity": "sha512-HipMsgJkZu8br23pW15uvo6sib6wne/4woLZPlFf3rpDyMe9ywEXUsuD7+6K9PRkJlVT51j/sCOYDKGGS3ZJrw==" }, "node_modules/parchment": { "version": "1.1.4", @@ -18685,14 +18705,16 @@ "license": "MIT" }, "node_modules/phaser3-rex-plugins": { - "version": "1.1.78", - "resolved": "https://registry.npmjs.org/phaser3-rex-plugins/-/phaser3-rex-plugins-1.1.78.tgz", - "integrity": "sha512-L5pQSYzE20CbE4HoFzRwoZJ/dFoqjQIvkNRQFqDANGVxpOzQoWH15OicEftkD6bbkRx49W4lMc5iAf8kr07kWg==", + "version": "1.60.10", + "resolved": "https://registry.npmjs.org/phaser3-rex-plugins/-/phaser3-rex-plugins-1.60.10.tgz", + "integrity": "sha512-BiwFPPGSIvPG1jMLCjMd3Im7UrjPmU9103BF//5q9ns/QVbLl54XwoHoR4FYx+iCQEYsUV53x9ABGVPlNETyDQ==", "dependencies": { "eventemitter3": "^3.1.2", - "handlebars": "^4.7.7", + "i18next": "^22.5.1", + "i18next-http-backend": "^2.4.1", "js-yaml": "^4.1.0", - "papaparse": "^5.3.2", + "mustache": "^4.2.0", + "papaparse": "^5.4.1", "webfontloader": "^1.6.28" } }, @@ -22823,18 +22845,6 @@ "integrity": "sha512-MvlCc4GHrmZdAllBc0iUDowff36Q9Ndw/UzqmEKyrfSzokTd9ZCy1i+IIk5hrYKkjoYVQyNbrw7/F8XJ2rEwTg==", "dev": true }, - "node_modules/uglify-js": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", - "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", - "optional": true, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", @@ -23900,11 +23910,6 @@ "node": ">=0.10.0" } }, - "node_modules/wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==" - }, "node_modules/workadventure-artillery": { "resolved": "benchmark", "link": true @@ -24281,7 +24286,7 @@ "openapi3-ts": "^3.0.2", "openid-client": "^5.1.10", "p-limit": "^4.0.0", - "phaser": "3.60.0", + "phaser": "3.80", "phaser-animated-tiles": "workadventure/phaser-animated-tiles#7e02ce91a100338a27f75f7b443bacd12459fd0f", "phaser3-rex-plugins": "^1.1.42", "posthog-js": "^1.14.1", @@ -24457,11 +24462,11 @@ } }, "play/node_modules/phaser": { - "version": "3.60.0", - "resolved": "https://registry.npmjs.org/phaser/-/phaser-3.60.0.tgz", - "integrity": "sha512-IKUy35EnoEVcl2EmJ8WOyK4X8OoxHYdlhZLgRGpNrvD1fEagYffhVmwHcapE/tGiLgyrnezmXIo5RrH2NcrTHw==", + "version": "3.80.0", + "resolved": "https://registry.npmjs.org/phaser/-/phaser-3.80.0.tgz", + "integrity": "sha512-LUEPFzQKXSlPxrDjFUaeq6t47j1Y58F67OsCKflvDH1DUSwVxAD1/vDUPQJj+dWniKBxAlL1BoCXQnjmtcJxUQ==", "dependencies": { - "eventemitter3": "^5.0.0" + "eventemitter3": "^5.0.1" } }, "play/node_modules/prom-client": { @@ -32467,6 +32472,14 @@ "cross-spawn": "^7.0.1" } }, + "cross-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", + "requires": { + "node-fetch": "^2.6.12" + } + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -34814,18 +34827,6 @@ "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", "dev": true }, - "handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", - "requires": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" - } - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -35074,6 +35075,22 @@ } } }, + "i18next": { + "version": "22.5.1", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-22.5.1.tgz", + "integrity": "sha512-8TGPgM3pAD+VRsMtUMNknRz3kzqwp/gPALrWMsDnmC1mKqJwpWyooQRLMcbTwq8z8YwSmuj+ZYvc+xCuEpkssA==", + "requires": { + "@babel/runtime": "^7.20.6" + } + }, + "i18next-http-backend": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/i18next-http-backend/-/i18next-http-backend-2.5.0.tgz", + "integrity": "sha512-Z/aQsGZk1gSxt2/DztXk92DuDD20J+rNudT7ZCdTrNOiK8uQppfvdjq9+DFQfpAnFPn3VZS+KQIr1S/W1KxhpQ==", + "requires": { + "cross-fetch": "4.0.0" + } + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -37900,7 +37917,9 @@ "neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "peer": true }, "nice-try": { "version": "1.0.5", @@ -37925,9 +37944,9 @@ } }, "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "requires": { "whatwg-url": "^5.0.0" }, @@ -38900,9 +38919,9 @@ } }, "papaparse": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.3.2.tgz", - "integrity": "sha512-6dNZu0Ki+gyV0eBsFKJhYr+MdQYAzFUGlBMNj3GNrmHxmz1lfRa24CjFObPXtjcetlOv5Ad299MhIK0znp3afw==" + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.4.1.tgz", + "integrity": "sha512-HipMsgJkZu8br23pW15uvo6sib6wne/4woLZPlFf3rpDyMe9ywEXUsuD7+6K9PRkJlVT51j/sCOYDKGGS3ZJrw==" }, "parchment": { "version": "1.1.4", @@ -39105,14 +39124,16 @@ "from": "phaser-animated-tiles@workadventure/phaser-animated-tiles#7e02ce91a100338a27f75f7b443bacd12459fd0f" }, "phaser3-rex-plugins": { - "version": "1.1.78", - "resolved": "https://registry.npmjs.org/phaser3-rex-plugins/-/phaser3-rex-plugins-1.1.78.tgz", - "integrity": "sha512-L5pQSYzE20CbE4HoFzRwoZJ/dFoqjQIvkNRQFqDANGVxpOzQoWH15OicEftkD6bbkRx49W4lMc5iAf8kr07kWg==", + "version": "1.60.10", + "resolved": "https://registry.npmjs.org/phaser3-rex-plugins/-/phaser3-rex-plugins-1.60.10.tgz", + "integrity": "sha512-BiwFPPGSIvPG1jMLCjMd3Im7UrjPmU9103BF//5q9ns/QVbLl54XwoHoR4FYx+iCQEYsUV53x9ABGVPlNETyDQ==", "requires": { "eventemitter3": "^3.1.2", - "handlebars": "^4.7.7", + "i18next": "^22.5.1", + "i18next-http-backend": "^2.4.1", "js-yaml": "^4.1.0", - "papaparse": "^5.3.2", + "mustache": "^4.2.0", + "papaparse": "^5.4.1", "webfontloader": "^1.6.28" }, "dependencies": { @@ -42176,12 +42197,6 @@ "integrity": "sha512-MvlCc4GHrmZdAllBc0iUDowff36Q9Ndw/UzqmEKyrfSzokTd9ZCy1i+IIk5hrYKkjoYVQyNbrw7/F8XJ2rEwTg==", "dev": true }, - "uglify-js": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", - "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", - "optional": true - }, "unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", @@ -42938,11 +42953,6 @@ "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", "dev": true }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==" - }, "workadventure-artillery": { "version": "file:benchmark", "requires": { @@ -43075,7 +43085,7 @@ "openapi3-ts": "^3.0.2", "openid-client": "^5.1.10", "p-limit": "^4.0.0", - "phaser": "3.60.0", + "phaser": "3.80", "phaser-animated-tiles": "workadventure/phaser-animated-tiles#7e02ce91a100338a27f75f7b443bacd12459fd0f", "phaser3-rex-plugins": "^1.1.42", "postcss": "^8.4.17", @@ -43191,11 +43201,11 @@ } }, "phaser": { - "version": "3.60.0", - "resolved": "https://registry.npmjs.org/phaser/-/phaser-3.60.0.tgz", - "integrity": "sha512-IKUy35EnoEVcl2EmJ8WOyK4X8OoxHYdlhZLgRGpNrvD1fEagYffhVmwHcapE/tGiLgyrnezmXIo5RrH2NcrTHw==", + "version": "3.80.0", + "resolved": "https://registry.npmjs.org/phaser/-/phaser-3.80.0.tgz", + "integrity": "sha512-LUEPFzQKXSlPxrDjFUaeq6t47j1Y58F67OsCKflvDH1DUSwVxAD1/vDUPQJj+dWniKBxAlL1BoCXQnjmtcJxUQ==", "requires": { - "eventemitter3": "^5.0.0" + "eventemitter3": "^5.0.1" } }, "prom-client": { diff --git a/play/package.json b/play/package.json index 68090af278..b49b4bf23b 100644 --- a/play/package.json +++ b/play/package.json @@ -143,7 +143,7 @@ "openapi3-ts": "^3.0.2", "openid-client": "^5.1.10", "p-limit": "^4.0.0", - "phaser": "3.60.0", + "phaser": "3.80", "phaser-animated-tiles": "workadventure/phaser-animated-tiles#7e02ce91a100338a27f75f7b443bacd12459fd0f", "phaser3-rex-plugins": "^1.1.42", "posthog-js": "^1.14.1", diff --git a/play/src/front/Phaser/Game/UI/OutlineManager.ts b/play/src/front/Phaser/Game/UI/OutlineManager.ts index 5042c5e3bb..5b97685d80 100644 --- a/play/src/front/Phaser/Game/UI/OutlineManager.ts +++ b/play/src/front/Phaser/Game/UI/OutlineManager.ts @@ -10,13 +10,13 @@ import { DirtyScene } from "../DirtyScene"; export class OutlineManager { private scene: DirtyScene; private gameObjects: Map { thickness: number; color?: number }>; - private readonly scaleManagerResizeCallback: () => void; + //private readonly scaleManagerResizeCallback: () => void; constructor(scene: DirtyScene) { this.scene = scene; this.gameObjects = new Map { thickness: number; color?: number }>(); - this.scaleManagerResizeCallback = () => { + /*this.scaleManagerResizeCallback = () => { for (const [gameObject, getOutline] of this.gameObjects) { this.getOutlinePlugin()?.remove(gameObject); const outline = getOutline(); @@ -30,11 +30,11 @@ export class OutlineManager { this.scene.markDirty(); }; - this.scene.scale.on(Phaser.Scale.Events.RESIZE, this.scaleManagerResizeCallback); + this.scene.scale.on(Phaser.Scale.Events.RESIZE, this.scaleManagerResizeCallback);*/ } public clear(): void { - this.scene.scale.off(Phaser.Scale.Events.RESIZE, this.scaleManagerResizeCallback); + //this.scene.scale.off(Phaser.Scale.Events.RESIZE, this.scaleManagerResizeCallback); this.gameObjects.clear(); } diff --git a/tests/tests/mobile.spec.ts b/tests/tests/mobile.spec.ts index 94ac47f852..0c3610ba80 100644 --- a/tests/tests/mobile.spec.ts +++ b/tests/tests/mobile.spec.ts @@ -11,7 +11,7 @@ test.use({ test.describe('Mobile', () => { test('Successfully bubble discussion with mobile device', async ({ page, browser, request, browserName }) => { // If the browser is webkit - if (browser.browserType().name() === "webkit") { + if (browser.browserType().name() !== "mobilechromium") { //eslint-disable-next-line playwright/no-skipped-test test.skip(); return; @@ -86,7 +86,7 @@ test.describe('Mobile', () => { test('Successfully jitsi cowebsite with mobile device', async ({ page, browser }) => { // If the browser is webkit, we skip the test because the option 'ArrowRight' doesn't work - if (browser.browserType().name() === "webkit") { + if (browser.browserType().name() !== "mobilechromium") { //eslint-disable-next-line playwright/no-skipped-test test.skip(); return;