From 291271f04b718cfcd01a4265ad1d4809972af1d0 Mon Sep 17 00:00:00 2001 From: Lisa Durand Date: Tue, 28 May 2024 10:58:03 +0200 Subject: [PATCH] fix linter and specs --- .../administrateurs/jeton_particulier/show.html.haml | 11 +++++------ config/locales/views/layouts/_breadcrumb.en.yml | 2 -- config/locales/views/layouts/_breadcrumb.fr.yml | 2 -- .../administrateurs/procedures_controller_spec.rb | 2 +- .../administrateurs/procedure_administrateurs_spec.rb | 2 +- .../procedure_groupe_instructeur_spec.rb | 2 +- 6 files changed, 8 insertions(+), 13 deletions(-) diff --git a/app/views/administrateurs/jeton_particulier/show.html.haml b/app/views/administrateurs/jeton_particulier/show.html.haml index 7527313eb..f0ded6bdb 100644 --- a/app/views/administrateurs/jeton_particulier/show.html.haml +++ b/app/views/administrateurs/jeton_particulier/show.html.haml @@ -2,14 +2,13 @@ locals: { steps: [['Démarches', admin_procedures_path], [@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)], [Procedure.human_attribute_name(:jeton_api_particulier), admin_procedure_api_particulier_path(@procedure)], - ['Jeton']] } + ['Jeton Particulier']] } -.container - %h1.page-title - = t('.configure_token') +.fr-container + %h1.fr-h2 + Jeton Particulier -.container - %h1 +.fr-container = form_with model: @procedure, url: admin_procedure_api_particulier_jeton_path, local: true do |f| = render Dsfr::AlertComponent.new(state: :info, size: :sm, extra_class_names: 'fr-mb-2w') do |c| - c.with_body do diff --git a/config/locales/views/layouts/_breadcrumb.en.yml b/config/locales/views/layouts/_breadcrumb.en.yml index 8efbc086e..f0a4ff07d 100644 --- a/config/locales/views/layouts/_breadcrumb.en.yml +++ b/config/locales/views/layouts/_breadcrumb.en.yml @@ -6,9 +6,7 @@ en: show: Show breadcrumb preview: "Preview the form" preview_annotations: "Preview annotations" - continue: "Validate form" continue_annotations: "Validate annotations" - continue_title: "You can comeback using this link" since: "since %{date}" closed: "Closed" published: "Published" diff --git a/config/locales/views/layouts/_breadcrumb.fr.yml b/config/locales/views/layouts/_breadcrumb.fr.yml index 14f4fa15f..9605fb9ef 100644 --- a/config/locales/views/layouts/_breadcrumb.fr.yml +++ b/config/locales/views/layouts/_breadcrumb.fr.yml @@ -6,9 +6,7 @@ fr: show: "Voir le fil d’Ariane" preview: "Prévisualiser le formulaire" preview_annotations: "Prévisualiser les annotations" - continue: "Valider le formulaire" continue_annotations: "Valider les annotations" - continue_title: "Vous pourrez revenir ici par la suite" since: "depuis le %{date}" closed: "Close" published: "Publiée" diff --git a/spec/controllers/administrateurs/procedures_controller_spec.rb b/spec/controllers/administrateurs/procedures_controller_spec.rb index 1193b769f..e19155b82 100644 --- a/spec/controllers/administrateurs/procedures_controller_spec.rb +++ b/spec/controllers/administrateurs/procedures_controller_spec.rb @@ -977,7 +977,7 @@ describe Administrateurs::ProceduresController, type: :controller do end it { expect(flash[:notice]).to be_present } - it { expect(response.body).to include "MonAvis" } + it { expect(response).to redirect_to(admin_procedure_path(procedure.id)) } end context 'when the embed code is not valid' do diff --git a/spec/system/administrateurs/procedure_administrateurs_spec.rb b/spec/system/administrateurs/procedure_administrateurs_spec.rb index 8d6d3bea6..420c439b3 100644 --- a/spec/system/administrateurs/procedure_administrateurs_spec.rb +++ b/spec/system/administrateurs/procedure_administrateurs_spec.rb @@ -14,7 +14,7 @@ describe 'Administrateurs can manage administrateurs', js: true do scenario 'card is clickable' do visit admin_procedure_path(procedure) find('#administrateurs').click - expect(page).to have_css("h1", text: "Gérer les administrateurs de « #{procedure.libelle} »") + expect(page).to have_css("h1", text: "Administrateurs") end context 'as admin not flagged from manager' do diff --git a/spec/system/administrateurs/procedure_groupe_instructeur_spec.rb b/spec/system/administrateurs/procedure_groupe_instructeur_spec.rb index c5ac2c33a..6dd065aae 100644 --- a/spec/system/administrateurs/procedure_groupe_instructeur_spec.rb +++ b/spec/system/administrateurs/procedure_groupe_instructeur_spec.rb @@ -17,7 +17,7 @@ describe 'Manage procedure instructeurs', js: true do scenario 'it works' do visit admin_procedure_path(procedure) find('#groupe-instructeurs').click - expect(page).to have_css("h1", text: "Gestion des instructeurs") + expect(page).to have_css("h1", text: "Instructeurs") end end