Skip to content

[FEATURE] : Corrections module Tri avancé #11446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from

Conversation

PhilomeneChivard
Copy link
Contributor

@PhilomeneChivard PhilomeneChivard commented Feb 18, 2025

🥞 Problème

Tri avancé a été laissé de côté

🥓 Proposition

Sans le refaire, on corrige les petites erreurs

🧃 Remarques

Peut-être ce module pourra un jour sortir au grand jour ?

😋 Pour tester

https://app-pr11446.review.pix.fr/modules/tri-multicritere-tableau

@pix-bot-github
Copy link

Une fois les applications déployées, elles seront accessibles via les liens suivants :

Les variables d'environnement seront accessibles via les liens suivants :

Copy link
Contributor

Les tests Modulix ont échoué. Voici les détails :


> pix-api@5.45.0 modulix:test
> npm run test:api:path -- 'tests/devcomp/unit/infrastructure/datasources/learning-content/module-datasource_test.js' 'tests/devcomp/acceptance/module-instantiation_test.js' 'tests/devcomp/unit/infrastructure/datasources/learning-content/validation/module-validation_test.js'


> pix-api@5.45.0 test:api:path
> NODE_ENV=test mocha --exit --recursive --reporter=${MOCHA_REPORTER:-dot} tests/devcomp/unit/infrastructure/datasources/learning-content/module-datasource_test.js tests/devcomp/acceptance/module-instantiation_test.js tests/devcomp/unit/infrastructure/datasources/learning-content/validation/module-validation_test.js

(node:2020) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(Use `node --trace-warnings ...` to show where the warning was created)
(node:2020) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2020) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2020) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2020) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2020) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2020) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2020) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2020) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2020) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2020) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2020) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2020) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2020) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2020) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2020) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2020) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2020) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2020) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead


  ..................!.....................................

  55 passing (13s)
  1 failing

  1) Unit | Infrastructure | Datasources | Learning Content | ModuleDatasource
       #list
         modules content
           module "tri-multicritere-tableau" should contain a valid structure:
     AssertionError: 
============================================================


Chemin : grains[4].components[6].element.content

Error(void-style): Expected omitted end tag <img> instead of self-closing element <img/>
https://html-validate.org/rules/void-style.html

Valeur concernée à rechercher :
<p><span aria-hidden="true">❓</span> Si vous avez besoin d’aide, cliquez sur les indices ci-dessous :</p><p><br></p><details><summary>Indice 1</summary><p>Voici le résultat que vous devriez obtenir. Observez bien les colonnes pour trouver l'ordre des critères de tri.</p><img src="https://i.imgur.com/uZJkEg1.jpeg" alt="Tableau resultat" /></details><details><summary>Indice 2</summary><p>Il y a 3 critères de tri nécessaires au classement de Sarah.<br>L’énoncé vous permet de trouver l’ordre des critères de tri suivant&nbsp;:</p> <ol> <li>L’étape la plus importante est bien sûr : la découverte du trésor</li> <li>La seconde épreuve est le nombre d’énigmes réussies</li> <li>Le troisième critère est le temps au labyrinthe</li> </ol><p>Ensuite, comparez l’ordre des critères de tri au tableau de l’indice 2 et déterminez le classement de chaque colonne.</p> </details>

============================================================
: expected ValidationError: htmlvalidationerror { …(2) } to equal undefined
      at Context.<anonymous> (file:///home/runner/work/pix/pix/api/tests/devcomp/unit/infrastructure/datasources/learning-content/module-datasource_test.js:46:33)



Copy link
Contributor

Les tests Modulix ont échoué. Voici les détails :


> pix-api@5.45.0 modulix:test
> npm run test:api:path -- 'tests/devcomp/unit/infrastructure/datasources/learning-content/module-datasource_test.js' 'tests/devcomp/acceptance/module-instantiation_test.js' 'tests/devcomp/unit/infrastructure/datasources/learning-content/validation/module-validation_test.js'


> pix-api@5.45.0 test:api:path
> NODE_ENV=test mocha --exit --recursive --reporter=${MOCHA_REPORTER:-dot} tests/devcomp/unit/infrastructure/datasources/learning-content/module-datasource_test.js tests/devcomp/acceptance/module-instantiation_test.js tests/devcomp/unit/infrastructure/datasources/learning-content/validation/module-validation_test.js

(node:2003) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(Use `node --trace-warnings ...` to show where the warning was created)
(node:2003) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2003) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2003) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2003) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2003) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2003) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2003) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2003) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2003) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2003) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2003) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2003) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2003) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2003) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2003) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2003) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead

 Exception during run: SyntaxError[ @/home/runner/work/pix/pix/api/tests/devcomp/unit/infrastructure/datasources/learning-content/module-datasource_test.js ]: /home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/modules/tri-multicritere-tableau.json: Expected double-quoted property name in JSON at position 24969
    at parse (<anonymous>)
    at ModuleLoader.jsonStrategy (node:internal/modules/esm/translators:488:21)
    at callTranslator (node:internal/modules/esm/loader:428:14)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:434:30)
    at async link (node:internal/modules/esm/module_job:87:21)

Copy link
Contributor

Les tests Modulix ont échoué. Voici les détails :


> pix-api@5.45.0 modulix:test
> npm run test:api:path -- 'tests/devcomp/unit/infrastructure/datasources/learning-content/module-datasource_test.js' 'tests/devcomp/acceptance/module-instantiation_test.js' 'tests/devcomp/unit/infrastructure/datasources/learning-content/validation/module-validation_test.js'


> pix-api@5.45.0 test:api:path
> NODE_ENV=test mocha --exit --recursive --reporter=${MOCHA_REPORTER:-dot} tests/devcomp/unit/infrastructure/datasources/learning-content/module-datasource_test.js tests/devcomp/acceptance/module-instantiation_test.js tests/devcomp/unit/infrastructure/datasources/learning-content/validation/module-validation_test.js

(node:1999) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1999) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:1999) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:1999) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:1999) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:1999) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:1999) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:1999) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:1999) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:1999) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:1999) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:1999) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:1999) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:1999) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:1999) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:1999) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:1999) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead

 Exception during run: SyntaxError[ @/home/runner/work/pix/pix/api/tests/devcomp/unit/infrastructure/datasources/learning-content/module-datasource_test.js ]: /home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/modules/tri-multicritere-tableau.json: Expected double-quoted property name in JSON at position 24969
    at parse (<anonymous>)
    at ModuleLoader.jsonStrategy (node:internal/modules/esm/translators:488:21)
    at callTranslator (node:internal/modules/esm/loader:428:14)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:434:30)
    at async link (node:internal/modules/esm/module_job:87:21)

Copy link
Contributor

Les tests Modulix ont échoué. Voici les détails :


> pix-api@5.45.0 modulix:test
> npm run test:api:path -- 'tests/devcomp/unit/infrastructure/datasources/learning-content/module-datasource_test.js' 'tests/devcomp/acceptance/module-instantiation_test.js' 'tests/devcomp/unit/infrastructure/datasources/learning-content/validation/module-validation_test.js'


> pix-api@5.45.0 test:api:path
> NODE_ENV=test mocha --exit --recursive --reporter=${MOCHA_REPORTER:-dot} tests/devcomp/unit/infrastructure/datasources/learning-content/module-datasource_test.js tests/devcomp/acceptance/module-instantiation_test.js tests/devcomp/unit/infrastructure/datasources/learning-content/validation/module-validation_test.js

(node:2036) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(Use `node --trace-warnings ...` to show where the warning was created)
(node:2036) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2036) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2036) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2036) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2036) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2036) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2036) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2036) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2036) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2036) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2036) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2036) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2036) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2036) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2036) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2036) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2036) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead
(node:2036) V8: file:///home/runner/work/pix/pix/api/src/devcomp/infrastructure/datasources/learning-content/module-datasource.js:33 'assert' is deprecated in import statements and support will be removed in a future version; use 'with' instead


  ..................!.....................................

  55 passing (12s)
  1 failing

  1) Unit | Infrastructure | Datasources | Learning Content | ModuleDatasource
       #list
         modules content
           module "tri-multicritere-tableau" should contain a valid structure:
     AssertionError: 
============================================================


Chemin : grains[4].components[7].element.content

Error(close-order): Stray end tag '</p>'
https://html-validate.org/rules/close-order.html

Valeur concernée à rechercher :
<p>Voici le résultat que vous devriez obtenir. Observez bien les colonnes pour trouver l'ordre des critères de tri.</p><img src="https://i.imgur.com/uZJkEg1.jpeg" alt="Resultat du tableau"></p>

============================================================
: expected ValidationError: htmlvalidationerror { …(2) } to equal undefined
      at Context.<anonymous> (file:///home/runner/work/pix/pix/api/tests/devcomp/unit/infrastructure/datasources/learning-content/module-datasource_test.js:46:33)



@yannbertrand
Copy link
Member

Fermé par arrêt d'activité, à reprendre dans une nouvelle PR si besoin. On reste dispo si besoin d'un coup de main 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants