From 1eb012924bb1f97c22523d0674500405490a62f3 Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Tue, 23 Jul 2024 16:03:10 +0200 Subject: [PATCH 01/11] Add asterisk explanation --- app/views/users/sessions/new.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/sessions/new.html.haml b/app/views/users/sessions/new.html.haml index a5ae68915..34d0f66ff 100644 --- a/app/views/users/sessions/new.html.haml +++ b/app/views/users/sessions/new.html.haml @@ -13,7 +13,7 @@ %h2.fr-h6= I18n.t('views.users.sessions.new.subtitle') .fr-fieldset__element - %p.fr-text--sm= t('utils.mandatory_champs') + %p.fr-text--sm= t('utils.asterisk_html') .fr-fieldset__element= render Dsfr::InputComponent.new(form: f, attribute: :email, input_type: :email_field, opts: { autocomplete: 'email', autofocus: true }) From 96f1f101a930a223b30c25c78dd46f23316ef683 Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Wed, 24 Jul 2024 10:42:05 +0200 Subject: [PATCH 02/11] Remove unnecessary lists around link & button --- app/views/users/sessions/new.html.haml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/views/users/sessions/new.html.haml b/app/views/users/sessions/new.html.haml index 34d0f66ff..2a9ee38b0 100644 --- a/app/views/users/sessions/new.html.haml +++ b/app/views/users/sessions/new.html.haml @@ -30,11 +30,9 @@ = f.label :remember_me, t('views.users.sessions.new.remember_me'), class: 'remember-me' .fr-fieldset__element - %ul.fr-btns-group - %li= f.submit t('views.users.sessions.new.connection'), class: "fr-btn fr-btn--lg" + .fr-btns-group= f.submit t('views.users.sessions.new.connection'), class: "fr-btn" - if AgentConnectService.enabled? %p.fr-hr-or= t('views.shared.france_connect_login.separator') %h2.important-header.mb-1= t('views.users.sessions.new.state_civil_servant') - %ul.fr-btns-group - %li= link_to t('views.users.sessions.new.connect_with_agent_connect'), agent_connect_path, class: "fr-btn fr-btn--secondary" + .fr-btns-group= link_to t('views.users.sessions.new.connect_with_agent_connect'), agent_connect_path, class: "fr-btn fr-btn--secondary" From 0ea4159027eb7bc672b2d512261c78675b7c2f4b Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Wed, 24 Jul 2024 11:16:25 +0200 Subject: [PATCH 03/11] Place catchphrase in a single paragraph --- app/views/layouts/commencer/_no_procedure.html.haml | 6 ++---- config/locales/en.yml | 4 +--- config/locales/fr.yml | 4 +--- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/app/views/layouts/commencer/_no_procedure.html.haml b/app/views/layouts/commencer/_no_procedure.html.haml index d579efb3e..389dd7a9a 100644 --- a/app/views/layouts/commencer/_no_procedure.html.haml +++ b/app/views/layouts/commencer/_no_procedure.html.haml @@ -1,10 +1,8 @@ .no-procedure - = image_tag "landing/hero/dematerialiser.svg", class: "paperless-logo", alt: "" + = image_tag "landing/hero/dematerialiser.svg", class: "paperless-logo fr-mb-1v", alt: "" .baseline.center .no-procedure-presentation - %p.simple= t('.line1') - %p= t('.line2') - %p= t('.line3') + %p.fr-m-6v= t('.text') %hr %p.small-simple= t('.are_you_new', app_name: Current.application_name) = link_to t('views.users.sessions.new.find_procedure'), t("links.common.faq.comment_trouver_ma_demarche_url"), title: new_tab_suffix(t('views.users.sessions.new.find_procedure')), class: "fr-btn fr-btn--secondary" diff --git a/config/locales/en.yml b/config/locales/en.yml index fe150433f..04881f0d2 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -77,9 +77,7 @@ en: layouts: commencer: no_procedure: - line1: A simple tool - line2: to manage dematerialized - line3: administrative forms. + text: A simple tool to manage dematerialized administrative forms. are_you_new: First time on %{app_name}? my_account: My account header: diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 7a3a5d135..1fd21adfb 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -68,9 +68,7 @@ fr: layouts: commencer: no_procedure: - line1: Un outil simple - line2: pour gérer les formulaires - line3: administratifs dématérialisés. + text: Un outil simple pour gérer les formulaires administratifs dématérialisés. are_you_new: Vous êtes nouveau sur %{app_name} ? my_account: Mon compte header: From 6bb9d708ab024476a9e1de09a3f17ed0a7d6776b Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Wed, 24 Jul 2024 11:24:08 +0200 Subject: [PATCH 04/11] Remove code legacy --- app/assets/stylesheets/procedure_context.scss | 8 -------- .../layouts/commencer/_no_procedure.html.haml | 14 ++++++-------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/app/assets/stylesheets/procedure_context.scss b/app/assets/stylesheets/procedure_context.scss index 6033fce0d..c2207c272 100644 --- a/app/assets/stylesheets/procedure_context.scss +++ b/app/assets/stylesheets/procedure_context.scss @@ -56,14 +56,6 @@ $procedure-context-breakpoint: $two-columns-breakpoint; } } -.no-procedure-presentation { - margin-bottom: 1.6rem; - - p { - margin: 0; - } -} - .procedure-context-content { @media (max-width: $procedure-context-breakpoint) { input[type=submit] { diff --git a/app/views/layouts/commencer/_no_procedure.html.haml b/app/views/layouts/commencer/_no_procedure.html.haml index 389dd7a9a..464ced550 100644 --- a/app/views/layouts/commencer/_no_procedure.html.haml +++ b/app/views/layouts/commencer/_no_procedure.html.haml @@ -1,8 +1,6 @@ -.no-procedure - = image_tag "landing/hero/dematerialiser.svg", class: "paperless-logo fr-mb-1v", alt: "" - .baseline.center - .no-procedure-presentation - %p.fr-m-6v= t('.text') - %hr - %p.small-simple= t('.are_you_new', app_name: Current.application_name) - = link_to t('views.users.sessions.new.find_procedure'), t("links.common.faq.comment_trouver_ma_demarche_url"), title: new_tab_suffix(t('views.users.sessions.new.find_procedure')), class: "fr-btn fr-btn--secondary" +.center + = image_tag "landing/hero/dematerialiser.svg", class: "fr-mb-1v", alt: "" + %p.fr-m-6v= t('.text') + %hr + %p= t('.are_you_new', app_name: Current.application_name) + = link_to t('views.users.sessions.new.find_procedure'), t("links.common.faq.comment_trouver_ma_demarche_url"), title: new_tab_suffix(t('views.users.sessions.new.find_procedure')), class: "fr-btn fr-btn--secondary" From 2e3ee18a326026cfd20d655bd04aa1567d276768 Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Wed, 24 Jul 2024 13:00:40 +0200 Subject: [PATCH 05/11] Prevent image overflow --- app/views/layouts/commencer/_no_procedure.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/commencer/_no_procedure.html.haml b/app/views/layouts/commencer/_no_procedure.html.haml index 464ced550..7dbb9621b 100644 --- a/app/views/layouts/commencer/_no_procedure.html.haml +++ b/app/views/layouts/commencer/_no_procedure.html.haml @@ -1,6 +1,6 @@ .center - = image_tag "landing/hero/dematerialiser.svg", class: "fr-mb-1v", alt: "" - %p.fr-m-6v= t('.text') + = image_tag "landing/hero/dematerialiser.svg", class: "fr-responsive-img fr-mb-1v", alt: "" + %p.fr-m-4w= t('.text') %hr %p= t('.are_you_new', app_name: Current.application_name) = link_to t('views.users.sessions.new.find_procedure'), t("links.common.faq.comment_trouver_ma_demarche_url"), title: new_tab_suffix(t('views.users.sessions.new.find_procedure')), class: "fr-btn fr-btn--secondary" From 280da9fd6c666ba9f6532d5d916392186c3eeba8 Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Wed, 24 Jul 2024 14:23:02 +0200 Subject: [PATCH 06/11] Remove unnecessary lists around link & button (agent connect page) --- app/views/agent_connect/agent/index.html.haml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/views/agent_connect/agent/index.html.haml b/app/views/agent_connect/agent/index.html.haml index 375ca47ce..c975e9203 100644 --- a/app/views/agent_connect/agent/index.html.haml +++ b/app/views/agent_connect/agent/index.html.haml @@ -55,14 +55,12 @@ = f.check_box :remember_me = f.label :remember_me, t('views.users.sessions.new.remember_me'), class: 'remember-me' - %ul.fr-btns-group - %li= f.submit t('views.users.sessions.new.connection'), class: "fr-btn" + .fr-btns-group= f.submit t('views.users.sessions.new.connection'), class: "fr-btn" %hr %h2.fr-h6= t('.you_are_a_citizen') - %ul.fr-btns-group - %li= link_to t('.citizen_page'), new_user_session_path, class: "fr-btn fr-btn--secondary width-100" + .fr-btns-group= link_to t('.citizen_page'), new_user_session_path, class: "fr-btn fr-btn--secondary" .fr-col-lg.fr-p-6w = render Dsfr::CalloutComponent.new(title: t('.full_deploy_title'), icon: 'fr-icon-information-line') do |c| From f8974921c9e5d3ba99e9ad8e866569cd5abda2a6 Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Wed, 24 Jul 2024 14:24:14 +0200 Subject: [PATCH 07/11] Add asterisk explanation (agent connect page) --- app/views/agent_connect/agent/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/agent_connect/agent/index.html.haml b/app/views/agent_connect/agent/index.html.haml index c975e9203..f04a87b46 100644 --- a/app/views/agent_connect/agent/index.html.haml +++ b/app/views/agent_connect/agent/index.html.haml @@ -38,7 +38,7 @@ = t('views.users.sessions.new.for_tiers_alert') .fr-fieldset__element - %p.fr-text--sm= t('utils.mandatory_champs') + %p.fr-text--sm= t('utils.asterisk_html') .fr-fieldset__element = render Dsfr::InputComponent.new(form: f, attribute: :email, input_type: :email_field, opts: { autocomplete: 'email' }) do |c| From 1b9ba64f7e9994324d996964dea6ee07f06ac378 Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Wed, 24 Jul 2024 14:28:08 +0200 Subject: [PATCH 08/11] Remove code legacy (agent connect page) --- app/assets/stylesheets/procedure_context.scss | 9 --------- app/views/agent_connect/agent/index.html.haml | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/app/assets/stylesheets/procedure_context.scss b/app/assets/stylesheets/procedure_context.scss index c2207c272..589e2b4bb 100644 --- a/app/assets/stylesheets/procedure_context.scss +++ b/app/assets/stylesheets/procedure_context.scss @@ -4,15 +4,6 @@ $procedure-context-breakpoint: $two-columns-breakpoint; .procedure-preview { - .paperless-logo { - width: 100%; - margin-bottom: 60px; - - @media (max-width: $procedure-context-breakpoint) { - display: none; - } - } - .simple { margin-bottom: 0.2rem; font-size: 1.5rem; diff --git a/app/views/agent_connect/agent/index.html.haml b/app/views/agent_connect/agent/index.html.haml index f04a87b46..d83c40f8c 100644 --- a/app/views/agent_connect/agent/index.html.haml +++ b/app/views/agent_connect/agent/index.html.haml @@ -67,4 +67,4 @@ - c.with_body do = t('.full_deploy_body') %h2.fr-h6= t('.whats_ds', application_name: Current.application_name) - = image_tag "landing/hero/dematerialiser.svg", class: "paperless-logo", alt: "" + = image_tag "landing/hero/dematerialiser.svg", class: "fr-responsive-img", alt: "" From 280a25928c7edbca05b45b17a05c64fdb74f9263 Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Thu, 25 Jul 2024 09:59:36 +0200 Subject: [PATCH 09/11] Standardize example address for email fields --- config/locales/en.yml | 12 ++++++------ config/locales/fr.yml | 14 +++++++------- config/locales/models/champs/email_champ/en.yml | 2 +- config/locales/models/champs/email_champ/fr.yml | 2 +- config/locales/views/support/en.yml | 7 ++++--- config/locales/views/support/fr.yml | 7 ++++--- 6 files changed, 23 insertions(+), 21 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 04881f0d2..42aa201b5 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -279,7 +279,7 @@ en: textarea: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. decimal_number: 49.3 integer_number: 42 - email: personne@fournisseur.fr + email: address@mail.com phone: 0612345678 iban: FR7611315000011234567890138 yes_no: "true" @@ -611,7 +611,7 @@ en: password: 'Password' requested_merge_into: 'new email address' hints: - email: "Expected format : john.doe@example.com" + email: 'Expected format : address@mail.com' user: siret: 'SIRET number' << : *default_attributes @@ -644,7 +644,7 @@ en: not_a_phone: 'Invalid phone number' not_a_rna: 'Invalid RNA number' url: 'is not a valid link' - invalid_email_format: "is invalid. Please fill in a valid email ex: john.doe@exemple.fr" + invalid_email_format: 'is invalid. Please fill in a valid email ex: address@mail.com' models: attestation_template: attributes: @@ -661,9 +661,9 @@ en: reset_password_token: invalid: ": is expired. Ask a new one" email: - blank: "is empty. Fill in the email" - invalid: "is invalid. Fill in a valid email address, example: john.doe@example.fr" - taken: "already in use. Fill in another email" + blank: 'is empty. Fill in the email' + invalid: 'is invalid. Fill in a valid email address, example: address@mail.com' + taken: 'already in use. Fill in another email' password: too_short: "is too short. Fill in a password with at least 8 characters" not_strong: "not strong enough. Fill in a stronger password" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 1fd21adfb..2e1d45924 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -271,7 +271,7 @@ fr: textarea: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. decimal_number: 49.3 integer_number: 42 - email: personne@fournisseur.fr + email: adresse@mail.com phone: 0612345678 iban: FR7611315000011234567890138 yes_no: "true" @@ -329,7 +329,7 @@ fr: modal_highlight: Les invités ont le droit de voir et modifier votre dossier. title: Ajouter un invité email: Adresse mail - email_hint: "Exemple : camilya.martin@exemple.fr" + email_hint: 'Exemple : adresse@mail.com' invite_message: Ajouter un message à la personne invitée (optionnel) send_invitation: Envoyer une invitation withdraw_permission: "Révoquer l’autorisation" @@ -611,7 +611,7 @@ fr: password: 'Mot de passe' requested_merge_into: 'La nouvelle adresse email' hints: - email: "Format attendu : john.doe@exemple.fr" + email: 'Format attendu : adresse@mail.com' user: siret: 'Numéro SIRET' << : *default_attributes @@ -644,7 +644,7 @@ fr: not_a_phone: 'Numéro de téléphone invalide' not_a_rna: 'Numéro RNA invalide' url: 'n’est pas un lien valide' - invalid_email_format: "est invalide. Saisir une adresse électronique valide, exemple : john.doe@exemple.fr" + invalid_email_format: 'est invalide. Saisir une adresse électronique valide, exemple : adresse@mail.com' models: attestation_template: attributes: @@ -659,9 +659,9 @@ fr: reset_password_token: invalid: ": Votre lien de nouveau mot de passe a expiré. Merci d’en demander un nouveau." email: - blank: "est vide. Saisir une adresse électronique" - invalid: "est invalide. Saisir une adresse électronique valide, exemple : john.doe@exemple.fr" - taken: "déjà utilisé. Saisir une autre adresse électronique." + blank: 'est vide. Saisir une adresse électronique' + invalid: 'est invalide. Saisir une adresse électronique valide, exemple : adresse@mail.com' + taken: 'déjà utilisé. Saisir une autre adresse électronique.' password: too_short: "est trop court. Saisir un mot de passe avec au moins 8 caractères" not_strong: "n’est pas assez complexe. Saisir un mot de passe plus complexe" diff --git a/config/locales/models/champs/email_champ/en.yml b/config/locales/models/champs/email_champ/en.yml index 887eef21f..f145f1b37 100644 --- a/config/locales/models/champs/email_champ/en.yml +++ b/config/locales/models/champs/email_champ/en.yml @@ -3,4 +3,4 @@ en: attributes: champs/email_champ: hints: - value: "Expected format: name@domain.fr" + value: 'Expected format: address@mail.com' diff --git a/config/locales/models/champs/email_champ/fr.yml b/config/locales/models/champs/email_champ/fr.yml index 98e47d929..2505e4278 100644 --- a/config/locales/models/champs/email_champ/fr.yml +++ b/config/locales/models/champs/email_champ/fr.yml @@ -3,4 +3,4 @@ fr: attributes: champs/email_champ: hints: - value: "Format attendu : nom@domaine.fr" + value: 'Format attendu : adresse@mail.com' diff --git a/config/locales/views/support/en.yml b/config/locales/views/support/en.yml index a280d3746..12d22bdd9 100644 --- a/config/locales/views/support/en.yml +++ b/config/locales/views/support/en.yml @@ -2,9 +2,10 @@ en: support: index: contact: Contact - intro_html: "

Contact us via this form and we will answer you as quickly as possible.

-

Make sure you provide all the required information so we can help you in the best way.

" - notice_email: "(example: myaddress@mymail.com)" + intro_html: + '

Contact us via this form and we will answer you as quickly as possible.

+

Make sure you provide all the required information so we can help you in the best way.

' + notice_email: '(example: address@mail.com)' your_question: Your question our_answer: Our answer notice_pj_product: A screenshot can help us identify the element to improve. diff --git a/config/locales/views/support/fr.yml b/config/locales/views/support/fr.yml index 2e09606fc..4bae61f9b 100644 --- a/config/locales/views/support/fr.yml +++ b/config/locales/views/support/fr.yml @@ -2,9 +2,10 @@ fr: support: index: contact: Contact - intro_html: "

Contactez-nous via ce formulaire et nous vous répondrons dans les plus brefs délais.

-

Pensez bien à nous donner le plus d’informations possible pour que nous puissions vous aider au mieux.

" - notice_email: "(exemple : monadresse@monmail.com)" + intro_html: + '

Contactez-nous via ce formulaire et nous vous répondrons dans les plus brefs délais.

+

Pensez bien à nous donner le plus d’informations possible pour que nous puissions vous aider au mieux.

' + notice_email: '(exemple : adresse@mail.com)' your_question: Votre question our_answer: Notre réponse notice_pj_product: Une capture d’écran peut nous aider à identifier plus facilement l’endroit à améliorer. From e98dbf3898b94d5eb5d0aff5aef0f11e6d9832e4 Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Thu, 25 Jul 2024 10:15:43 +0200 Subject: [PATCH 10/11] Move expected format of email field to --- app/views/support/index.html.haml | 3 ++- config/locales/views/support/en.yml | 2 +- config/locales/views/support/fr.yml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/support/index.html.haml b/app/views/support/index.html.haml index 532cbab8e..26727bcbe 100644 --- a/app/views/support/index.html.haml +++ b/app/views/support/index.html.haml @@ -18,8 +18,9 @@ .fr-input-group = label_tag :email, class: 'fr-label' do Email - = t('.notice_email') = render EditableChamp::AsteriskMandatoryComponent.new + %span.fr-hint-text + = t('.notice_email') = email_field_tag :email, params[:email], required: true, autocomplete: 'email', class: 'fr-input' %fieldset.fr-fieldset{ name: "type" } diff --git a/config/locales/views/support/en.yml b/config/locales/views/support/en.yml index 12d22bdd9..970129276 100644 --- a/config/locales/views/support/en.yml +++ b/config/locales/views/support/en.yml @@ -5,7 +5,7 @@ en: intro_html: '

Contact us via this form and we will answer you as quickly as possible.

Make sure you provide all the required information so we can help you in the best way.

' - notice_email: '(example: address@mail.com)' + notice_email: 'Expected format: address@mail.com' your_question: Your question our_answer: Our answer notice_pj_product: A screenshot can help us identify the element to improve. diff --git a/config/locales/views/support/fr.yml b/config/locales/views/support/fr.yml index 4bae61f9b..02f520625 100644 --- a/config/locales/views/support/fr.yml +++ b/config/locales/views/support/fr.yml @@ -5,7 +5,7 @@ fr: intro_html: '

Contactez-nous via ce formulaire et nous vous répondrons dans les plus brefs délais.

Pensez bien à nous donner le plus d’informations possible pour que nous puissions vous aider au mieux.

' - notice_email: '(exemple : adresse@mail.com)' + notice_email: 'Format attendu : adresse@mail.com' your_question: Votre question our_answer: Notre réponse notice_pj_product: Une capture d’écran peut nous aider à identifier plus facilement l’endroit à améliorer. From c4afbfcbf1d8e52ef84e60c0c297c84d6613bcef Mon Sep 17 00:00:00 2001 From: Corinne Durrmeyer Date: Thu, 25 Jul 2024 12:14:52 +0200 Subject: [PATCH 11/11] Update spec files --- spec/controllers/experts/avis_controller_spec.rb | 4 ++-- spec/controllers/instructeurs/dossiers_controller_spec.rb | 4 ++-- spec/controllers/manager/dossiers_controller_spec.rb | 2 +- spec/controllers/manager/users_controller_spec.rb | 2 +- spec/controllers/users/profil_controller_spec.rb | 2 +- spec/controllers/users/transfers_controller_spec.rb | 2 +- spec/models/invite_spec.rb | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/spec/controllers/experts/avis_controller_spec.rb b/spec/controllers/experts/avis_controller_spec.rb index 77a60c471..65fdbcd5d 100644 --- a/spec/controllers/experts/avis_controller_spec.rb +++ b/spec/controllers/experts/avis_controller_spec.rb @@ -399,7 +399,7 @@ describe Experts::AvisController, type: :controller do it do expect(response).to render_template :instruction - expect(flash.alert).to eq(["toto.fr : Le champ « Email » est invalide. Saisir une adresse électronique valide, exemple : john.doe@exemple.fr"]) + expect(flash.alert).to eq(["toto.fr : Le champ « Email » est invalide. Saisir une adresse électronique valide, exemple : adresse@mail.com"]) expect(Avis.last).to eq(previous_avis) expect(dossier.last_avis_updated_at).to eq(nil) end @@ -430,7 +430,7 @@ describe Experts::AvisController, type: :controller do it do expect(response).to render_template :instruction - expect(flash.alert).to eq(["toto.fr : Le champ « Email » est invalide. Saisir une adresse électronique valide, exemple : john.doe@exemple.fr"]) + expect(flash.alert).to eq(["toto.fr : Le champ « Email » est invalide. Saisir une adresse électronique valide, exemple : adresse@mail.com"]) expect(flash.notice).to eq("Une demande d’avis a été envoyée à titi@titimail.com") expect(Avis.count).to eq(old_avis_count + 1) end diff --git a/spec/controllers/instructeurs/dossiers_controller_spec.rb b/spec/controllers/instructeurs/dossiers_controller_spec.rb index 9445a00db..b3e064823 100644 --- a/spec/controllers/instructeurs/dossiers_controller_spec.rb +++ b/spec/controllers/instructeurs/dossiers_controller_spec.rb @@ -817,7 +817,7 @@ describe Instructeurs::DossiersController, type: :controller do before { subject } it { expect(response).to render_template :avis } - it { expect(flash.alert).to eq(["emaila.com : Le champ « Email » est invalide. Saisir une adresse électronique valide, exemple : john.doe@exemple.fr"]) } + it { expect(flash.alert).to eq(["emaila.com : Le champ « Email » est invalide. Saisir une adresse électronique valide, exemple : adresse@mail.com"]) } it { expect { subject }.not_to change(Avis, :count) } it { expect(dossier.last_avis_updated_at).to eq(nil) } end @@ -839,7 +839,7 @@ describe Instructeurs::DossiersController, type: :controller do before { subject } it { expect(response).to render_template :avis } - it { expect(flash.alert).to eq(["toto.fr : Le champ « Email » est invalide. Saisir une adresse électronique valide, exemple : john.doe@exemple.fr"]) } + it { expect(flash.alert).to eq(["toto.fr : Le champ « Email » est invalide. Saisir une adresse électronique valide, exemple : adresse@mail.com"]) } it { expect(flash.notice).to eq("Une demande d’avis a été envoyée à titi@titimail.com") } it { expect(Avis.count).to eq(old_avis_count + 1) } it { expect(saved_avis.expert.email).to eq("titi@titimail.com") } diff --git a/spec/controllers/manager/dossiers_controller_spec.rb b/spec/controllers/manager/dossiers_controller_spec.rb index 47023a284..9caef7703 100644 --- a/spec/controllers/manager/dossiers_controller_spec.rb +++ b/spec/controllers/manager/dossiers_controller_spec.rb @@ -54,7 +54,7 @@ describe Manager::DossiersController, type: :controller do it do expect { subject }.not_to have_enqueued_mail - expect(flash[:alert]).to eq("L’adresse email est invalide. Saisir une adresse électronique valide, exemple : john.doe@exemple.fr") + expect(flash[:alert]).to eq("L’adresse email est invalide. Saisir une adresse électronique valide, exemple : adresse@mail.com") end end end diff --git a/spec/controllers/manager/users_controller_spec.rb b/spec/controllers/manager/users_controller_spec.rb index 8564bbd6a..511133061 100644 --- a/spec/controllers/manager/users_controller_spec.rb +++ b/spec/controllers/manager/users_controller_spec.rb @@ -40,7 +40,7 @@ describe Manager::UsersController, type: :controller do subject expect(User.find_by(id: user.id).email).not_to eq(nouvel_email) - expect(flash[:error]).to match("Le champ « Adresse électronique » est invalide. Saisir une adresse électronique valide, exemple : john.doe@exemple.fr") + expect(flash[:error]).to match("Le champ « Adresse électronique » est invalide. Saisir une adresse électronique valide, exemple : adresse@mail.com") end end end diff --git a/spec/controllers/users/profil_controller_spec.rb b/spec/controllers/users/profil_controller_spec.rb index a0f373f29..b387237b8 100644 --- a/spec/controllers/users/profil_controller_spec.rb +++ b/spec/controllers/users/profil_controller_spec.rb @@ -83,7 +83,7 @@ describe Users::ProfilController, type: :controller do end it { expect(response).to redirect_to(profil_path) } - it { expect(flash.alert).to eq(["Le champ « Adresse électronique » est invalide. Saisir une adresse électronique valide, exemple : john.doe@exemple.fr"]) } + it { expect(flash.alert).to eq(["Le champ « Adresse électronique » est invalide. Saisir une adresse électronique valide, exemple : adresse@mail.com"]) } end context 'when the user has an instructeur role' do diff --git a/spec/controllers/users/transfers_controller_spec.rb b/spec/controllers/users/transfers_controller_spec.rb index 3e8e93a9e..d8de39d9c 100644 --- a/spec/controllers/users/transfers_controller_spec.rb +++ b/spec/controllers/users/transfers_controller_spec.rb @@ -98,7 +98,7 @@ describe Users::TransfersController, type: :controller do context "when email is invalid" do let(:email) { "not-an-email" } it_behaves_like 'email error' do - let(:expected_error) { "L’adresse email est invalide. Saisir une adresse électronique valide, exemple : john.doe@exemple.fr" } + let(:expected_error) { "L’adresse email est invalide. Saisir une adresse électronique valide, exemple : adresse@mail.com" } end end end diff --git a/spec/models/invite_spec.rb b/spec/models/invite_spec.rb index ac2d8d510..8b7047ce7 100644 --- a/spec/models/invite_spec.rb +++ b/spec/models/invite_spec.rb @@ -31,7 +31,7 @@ describe Invite do it do expect(invite.save).to be false - expect(invite.errors.full_messages).to eq(["Le champ « Email » est invalide. Saisir une adresse électronique valide, exemple : john.doe@exemple.fr"]) + expect(invite.errors.full_messages).to eq(["Le champ « Email » est invalide. Saisir une adresse électronique valide, exemple : adresse@mail.com"]) end context 'when an email is empty' do