From cb50da2a224d46fa7512ad094e290f749e7ee3f6 Mon Sep 17 00:00:00 2001
From: benguedj <71835422+benguedj@users.noreply.github.com>
Date: Mon, 13 May 2024 10:46:16 +0200
Subject: [PATCH 1/5] Rebase master (#1746)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix: release (#1732)
* fix: add CNPG prod cluster (#1729)
* fix: add CNPG prod cluster
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* Update values.yaml
* fix
* fix
* fix
* fix
* chore: fix preprod workflow
* fix: release
* chore(release): version 1.135.1
* release ([#1732](https://github.com/SocialGouv/1000jours/issues/1732)) ([8393d46](https://github.com/SocialGouv/1000jours/commit/8393d46e007c9d9dec23e3f0febca7cdd24b3629)), closes [#1729](https://github.com/SocialGouv/1000jours/issues/1729)
* chore(release): version 1.135.2
* add CNPG prod cluster ([#1729](https://github.com/SocialGouv/1000jours/issues/1729)) ([4b74272](https://github.com/SocialGouv/1000jours/commit/4b74272b1384654235fbbc6c75200e0830961496))
* allow metabse ingress ([#1733](https://github.com/SocialGouv/1000jours/issues/1733)) ([1f841e1](https://github.com/SocialGouv/1000jours/commit/1f841e1b24023966219c6fcf81c1f50f5d10de74))
* release ([dffeb6c](https://github.com/SocialGouv/1000jours/commit/dffeb6c31befe7a36db59bdcd34c61cd8cfb7904))
* fix: đ Corrige la navigation vers les articles depuis calendar
* fix(ci): restore from cnpg (#1736)
* fix: restore from CNPG
* fix: reset dbs on dev/preprod deploys
* fix
* fix
* fix
* fix
* fix
* fix
* Update values.yaml
* Update values.yaml
* Update values.yaml
* fix(cnpg): use fixed name DB
* fix(restore): use defaults recovery user (#1738)
* fix(restore): use defaults recovery user
* Update values.yaml
* Update values.yaml
* Update values.yaml
* fix(cnpg): disable preprod backups for real
* fix: Corrige les notifications articles et certaines redirections vers les articles
* chore: change le numéro de version (v1.1.98)
* chore(release): version 1.135.3
* Corrige les notifications articles et certaines redirections vers les articles ([5364e89](https://github.com/SocialGouv/1000jours/commit/5364e89de2b1261439882ac7e47c141a8ea16e2d))
* **ci:** restore from cnpg ([#1736](https://github.com/SocialGouv/1000jours/issues/1736)) ([fb94763](https://github.com/SocialGouv/1000jours/commit/fb947636a6f892534ad757383e89d4d41dd61843))
* **cnpg:** disable preprod backups for real ([67ea71b](https://github.com/SocialGouv/1000jours/commit/67ea71b94d827c1053da6cc37cfa718180c766d5))
* **cnpg:** use fixed name DB ([e5073fb](https://github.com/SocialGouv/1000jours/commit/e5073fbd31fee8fb79eb3765852e26dbd0441b65))
* **restore:** use defaults recovery user ([#1738](https://github.com/SocialGouv/1000jours/issues/1738)) ([c230ef1](https://github.com/SocialGouv/1000jours/commit/c230ef1b868ccdd13eedf115017ae171e36ce946))
* đ Corrige la navigation vers les articles depuis calendar ([b0904c0](https://github.com/SocialGouv/1000jours/commit/b0904c032d1262bf6ec586ccad97fa30e3b845a5))
* fix: yarn berry + fetch + docker opti (#1739)
* fix: đ Corrige la redirection vers les articles depuis les tnd
* chore(release): version 1.135.4
* đ Corrige la redirection vers les articles depuis les tnd ([2e1a2d7](https://github.com/SocialGouv/1000jours/commit/2e1a2d75e315620b912ec189cc6d35cb01b8738e))
* yarn berry + fetch + docker opti ([#1739](https://github.com/SocialGouv/1000jours/issues/1739)) ([772e4ca](https://github.com/SocialGouv/1000jours/commit/772e4ca24378629017a4b86e51d8fc24a9f23891))
* chore(release): version 1.135.5
* đ Corrige la redirection vers les articles depuis les tnd ([ad155a0](https://github.com/SocialGouv/1000jours/commit/ad155a00a61404e1fb291ad5f7df6e271da59aaa))
* Corrige les notifications articles et certaines redirections vers les articles ([e2ab03f](https://github.com/SocialGouv/1000jours/commit/e2ab03f01d8deeb992483018264480b5ba08608d))
* yarn berry + fetch + docker opti ([#1739](https://github.com/SocialGouv/1000jours/issues/1739)) ([204a176](https://github.com/SocialGouv/1000jours/commit/204a1768b78a743d666def2aa715e46299efc0cc))
* **ci:** restore from cnpg ([#1736](https://github.com/SocialGouv/1000jours/issues/1736)) ([8cb13d5](https://github.com/SocialGouv/1000jours/commit/8cb13d53d5a375f357b7ed165922621f1a32eb66))
* **cnpg:** disable preprod backups for real ([0a313f0](https://github.com/SocialGouv/1000jours/commit/0a313f028d3d80395b4d6bd5d78824eba7503d03))
* **cnpg:** use fixed name DB ([8f8796c](https://github.com/SocialGouv/1000jours/commit/8f8796cd82205d403b12636e4a0995941cff3df1))
* **restore:** use defaults recovery user ([#1738](https://github.com/SocialGouv/1000jours/issues/1738)) ([3cefc73](https://github.com/SocialGouv/1000jours/commit/3cefc73649ee5d292c29875bd638bfebd233fd79))
* đ Corrige la navigation vers les articles depuis calendar ([5bcfd15](https://github.com/SocialGouv/1000jours/commit/5bcfd15e745a2e89ba06a44b8eb7eb19ee9df4fc))
* feat: ajoute un champ dans la config pour activer zeroAccident
* chore(release): version 1.136.0
* ajoute un champ dans la config pour activer zeroAccident ([bf2ce24](https://github.com/SocialGouv/1000jours/commit/bf2ce2443c03cda78f8826b5f6a66a2571beffd3))
* feat: ajoute un flag zeroAccident sur les articles
* chore(release): version 1.137.0
* ajoute un flag zeroAccident sur les articles ([a782dc6](https://github.com/SocialGouv/1000jours/commit/a782dc618641ede29c43cf4f468d1adea67b13d5))
* chore(release): version 1.138.0
* ajoute un champ dans la config pour activer zeroAccident ([c31e085](https://github.com/SocialGouv/1000jours/commit/c31e0853c852b559982e642851a9d14d9d3a52f4))
* ajoute un flag zeroAccident sur les articles ([29ee0fd](https://github.com/SocialGouv/1000jours/commit/29ee0fdc549103b7a68fca62b12c5db1a4b22e6c))
* zeroaaccident ([438aab0](https://github.com/SocialGouv/1000jours/commit/438aab05081a50bd0bdd80d5e93d5f16b6f0755d))
* chore(release): version 1.138.1
* Expo build iOS ([1b5b9ff](https://github.com/SocialGouv/1000jours/commit/1b5b9ffad7ff804dda503188beb293ca62ca68fa))
* chore(release): version 1.138.2
* đ Politique de confidentialitĂ© 2024 ([5661675](https://github.com/SocialGouv/1000jours/commit/5661675fb24f367ab51b595fc109998bb7c1ed4f))
* chore(release): version 1.139.0
* đ Ajoute les liens de l'app ZĂ©roAccident ([a75f778](https://github.com/SocialGouv/1000jours/commit/a75f77888ca32dbcdc4adfdc429c2c034b873203))
* đž Ajoute un champ 'note' pour l'annuaire 1000j blues ([c1e552c](https://github.com/SocialGouv/1000jours/commit/c1e552ce0e4660e1bfec45f590114081fd192cce))
* chore(release): version 1.140.0
* **recosante:** add recosante widget on evaluation page ([#1742](https://github.com/SocialGouv/1000jours/issues/1742)) ([dafc7be](https://github.com/SocialGouv/1000jours/commit/dafc7bef7e5a43c2fe01452636baa1e856639dd6))
* chore(release): version 1.140.1
* add info dev (expoUpdates enabled) ([00d337c](https://github.com/SocialGouv/1000jours/commit/00d337cbe6070c97e1a2b413c7362351cb3640e3))
* feat: add contact type for widget epds
---------
Co-authored-by: Julien Bouquillon
Co-authored-by: semantic-release-bot
Co-authored-by: Jo
---
CHANGELOG.md | 51 ++++++++++++++++++++-------------------------------
1 file changed, 20 insertions(+), 31 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 10325ab34..017caf5fa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,86 +1,75 @@
# [1.141.0](https://github.com/SocialGouv/1000jours/compare/v1.140.1...v1.141.0) (2024-05-13)
-
### Features
-* add contact type for widget epds ([#1747](https://github.com/SocialGouv/1000jours/issues/1747)) ([205bdc7](https://github.com/SocialGouv/1000jours/commit/205bdc74a9db8184297100ec464f7df1cdbe8d73))
+- add contact type for widget epds ([#1747](https://github.com/SocialGouv/1000jours/issues/1747)) ([205bdc7](https://github.com/SocialGouv/1000jours/commit/205bdc74a9db8184297100ec464f7df1cdbe8d73))
## [1.140.1](https://github.com/SocialGouv/1000jours/compare/v1.140.0...v1.140.1) (2024-04-08)
-
### Bug Fixes
-* add info dev (expoUpdates enabled) ([00d337c](https://github.com/SocialGouv/1000jours/commit/00d337cbe6070c97e1a2b413c7362351cb3640e3))
+- add info dev (expoUpdates enabled) ([00d337c](https://github.com/SocialGouv/1000jours/commit/00d337cbe6070c97e1a2b413c7362351cb3640e3))
# [1.140.0](https://github.com/SocialGouv/1000jours/compare/v1.139.0...v1.140.0) (2024-04-01)
-
### Features
-* **recosante:** add recosante widget on evaluation page ([#1742](https://github.com/SocialGouv/1000jours/issues/1742)) ([dafc7be](https://github.com/SocialGouv/1000jours/commit/dafc7bef7e5a43c2fe01452636baa1e856639dd6))
+- **recosante:** add recosante widget on evaluation page ([#1742](https://github.com/SocialGouv/1000jours/issues/1742)) ([dafc7be](https://github.com/SocialGouv/1000jours/commit/dafc7bef7e5a43c2fe01452636baa1e856639dd6))
# [1.139.0](https://github.com/SocialGouv/1000jours/compare/v1.138.2...v1.139.0) (2024-03-25)
-
### Bug Fixes
-* đ Ajoute les liens de l'app ZĂ©roAccident ([a75f778](https://github.com/SocialGouv/1000jours/commit/a75f77888ca32dbcdc4adfdc429c2c034b873203))
-
+- đ Ajoute les liens de l'app ZĂ©roAccident ([a75f778](https://github.com/SocialGouv/1000jours/commit/a75f77888ca32dbcdc4adfdc429c2c034b873203))
### Features
-* đž Ajoute un champ 'note' pour l'annuaire 1000j blues ([c1e552c](https://github.com/SocialGouv/1000jours/commit/c1e552ce0e4660e1bfec45f590114081fd192cce))
+- đž Ajoute un champ 'note' pour l'annuaire 1000j blues ([c1e552c](https://github.com/SocialGouv/1000jours/commit/c1e552ce0e4660e1bfec45f590114081fd192cce))
## [1.138.2](https://github.com/SocialGouv/1000jours/compare/v1.138.1...v1.138.2) (2024-03-18)
-
### Bug Fixes
-* đ Politique de confidentialitĂ© 2024 ([5661675](https://github.com/SocialGouv/1000jours/commit/5661675fb24f367ab51b595fc109998bb7c1ed4f))
+- đ Politique de confidentialitĂ© 2024 ([5661675](https://github.com/SocialGouv/1000jours/commit/5661675fb24f367ab51b595fc109998bb7c1ed4f))
## [1.138.1](https://github.com/SocialGouv/1000jours/compare/v1.138.0...v1.138.1) (2024-03-04)
-
### Bug Fixes
-* Expo build iOS ([1b5b9ff](https://github.com/SocialGouv/1000jours/commit/1b5b9ffad7ff804dda503188beb293ca62ca68fa))
+- Expo build iOS ([1b5b9ff](https://github.com/SocialGouv/1000jours/commit/1b5b9ffad7ff804dda503188beb293ca62ca68fa))
# [1.138.0](https://github.com/SocialGouv/1000jours/compare/v1.137.0...v1.138.0) (2024-03-04)
-
### Features
-* ajoute un champ dans la config pour activer zeroAccident ([c31e085](https://github.com/SocialGouv/1000jours/commit/c31e0853c852b559982e642851a9d14d9d3a52f4))
-* ajoute un flag zeroAccident sur les articles ([29ee0fd](https://github.com/SocialGouv/1000jours/commit/29ee0fdc549103b7a68fca62b12c5db1a4b22e6c))
-* zeroaaccident ([438aab0](https://github.com/SocialGouv/1000jours/commit/438aab05081a50bd0bdd80d5e93d5f16b6f0755d))
+- ajoute un champ dans la config pour activer zeroAccident ([c31e085](https://github.com/SocialGouv/1000jours/commit/c31e0853c852b559982e642851a9d14d9d3a52f4))
+- ajoute un flag zeroAccident sur les articles ([29ee0fd](https://github.com/SocialGouv/1000jours/commit/29ee0fdc549103b7a68fca62b12c5db1a4b22e6c))
+- zeroaaccident ([438aab0](https://github.com/SocialGouv/1000jours/commit/438aab05081a50bd0bdd80d5e93d5f16b6f0755d))
# [1.137.0](https://github.com/SocialGouv/1000jours/compare/v1.136.0...v1.137.0) (2024-01-29)
-
### Features
-* ajoute un flag zeroAccident sur les articles ([a782dc6](https://github.com/SocialGouv/1000jours/commit/a782dc618641ede29c43cf4f468d1adea67b13d5))
+- ajoute un flag zeroAccident sur les articles ([a782dc6](https://github.com/SocialGouv/1000jours/commit/a782dc618641ede29c43cf4f468d1adea67b13d5))
# [1.136.0](https://github.com/SocialGouv/1000jours/compare/v1.135.5...v1.136.0) (2024-01-29)
-
### Features
-* ajoute un champ dans la config pour activer zeroAccident ([bf2ce24](https://github.com/SocialGouv/1000jours/commit/bf2ce2443c03cda78f8826b5f6a66a2571beffd3))
+- ajoute un champ dans la config pour activer zeroAccident ([bf2ce24](https://github.com/SocialGouv/1000jours/commit/bf2ce2443c03cda78f8826b5f6a66a2571beffd3))
## [1.135.5](https://github.com/SocialGouv/1000jours/compare/v1.135.4...v1.135.5) (2024-01-15)
-
### Bug Fixes
-* đ Corrige la redirection vers les articles depuis les tnd ([ad155a0](https://github.com/SocialGouv/1000jours/commit/ad155a00a61404e1fb291ad5f7df6e271da59aaa))
-* Corrige les notifications articles et certaines redirections vers les articles ([e2ab03f](https://github.com/SocialGouv/1000jours/commit/e2ab03f01d8deeb992483018264480b5ba08608d))
-* yarn berry + fetch + docker opti ([#1739](https://github.com/SocialGouv/1000jours/issues/1739)) ([204a176](https://github.com/SocialGouv/1000jours/commit/204a1768b78a743d666def2aa715e46299efc0cc))
-* **ci:** restore from cnpg ([#1736](https://github.com/SocialGouv/1000jours/issues/1736)) ([8cb13d5](https://github.com/SocialGouv/1000jours/commit/8cb13d53d5a375f357b7ed165922621f1a32eb66))
-* **cnpg:** disable preprod backups for real ([0a313f0](https://github.com/SocialGouv/1000jours/commit/0a313f028d3d80395b4d6bd5d78824eba7503d03))
-* **cnpg:** use fixed name DB ([8f8796c](https://github.com/SocialGouv/1000jours/commit/8f8796cd82205d403b12636e4a0995941cff3df1))
-* **restore:** use defaults recovery user ([#1738](https://github.com/SocialGouv/1000jours/issues/1738)) ([3cefc73](https://github.com/SocialGouv/1000jours/commit/3cefc73649ee5d292c29875bd638bfebd233fd79))
-* đ Corrige la navigation vers les articles depuis calendar ([5bcfd15](https://github.com/SocialGouv/1000jours/commit/5bcfd15e745a2e89ba06a44b8eb7eb19ee9df4fc))
+- đ Corrige la redirection vers les articles depuis les tnd ([ad155a0](https://github.com/SocialGouv/1000jours/commit/ad155a00a61404e1fb291ad5f7df6e271da59aaa))
+- Corrige les notifications articles et certaines redirections vers les articles ([e2ab03f](https://github.com/SocialGouv/1000jours/commit/e2ab03f01d8deeb992483018264480b5ba08608d))
+- yarn berry + fetch + docker opti ([#1739](https://github.com/SocialGouv/1000jours/issues/1739)) ([204a176](https://github.com/SocialGouv/1000jours/commit/204a1768b78a743d666def2aa715e46299efc0cc))
+- **ci:** restore from cnpg ([#1736](https://github.com/SocialGouv/1000jours/issues/1736)) ([8cb13d5](https://github.com/SocialGouv/1000jours/commit/8cb13d53d5a375f357b7ed165922621f1a32eb66))
+- **cnpg:** disable preprod backups for real ([0a313f0](https://github.com/SocialGouv/1000jours/commit/0a313f028d3d80395b4d6bd5d78824eba7503d03))
+- **cnpg:** use fixed name DB ([8f8796c](https://github.com/SocialGouv/1000jours/commit/8f8796cd82205d403b12636e4a0995941cff3df1))
+- **restore:** use defaults recovery user ([#1738](https://github.com/SocialGouv/1000jours/issues/1738)) ([3cefc73](https://github.com/SocialGouv/1000jours/commit/3cefc73649ee5d292c29875bd638bfebd233fd79))
+- đ Corrige la navigation vers les articles depuis calendar ([5bcfd15](https://github.com/SocialGouv/1000jours/commit/5bcfd15e745a2e89ba06a44b8eb7eb19ee9df4fc))
## [1.135.4](https://github.com/SocialGouv/1000jours/compare/v1.135.3...v1.135.4) (2024-01-15)
From b0c4b93e6a88d4105f7285eb4bd4c7e95e0c276a Mon Sep 17 00:00:00 2001
From: Benjamin Guedj
Date: Mon, 1 Jul 2024 09:52:03 +0200
Subject: [PATCH 2/5] feat: #1749, #1751 - Ajout de la langue choisie (EPDS) +
Ajout d'un champ message avant l'ouverture de whatsapp
---
.../models/activation-tile.settings.json | 3 ++
.../reponses-epds/config/schema.graphql.js | 1 +
.../api/reponses-epds/services/contact.js | 33 ++++++++-----------
3 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/back/strapi/api/activation-tile/models/activation-tile.settings.json b/back/strapi/api/activation-tile/models/activation-tile.settings.json
index 0dca3fbb2..2f43c1725 100644
--- a/back/strapi/api/activation-tile/models/activation-tile.settings.json
+++ b/back/strapi/api/activation-tile/models/activation-tile.settings.json
@@ -23,6 +23,9 @@
},
"whatsapp": {
"type": "boolean"
+ },
+ "whatsapp_redirect_message": {
+ "type": "string"
}
}
}
diff --git a/back/strapi/api/reponses-epds/config/schema.graphql.js b/back/strapi/api/reponses-epds/config/schema.graphql.js
index 24eaa6ee3..4f577940e 100644
--- a/back/strapi/api/reponses-epds/config/schema.graphql.js
+++ b/back/strapi/api/reponses-epds/config/schema.graphql.js
@@ -62,6 +62,7 @@ module.exports = {
prenom: String
score_question_dix: String
telephone: String
+ langue: String
): Boolean
epdsContactConfirmed (
diff --git a/back/strapi/api/reponses-epds/services/contact.js b/back/strapi/api/reponses-epds/services/contact.js
index 1305250b1..c4186246f 100644
--- a/back/strapi/api/reponses-epds/services/contact.js
+++ b/back/strapi/api/reponses-epds/services/contact.js
@@ -11,35 +11,22 @@ const emailTemplate = (info) => ({
${
info.email
- ? `
- - Ă l'adresse suivante : <%- email %>`
+ ? `
- Ă l'adresse suivante : <%- email %>
`
: ""
}
${
info.telephone
- ? `
- - au numéro suivant : <%- telephone %>`
- : ""
- }
- ${
- info.moyen
- ? `
- - préférence : <%- moyen %>`
- : ""
- }
- ${
- info.horaires
- ? `
- - horaires : <%- horaires %>`
+ ? `
- au numéro suivant : <%- telephone %>
`
: ""
}
+ ${info.moyen ? ` - préférence : <%- moyen %>
` : ""}
+ ${info.horaires ? ` - horaires : <%- horaires %>
` : ""}
${
info.score_question_dix
- ? `
- - score Ă la question 10 "Il mâest arrivĂ© de penser Ă me faire du mal" : <%- score_question_dix %> / 3`
+ ? `
- score Ă la question 10 "Il mâest arrivĂ© de penser Ă me faire du mal" : <%- score_question_dix %> / 3
`
: ""
}
-
+ ${info.langue ? ` - langue: <%- langue %>
` : ""}
@@ -80,6 +67,12 @@ const emailTemplate = (info) => ({
- score Ă la question 10 "Il mâest arrivĂ© de penser Ă me faire du mal" : <%- score_question_dix %> / 3`
: ``
}
+ ${
+ info.langue
+ ? `
+ - langue : <%- langue %>`
+ : ``
+ }
L'Ă©quipe 1000 premiers jours.`,
});
@@ -93,6 +86,7 @@ const contact = async ({
nombre_enfants = "ND",
score_question_dix = "ND",
telephone = "ND",
+ langue = "ND",
}) => {
if (!process.env["MAIL_SEND_TO"])
throw new Error("Le service mail n'est pas configuré");
@@ -106,6 +100,7 @@ const contact = async ({
prenom,
score_question_dix,
telephone,
+ langue,
};
try {
From 56c8332d803c797c0f4813a0dbc35412fb9b4288 Mon Sep 17 00:00:00 2001
From: Benjamin Guedj
Date: Mon, 1 Jul 2024 10:49:02 +0200
Subject: [PATCH 3/5] fix: Corrige les tests et supprime les tests UI sur le
centre de notifications
---
.../notificationToggle.component.test.tsx | 96 -------------------
.../notifications/notification.util.test.ts | 23 +++--
2 files changed, 14 insertions(+), 105 deletions(-)
delete mode 100644 front/src/components/notification/notificationToggle.component.test.tsx
diff --git a/front/src/components/notification/notificationToggle.component.test.tsx b/front/src/components/notification/notificationToggle.component.test.tsx
deleted file mode 100644
index fdfb08da7..000000000
--- a/front/src/components/notification/notificationToggle.component.test.tsx
+++ /dev/null
@@ -1,96 +0,0 @@
-import AsyncStorage from "@react-native-async-storage/async-storage";
-import type { RenderAPI } from "@testing-library/react-native";
-import { fireEvent, render, waitFor } from "@testing-library/react-native";
-import * as React from "react";
-
-import { StorageKeysConstants } from "../../constants";
-import Labels from "../../constants/Labels";
-import { StorageUtils } from "../../utils";
-import { NotificationType } from "../../utils/notifications/notification.util";
-import NotificationToggle from "./notificationToggle.component";
-
-describe("Notification Toggle", () => {
- describe("UI", () => {
- // eslint-disable-next-line @typescript-eslint/init-declarations
- let screen: RenderAPI;
-
- afterEach(() => {
- void AsyncStorage.clear();
- });
-
- it("buttons yes/no existed", async () => {
- screen = render(
-
- );
-
- await waitFor(() => {
- // Example 1
- expect(screen.getByText("Non")).toBeTruthy();
- // Example 2
- expect(screen.getAllByText("Oui")).toHaveLength(1);
- });
- });
-
- it("toggle by type is displayed as true for the first time", async () => {
- screen = render(
-
- );
-
- await waitFor(async () => {
- const toggle = screen.getByRole("switch");
- expect(toggle).toBeTruthy();
-
- // init value : true
- const defaultStorageValue = await StorageUtils.getObjectValue(
- StorageKeysConstants.notifToggleArticles
- );
- expect(defaultStorageValue).toBeNull();
- expect(screen.getByA11yState({ checked: true })).toBeTruthy();
- });
- });
-
- it("toggle by type is in localStorage at false", async () => {
- await StorageUtils.storeObjectValue(
- StorageKeysConstants.notifToggleArticles,
- false
- );
-
- screen = render(
-
- );
-
- await waitFor(async () => {
- const toggle = screen.getByRole("switch");
- expect(toggle).toBeTruthy();
-
- // storage value : false
- const storageValue = await StorageUtils.getObjectValue(
- StorageKeysConstants.notifToggleArticles
- );
- expect(storageValue).toBeFalsy();
- expect(screen.getByA11yState({ checked: false })).toBeTruthy();
-
- await fireEvent.press(toggle);
-
- // new value : true
- const storageAfterPress = await StorageUtils.getObjectValue(
- StorageKeysConstants.notifToggleArticles
- );
- expect(storageAfterPress).toBeTruthy();
- expect(screen.getByA11yState({ checked: true })).toBeTruthy();
- });
- });
- });
-});
diff --git a/front/src/utils/notifications/notification.util.test.ts b/front/src/utils/notifications/notification.util.test.ts
index b935fc963..625aacefa 100644
--- a/front/src/utils/notifications/notification.util.test.ts
+++ b/front/src/utils/notifications/notification.util.test.ts
@@ -11,16 +11,16 @@ import { NotificationUtils, StorageUtils } from "..";
import { NotificationType } from "./notification.util";
describe("Notification utils", () => {
- describe("Build Articles Notification Content", () => {
- const CURRENT_STEP = {
- debut: 0,
- description: null,
- fin: 90,
- id: "6",
- nom: "De 0 Ă 3 mois",
- ordre: 6,
- };
+ const CURRENT_STEP = {
+ debut: 0,
+ description: null,
+ fin: 90,
+ id: "6",
+ nom: "De 0 Ă 3 mois",
+ ordre: 6,
+ };
+ describe("Build Articles Notification Content", () => {
afterEach(() => {
void AsyncStorage.clear();
});
@@ -52,9 +52,14 @@ describe("Notification utils", () => {
it("buildArticlesNotificationContent is called with no articles to read (NB_ARTICLE_TO_READ = 0)", async () => {
const NB_ARTICLE_TO_READ = 0;
+ await StorageUtils.storeObjectValue(
+ StorageKeysConstants.currentStep,
+ CURRENT_STEP
+ );
const content = await NotificationUtils.buildArticlesNotificationContent(
NB_ARTICLE_TO_READ
);
+
const expected = {
body: Labels.article.notification.congrats.body,
data: {
From 5ef8c71827b0362fdea6aaf75efddd055891965d Mon Sep 17 00:00:00 2001
From: Benjamin Guedj
Date: Mon, 1 Jul 2024 10:56:43 +0200
Subject: [PATCH 4/5] =?UTF-8?q?fix:=20nouveau=20lien=20accessibilit=C3=A9?=
=?UTF-8?q?=20numerique?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
front/src/components/menu/accessibility.component.tsx | 2 +-
front/src/components/menu/legalNotice.component.tsx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/front/src/components/menu/accessibility.component.tsx b/front/src/components/menu/accessibility.component.tsx
index 444b22019..0723597c7 100644
--- a/front/src/components/menu/accessibility.component.tsx
+++ b/front/src/components/menu/accessibility.component.tsx
@@ -92,7 +92,7 @@ const Accessibility: FC = () => {
Pour en savoir plus sur la politique dâaccessibilitĂ© numĂ©rique de lâĂtat
:
-
+
Référentiel général d'amélioration de l'accessibilité
diff --git a/front/src/components/menu/legalNotice.component.tsx b/front/src/components/menu/legalNotice.component.tsx
index 926d2511f..aac689ee6 100644
--- a/front/src/components/menu/legalNotice.component.tsx
+++ b/front/src/components/menu/legalNotice.component.tsx
@@ -56,7 +56,7 @@ const LegalNotice: FC = () => {
Pour en savoir plus sur la politique dâaccessibilitĂ© numĂ©rique de lâĂtat
:
-
+
Référentiel général d'amélioration de l'accessibilité
From c51cab25362aabfc77b8742bfd47bcb0dec7b4d1 Mon Sep 17 00:00:00 2001
From: Benjamin Guedj
Date: Mon, 1 Jul 2024 11:00:10 +0200
Subject: [PATCH 5/5] fix: Omitting --ignore-scripts can lead to the execution
of shell scripts
---
back/strapi/Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/back/strapi/Dockerfile b/back/strapi/Dockerfile
index a802d0e69..ba68a7ec7 100644
--- a/back/strapi/Dockerfile
+++ b/back/strapi/Dockerfile
@@ -13,7 +13,7 @@ ARG NODE_HOME=/opt/$NODE_PACKAGE
ENV NODE_PATH $NODE_HOME/lib/node_modules
ENV PATH $NODE_HOME/bin:$PATH
RUN curl https://nodejs.org/dist/v$NODE_VERSION/$NODE_PACKAGE.tar.gz | tar -xzC /opt/
-RUN npm i -g yarn
+RUN npm i -g --ignore-scripts yarn
RUN apt-get update && \
apt-get install --no-install-recommends -y \