fix linter and specs

This commit is contained in:
Lisa Durand 2024-05-28 10:58:03 +02:00
parent 2659d0f966
commit 291271f04b
6 changed files with 8 additions and 13 deletions

View file

@ -2,14 +2,13 @@
locals: { steps: [['Démarches', admin_procedures_path], locals: { steps: [['Démarches', admin_procedures_path],
[@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)], [@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)],
[Procedure.human_attribute_name(:jeton_api_particulier), admin_procedure_api_particulier_path(@procedure)], [Procedure.human_attribute_name(:jeton_api_particulier), admin_procedure_api_particulier_path(@procedure)],
['Jeton']] } ['Jeton Particulier']] }
.container .fr-container
%h1.page-title %h1.fr-h2
= t('.configure_token') Jeton Particulier
.container .fr-container
%h1
= form_with model: @procedure, url: admin_procedure_api_particulier_jeton_path, local: true do |f| = 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| = render Dsfr::AlertComponent.new(state: :info, size: :sm, extra_class_names: 'fr-mb-2w') do |c|
- c.with_body do - c.with_body do

View file

@ -6,9 +6,7 @@ en:
show: Show breadcrumb show: Show breadcrumb
preview: "Preview the form" preview: "Preview the form"
preview_annotations: "Preview annotations" preview_annotations: "Preview annotations"
continue: "Validate form"
continue_annotations: "Validate annotations" continue_annotations: "Validate annotations"
continue_title: "You can comeback using this link"
since: "since %{date}" since: "since %{date}"
closed: "Closed" closed: "Closed"
published: "Published" published: "Published"

View file

@ -6,9 +6,7 @@ fr:
show: "Voir le fil dAriane" show: "Voir le fil dAriane"
preview: "Prévisualiser le formulaire" preview: "Prévisualiser le formulaire"
preview_annotations: "Prévisualiser les annotations" preview_annotations: "Prévisualiser les annotations"
continue: "Valider le formulaire"
continue_annotations: "Valider les annotations" continue_annotations: "Valider les annotations"
continue_title: "Vous pourrez revenir ici par la suite"
since: "depuis le %{date}" since: "depuis le %{date}"
closed: "Close" closed: "Close"
published: "Publiée" published: "Publiée"

View file

@ -977,7 +977,7 @@ describe Administrateurs::ProceduresController, type: :controller do
end end
it { expect(flash[:notice]).to be_present } 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 end
context 'when the embed code is not valid' do context 'when the embed code is not valid' do

View file

@ -14,7 +14,7 @@ describe 'Administrateurs can manage administrateurs', js: true do
scenario 'card is clickable' do scenario 'card is clickable' do
visit admin_procedure_path(procedure) visit admin_procedure_path(procedure)
find('#administrateurs').click 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 end
context 'as admin not flagged from manager' do context 'as admin not flagged from manager' do

View file

@ -17,7 +17,7 @@ describe 'Manage procedure instructeurs', js: true do
scenario 'it works' do scenario 'it works' do
visit admin_procedure_path(procedure) visit admin_procedure_path(procedure)
find('#groupe-instructeurs').click find('#groupe-instructeurs').click
expect(page).to have_css("h1", text: "Gestion des instructeurs") expect(page).to have_css("h1", text: "Instructeurs")
end end
end end