diff --git a/src/frontend/apps/desk/src/features/mail-domains/api/useCreateMailbox.tsx b/src/frontend/apps/desk/src/features/mail-domains/api/useCreateMailbox.tsx index 967ba16..86a19a2 100644 --- a/src/frontend/apps/desk/src/features/mail-domains/api/useCreateMailbox.tsx +++ b/src/frontend/apps/desk/src/features/mail-domains/api/useCreateMailbox.tsx @@ -13,7 +13,6 @@ export interface CreateMailboxParams { last_name: string; local_part: string; secondary_email: string; - phone_number: string; mailDomainSlug: string; } diff --git a/src/frontend/apps/desk/src/features/mail-domains/components/forms/CreateMailboxForm.tsx b/src/frontend/apps/desk/src/features/mail-domains/components/forms/CreateMailboxForm.tsx index 8f3cbdf..e2736d8 100644 --- a/src/frontend/apps/desk/src/features/mail-domains/components/forms/CreateMailboxForm.tsx +++ b/src/frontend/apps/desk/src/features/mail-domains/components/forms/CreateMailboxForm.tsx @@ -31,7 +31,6 @@ const createMailboxValidationSchema = z.object({ last_name: z.string().min(1), local_part: z.string().min(1), secondary_email: z.string().min(1), - phone_number: z.string().min(1), }); export const CreateMailboxForm = ({ @@ -52,7 +51,6 @@ export const CreateMailboxForm = ({ last_name: '', local_part: '', secondary_email: '', - phone_number: '', }, mode: 'onChange', reValidateMode: 'onChange', @@ -250,26 +248,6 @@ const Form = ({ )} /> - - - ( - - )} - /> - ); diff --git a/src/frontend/apps/desk/src/i18n/translations.json b/src/frontend/apps/desk/src/i18n/translations.json index 7c47049..6b57c5d 100644 --- a/src/frontend/apps/desk/src/i18n/translations.json +++ b/src/frontend/apps/desk/src/i18n/translations.json @@ -97,11 +97,9 @@ "Ouch !": "Ouch !", "Owner": "Propriétaire", "Personal data and cookies": "Données personnelles et cookies", - "Phone number": "Numéro de téléphone", "Please enter the first part of the email address, without including \"@\" in it": "Veuillez entrer la première partie de l'adresse e-mail, sans y inclure \"@\"", "Please enter your first name": "Veuillez saisir votre prénom", "Please enter your last name": "Veuillez saisir votre nom", - "Please enter your phone number": "Veuillez indiquer votre numéro de téléphone", "Please enter your secondary email address": "Veuillez saisir votre adresse e-mail secondaire", "Publication Director": "Directeur de la publication", "Publisher": "Éditeur", diff --git a/src/frontend/apps/e2e/__tests__/app-desk/mail-domain-create-mailbox.spec.ts b/src/frontend/apps/e2e/__tests__/app-desk/mail-domain-create-mailbox.spec.ts index d44ff33..c6e507a 100644 --- a/src/frontend/apps/e2e/__tests__/app-desk/mail-domain-create-mailbox.spec.ts +++ b/src/frontend/apps/e2e/__tests__/app-desk/mail-domain-create-mailbox.spec.ts @@ -144,8 +144,7 @@ test.describe('Mail domain create mailbox', () => { payload.first_name === 'John' && payload.last_name === 'Doe' && payload.local_part === 'john.doe' && - payload.secondary_email === 'john.doe@mail.com' && - payload.phone_number === '003371020304050'; + payload.secondary_email === 'john.doe@mail.com'; } } }); @@ -173,7 +172,6 @@ test.describe('Mail domain create mailbox', () => { await page.getByLabel('Main email address').fill('john.doe'); await expect(page.locator('span').getByText('@domain.fr')).toBeVisible(); await page.getByLabel('Secondary email address').fill('john.doe@mail.com'); - await page.getByLabel('Phone number').fill('003371020304050'); await page.getByRole('button', { name: 'Submit' }).click(); @@ -240,14 +238,13 @@ test.describe('Mail domain create mailbox', () => { }; let isCreateMailboxRequestSent = false; - page.on('request', (request) => { - if ( - request.url().includes('/mail-domains/domainfr/mailboxes/') && - request.method() === 'POST' - ) { - isCreateMailboxRequestSent = true; - } - }); + page.on( + 'request', + (request) => + (isCreateMailboxRequestSent = + request.url().includes('/mail-domains/domainfr/mailboxes/') && + request.method() === 'POST'), + ); await interceptApiCalls(); @@ -269,9 +266,6 @@ test.describe('Mail domain create mailbox', () => { await expect( page.getByText('Please enter your secondary email address'), ).toBeVisible(); - await expect( - page.getByText('Please enter your phone number'), - ).toBeVisible(); expect(isCreateMailboxRequestSent).toBeFalsy(); });