From 5d25ffd359c555c7975dbd242895911f6e489b0e Mon Sep 17 00:00:00 2001 From: Douglas DUTEIL Date: Fri, 27 Sep 2024 16:18:40 +0200 Subject: [PATCH] feat(organization): change action wording --- .../support/step_definitions/general.ts | 5 +- .../jean_bon_join_abracadabra.feature | 19 ++---- e2e/features/organizations/dinum.feature | 2 +- .../api/src/:id/domains/Table.tsx | 59 ++++++------------- 4 files changed, 29 insertions(+), 56 deletions(-) diff --git a/e2e/cypress/support/step_definitions/general.ts b/e2e/cypress/support/step_definitions/general.ts index 47819509..a6486043 100644 --- a/e2e/cypress/support/step_definitions/general.ts +++ b/e2e/cypress/support/step_definitions/general.ts @@ -5,7 +5,6 @@ import { Given, Then, When } from "@badeball/cypress-cucumber-preprocessor"; // let target: JQuery; -let scope: string; let table_scope: string; let row_scope: string; @@ -58,6 +57,10 @@ Then("je vois {string} dans le tableau", function (text: string) { cy.get(table_scope).contains(text); }); +Then("je ne vois pas {string} dans le tableau", function (text: string) { + cy.get(table_scope).contains(text).should("not.exist"); +}); + Then( "je vois {string} dans le tableau {string}", function (text: string, context: string) { diff --git a/e2e/features/moderations/jean_bon_join_abracadabra.feature b/e2e/features/moderations/jean_bon_join_abracadabra.feature index b84e37a1..b9532e8b 100644 --- a/e2e/features/moderations/jean_bon_join_abracadabra.feature +++ b/e2e/features/moderations/jean_bon_join_abracadabra.feature @@ -21,22 +21,15 @@ Fonctionnalité: Moderation blockante à accepter * je vois la ligne "yopmail.com" dans le tableau * sur la même ligne je vois "❓" * sur la même ligne je vois "Menu" - Quand j'ouvre le menu déroulant sur la même ligne - * je vois "🗑️ Supprimer" - * je vois "🔄 Domain vérifié" - - Quand je clique sur "🔄 Domain vérifié" - Alors je vois la ligne "yopmail.com" dans le tableau - Alors sur la même ligne je vois "✅" Quand j'ouvre le menu déroulant sur la même ligne - Et je clique sur "🔄 Domain autorisé" + Et je clique sur "✅ Domain autorisé" Alors je vois la ligne "yopmail.com" dans le tableau - Alors sur la même ligne je vois "❓" + Alors sur la même ligne je vois "✅" Quand j'ouvre le menu déroulant sur la même ligne - Et je clique sur le bouton "🗑️ Supprimer" - Alors je ne vois pas "🔄 Domain vérifié" + Et je clique sur le bouton "🚫 Domain refusé" + Alors je ne vois pas "✅ Domain autorisé" Quand je clique sur le champs dans le tableau * je tape "poymail.com" @@ -49,8 +42,8 @@ Fonctionnalité: Moderation blockante à accepter Soit le tableau sous le title "Domaines de l'organisation" * je vois la ligne "yopmail.com" dans le tableau Quand j'ouvre le menu déroulant sur la même ligne - * je clique sur le bouton "🔄 Domain externe" - Alors sur la même ligne je vois "❌" + * je clique sur le bouton "❎ Domain externe" + Alors sur la même ligne je vois "❎" Scénario: Envoyer l'email « Votre demande a été traitée » Quand je clique sur "Je valide ce membre ✅" diff --git a/e2e/features/organizations/dinum.feature b/e2e/features/organizations/dinum.feature index 2648814c..3e09beeb 100644 --- a/e2e/features/organizations/dinum.feature +++ b/e2e/features/organizations/dinum.feature @@ -35,7 +35,7 @@ Fonctionnalité: Page organisation * sur la même ligne je vois "✅" * sur la même ligne je vois "verified" * je vois la ligne "prestataire.modernisation.gouv.fr" dans le tableau - * sur la même ligne je vois "❌" + * sur la même ligne je vois "❎" * sur la même ligne je vois "external" # Scénario: Membres de DINUM diff --git a/packages/~/organizations/api/src/:id/domains/Table.tsx b/packages/~/organizations/api/src/:id/domains/Table.tsx index a41e6f0c..544fa9b3 100644 --- a/packages/~/organizations/api/src/:id/domains/Table.tsx +++ b/packages/~/organizations/api/src/:id/domains/Table.tsx @@ -1,7 +1,6 @@ // import { button } from "@~/app.ui/button"; -import { CopyButton } from "@~/app.ui/button/components/copy"; import { GoogleSearchButton } from "@~/app.ui/button/components/search"; import { menu_item } from "@~/app.ui/menu"; import { Horizontal_Menu } from "@~/app.ui/menu/components/Horizontal_Menu"; @@ -79,37 +78,37 @@ async function Add_Domain() { function TypeToEmoji({ type }: { type: MCP_EmailDomain_Type }) { return match(type) .with("verified", () => ( - + )) .with("authorized", () => ( - + 🔓 )) .with("external", () => ( - - ❌ + + ❎ )) .with("blacklisted", () => ( - - 🚫 + + ☠️ )) .with("official_contact", () => ( - - 📞 + + ✅ )) .with("trackdechets_postal_mail", () => ( - - 📬 + + ✅ )) .otherwise(() => ( - + )); @@ -130,7 +129,7 @@ function Row({ {domain} {type} - +
    -
  • - - Copier le domaine - -
  • -
  • - -