From ff01aa3a81ffaed725ee9b2c0fcb12543dd00099 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 19 Jul 2024 15:59:23 +0000 Subject: [PATCH 1/2] [BUMP] Update dependency @1024pix/ember-testing-library to v3 (mon-pix) --- mon-pix/package-lock.json | 206 ++------------------------------------ mon-pix/package.json | 2 +- 2 files changed, 11 insertions(+), 197 deletions(-) diff --git a/mon-pix/package-lock.json b/mon-pix/package-lock.json index 692991aa03d..0f4525c0097 100644 --- a/mon-pix/package-lock.json +++ b/mon-pix/package-lock.json @@ -12,7 +12,7 @@ "devDependencies": { "@1024pix/ember-api-actions": "^1.1.0", "@1024pix/ember-matomo-tag-manager": "^2.4.3", - "@1024pix/ember-testing-library": "^2.0.7", + "@1024pix/ember-testing-library": "^3.0.1", "@1024pix/eslint-config": "^1.3.7", "@1024pix/pix-ui": "^46.12.6", "@1024pix/stylelint-config": "^5.1.16", @@ -809,13 +809,13 @@ } }, "node_modules/@1024pix/ember-testing-library": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@1024pix/ember-testing-library/-/ember-testing-library-2.0.7.tgz", - "integrity": "sha512-nkt+7gfxg40EwJp0Dfp6rvb3dz4jPZnEMZrT8DxdZ4g4WBItk9ccG5lQ4a9eZwF/0jEsyXLY244Aw5adgPT7ag==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@1024pix/ember-testing-library/-/ember-testing-library-3.0.1.tgz", + "integrity": "sha512-mGgGRr0o0jEgMjFhQPkPl7hBNPDieXgyGabFPkcPcJRx5tgLhqcX7jlAhHRfmKqFhfe7oYZ1PSniO0uivIgZkQ==", "dev": true, "license": "MIT", "dependencies": { - "@testing-library/dom": "9.3.4", + "@testing-library/dom": "10.3.1", "broccoli-funnel": "^3.0.8", "ember-auto-import": "^2.6.0", "ember-cli-babel": "^8.0.0", @@ -14383,23 +14383,23 @@ "license": "MIT" }, "node_modules/@testing-library/dom": { - "version": "9.3.4", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.4.tgz", - "integrity": "sha512-FlS4ZWlp97iiNWig0Muq8p+3rVDjRiYE+YKGbAqXOu9nwJFFOdL00kFpz42M+4huzYi86vAK1sOOfyOG45muIQ==", + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.3.1.tgz", + "integrity": "sha512-q/WL+vlXMpC0uXDyfsMtc1rmotzLV8Y0gq6q1gfrrDjQeHoeLrqHbxdPvPNAh1i+xuJl7+BezywcXArz7vLqKQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", "@types/aria-query": "^5.0.1", - "aria-query": "5.1.3", + "aria-query": "5.3.0", "chalk": "^4.1.0", "dom-accessibility-api": "^0.5.9", "lz-string": "^1.5.0", "pretty-format": "^27.0.2" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/@testing-library/dom/node_modules/ansi-styles": { @@ -14418,16 +14418,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@testing-library/dom/node_modules/aria-query": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", - "integrity": "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "deep-equal": "^2.0.5" - } - }, "node_modules/@testing-library/dom/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -20322,39 +20312,6 @@ "node": ">=0.10" } }, - "node_modules/deep-equal": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", - "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.5", - "es-get-iterator": "^1.1.3", - "get-intrinsic": "^1.2.2", - "is-arguments": "^1.1.1", - "is-array-buffer": "^3.0.2", - "is-date-object": "^1.0.5", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "isarray": "^2.0.5", - "object-is": "^1.1.5", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "side-channel": "^1.0.4", - "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -38173,27 +38130,6 @@ "node": ">= 0.4" } }, - "node_modules/es-get-iterator": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", - "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "has-symbols": "^1.0.3", - "is-arguments": "^1.1.1", - "is-map": "^2.0.2", - "is-set": "^2.0.2", - "is-string": "^1.0.7", - "isarray": "^2.0.5", - "stop-iteration-iterator": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/es-module-lexer": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.3.tgz", @@ -41553,23 +41489,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-array-buffer": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", @@ -41892,19 +41811,6 @@ "@babel/runtime": "^7.14.0" } }, - "node_modules/is-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", - "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", @@ -42035,19 +41941,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-set": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", - "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-shared-array-buffer": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", @@ -42178,19 +42071,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-weakmap": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", - "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", @@ -42204,23 +42084,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-weakset": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", - "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-whitespace-character": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz", @@ -44373,23 +44236,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object-is": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", - "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -48800,19 +48646,6 @@ "node": ">= 0.8" } }, - "node_modules/stop-iteration-iterator": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", - "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "internal-slot": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/string_decoder": { "version": "0.10.31", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", @@ -51708,25 +51541,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/which-collection": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", - "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/which-typed-array": { "version": "1.1.15", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", diff --git a/mon-pix/package.json b/mon-pix/package.json index 2949e41e81e..421e5e22fc7 100644 --- a/mon-pix/package.json +++ b/mon-pix/package.json @@ -44,7 +44,7 @@ "devDependencies": { "@1024pix/ember-api-actions": "^1.1.0", "@1024pix/ember-matomo-tag-manager": "^2.4.3", - "@1024pix/ember-testing-library": "^2.0.7", + "@1024pix/ember-testing-library": "^3.0.1", "@1024pix/eslint-config": "^1.3.7", "@1024pix/pix-ui": "^46.12.6", "@1024pix/stylelint-config": "^5.1.16", From bd9474de24a9e1ed61d71d8235e367ee8779739e Mon Sep 17 00:00:00 2001 From: Yann Bertrand <5855339+yannbertrand@users.noreply.github.com> Date: Fri, 19 Jul 2024 19:44:17 +0200 Subject: [PATCH 2/2] refactor(mon-pix): use presentation role on empty alt imgs --- mon-pix/tests/integration/components/module/details_test.js | 2 +- mon-pix/tests/integration/components/steps_test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mon-pix/tests/integration/components/module/details_test.js b/mon-pix/tests/integration/components/module/details_test.js index ddc65713014..118d184ffef 100644 --- a/mon-pix/tests/integration/components/module/details_test.js +++ b/mon-pix/tests/integration/components/module/details_test.js @@ -26,7 +26,7 @@ module('Integration | Component | Module | Details', function (hooks) { // then assert.ok(screen.getByRole('heading', { name: module.title, level: 1 })); - assert.ok(screen.getByRole('img').hasAttribute('src', module.details.image)); + assert.ok(screen.getByRole('presentation').hasAttribute('src', module.details.image)); assert.ok(screen.getByText(module.details.description)); assert.ok(screen.getByText(`${module.details.duration} min`)); assert.ok(screen.getByText(module.details.level)); diff --git a/mon-pix/tests/integration/components/steps_test.js b/mon-pix/tests/integration/components/steps_test.js index dfff0db59a7..89e6fb0e738 100644 --- a/mon-pix/tests/integration/components/steps_test.js +++ b/mon-pix/tests/integration/components/steps_test.js @@ -50,7 +50,7 @@ module('Integration | Component | steps', function (hooks) { .exists(); assert.dom(screen.getByRole('heading', { name: 'Le nombre de questions ?', level: 3 })).exists(); assert.dom(screen.getByRole('heading', { name: 'La durée du test ?', level: 3 })).exists(); - const images = screen.getAllByRole('img'); + const images = screen.getAllByRole('presentation'); assert.strictEqual( images[0].getAttribute('src'), '/images/illustrations/certification-instructions-steps/clock.svg',