Skip to content

Commit 54066f1

Browse files
feat(organization): change action wording (#548)
1 parent 42d8dbe commit 54066f1

File tree

4 files changed

+29
-56
lines changed

4 files changed

+29
-56
lines changed

e2e/cypress/support/step_definitions/general.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { Given, Then, When } from "@badeball/cypress-cucumber-preprocessor";
55
//
66

77
let target: JQuery<HTMLElement>;
8-
let scope: string;
98
let table_scope: string;
109
let row_scope: string;
1110

@@ -58,6 +57,10 @@ Then("je vois {string} dans le tableau", function (text: string) {
5857
cy.get(table_scope).contains(text);
5958
});
6059

60+
Then("je ne vois pas {string} dans le tableau", function (text: string) {
61+
cy.get(table_scope).contains(text).should("not.exist");
62+
});
63+
6164
Then(
6265
"je vois {string} dans le tableau {string}",
6366
function (text: string, context: string) {

e2e/features/moderations/jean_bon_join_abracadabra.feature

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,15 @@ Fonctionnalité: Moderation blockante à accepter
2121
* je vois la ligne "yopmail.com" dans le tableau
2222
* sur la même ligne je vois "❓"
2323
* sur la même ligne je vois "Menu"
24-
Quand j'ouvre le menu déroulant sur la même ligne
25-
* je vois "🗑️ Supprimer"
26-
* je vois "🔄 Domain vérifié"
27-
28-
Quand je clique sur "🔄 Domain vérifié"
29-
Alors je vois la ligne "yopmail.com" dans le tableau
30-
Alors sur la même ligne je vois "✅"
3124

3225
Quand j'ouvre le menu déroulant sur la même ligne
33-
Et je clique sur "🔄 Domain autorisé"
26+
Et je clique sur " Domain autorisé"
3427
Alors je vois la ligne "yopmail.com" dans le tableau
35-
Alors sur la même ligne je vois ""
28+
Alors sur la même ligne je vois ""
3629

3730
Quand j'ouvre le menu déroulant sur la même ligne
38-
Et je clique sur le bouton "🗑️ Supprimer"
39-
Alors je ne vois pas "🔄 Domain vérifié"
31+
Et je clique sur le bouton "🚫 Domain refusé"
32+
Alors je ne vois pas " Domain autorisé"
4033

4134
Quand je clique sur le champs dans le tableau
4235
* je tape "poymail.com"
@@ -49,8 +42,8 @@ Fonctionnalité: Moderation blockante à accepter
4942
Soit le tableau sous le title "Domaines de l'organisation"
5043
* je vois la ligne "yopmail.com" dans le tableau
5144
Quand j'ouvre le menu déroulant sur la même ligne
52-
* je clique sur le bouton "🔄 Domain externe"
53-
Alors sur la même ligne je vois ""
45+
* je clique sur le bouton " Domain externe"
46+
Alors sur la même ligne je vois ""
5447

5548
Scénario: Envoyer l'email « Votre demande a été traitée »
5649
Quand je clique sur "Je valide ce membre ✅"

e2e/features/organizations/dinum.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Fonctionnalité: Page organisation
3535
* sur la même ligne je vois "✅"
3636
* sur la même ligne je vois "verified"
3737
* je vois la ligne "prestataire.modernisation.gouv.fr" dans le tableau
38-
* sur la même ligne je vois ""
38+
* sur la même ligne je vois ""
3939
* sur la même ligne je vois "external"
4040

4141
# Scénario: Membres de DINUM

packages/~/organizations/api/src/:id/domains/Table.tsx

Lines changed: 18 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//
22

33
import { button } from "@~/app.ui/button";
4-
import { CopyButton } from "@~/app.ui/button/components/copy";
54
import { GoogleSearchButton } from "@~/app.ui/button/components/search";
65
import { menu_item } from "@~/app.ui/menu";
76
import { Horizontal_Menu } from "@~/app.ui/menu/components/Horizontal_Menu";
@@ -79,37 +78,37 @@ async function Add_Domain() {
7978
function TypeToEmoji({ type }: { type: MCP_EmailDomain_Type }) {
8079
return match(type)
8180
.with("verified", () => (
82-
<span role="img" aria-label="vérifié">
81+
<span role="img" aria-label="vérifié" title="vérifié">
8382
8483
</span>
8584
))
8685
.with("authorized", () => (
87-
<span role="img" aria-label="autorisé">
86+
<span role="img" aria-label="autorisé" title="autorisé">
8887
🔓
8988
</span>
9089
))
9190
.with("external", () => (
92-
<span role="img" aria-label="externe">
93-
91+
<span role="img" aria-label="externe" title="externe">
92+
9493
</span>
9594
))
9695
.with("blacklisted", () => (
97-
<span role="img" aria-label="blacklisté">
98-
🚫
96+
<span role="img" aria-label="blacklisté" title="blacklisté">
97+
☠️
9998
</span>
10099
))
101100
.with("official_contact", () => (
102-
<span role="img" aria-label="contact officiel">
103-
📞
101+
<span role="img" aria-label="contact officiel" title="contact officiel">
102+
104103
</span>
105104
))
106105
.with("trackdechets_postal_mail", () => (
107-
<span role="img" aria-label="postal mail">
108-
📬
106+
<span role="img" aria-label="postal mail" title="postal mail">
107+
109108
</span>
110109
))
111110
.otherwise(() => (
112-
<span role="img" aria-label="inconnu">
111+
<span role="img" aria-label="inconnu" title="inconnu">
113112
114113
</span>
115114
));
@@ -130,7 +129,7 @@ function Row({
130129
</td>
131130
<td>{domain}</td>
132131
<td>{type}</td>
133-
<td class="!text-end">
132+
<td class="space-x-2 !text-end">
134133
<GoogleSearchButton
135134
class={button({ class: "align-bottom", size: "sm" })}
136135
query={domain}
@@ -154,7 +153,7 @@ async function Row_Actions({
154153
}: {
155154
organization_domain: get_orginization_domains_dto[number];
156155
}) {
157-
const { domain, id, organization_id, organization } = organization_domain;
156+
const { id, organization_id } = organization_domain;
158157

159158
const hx_delete_domain_props = await hx_urls.organizations[":id"].domains[
160159
":domain_id"
@@ -171,56 +170,34 @@ async function Row_Actions({
171170
return (
172171
<Horizontal_Menu>
173172
<ul class="list-none p-0">
174-
<li>
175-
<CopyButton
176-
text={domain}
177-
variant={{
178-
type: "tertiary",
179-
class: menu_item({ class: "shadow-none" }),
180-
}}
181-
>
182-
Copier le domaine
183-
</CopyButton>
184-
</li>
185-
<li>
186-
<button
187-
{...hx_delete_domain_props}
188-
class={menu_item()}
189-
hx-confirm={`Êtes-vous sûr de vouloir supprimer le domaine « ${domain} » de l'organisation « ${organization.cached_libelle} » ?`}
190-
hx-swap="none"
191-
role="menuitem"
192-
>
193-
🗑️ Supprimer
194-
</button>
195-
</li>
196173
<li>
197174
<button
198175
{...await hx_change_type_props("verified")}
199176
class={menu_item()}
200177
hx-swap="none"
201178
role="menuitem"
202179
>
203-
🔄 Domain vérifié
180+
Domain autorisé
204181
</button>
205182
</li>
206183
<li>
207184
<button
208-
{...await hx_change_type_props(null)}
185+
{...await hx_change_type_props("external")}
209186
class={menu_item()}
210187
hx-swap="none"
211188
role="menuitem"
212189
>
213-
🔄 Domain autorisé
190+
Domain externe
214191
</button>
215192
</li>
216193
<li>
217194
<button
218-
{...await hx_change_type_props("external")}
195+
{...await hx_delete_domain_props}
219196
class={menu_item()}
220197
hx-swap="none"
221198
role="menuitem"
222199
>
223-
🔄 Domain externe
200+
🚫 Domain refusé
224201
</button>
225202
</li>
226203
</ul>

0 commit comments

Comments
 (0)