diff --git a/app/views/dossiers/_infos_dossier.html.haml b/app/views/dossiers/_infos_dossier.html.haml index d763365b7..2a18e98fa 100644 --- a/app/views/dossiers/_infos_dossier.html.haml +++ b/app/views/dossiers/_infos_dossier.html.haml @@ -93,22 +93,22 @@ -if gestionnaire_signed_in? -if !@facade.dossier.read_only? = form_tag(url_for({controller: 'backoffice/dossiers', action: :valid, dossier_id: @facade.dossier.id}), class: 'form-inline', method: 'POST') do - %button#action_button.btn.btn-success - = 'Valider le dossier' + %button.action_button.btn.btn-success{'data-toggle' => :tooltip, title: 'En cliquant ici, vous figez le dossier et autorisez le dépôt du dossier pour instruction.'} + = 'Déclarer complet' -elsif @facade.dossier.submitted? = form_tag(url_for({controller: 'backoffice/dossiers', action: :receive, dossier_id: @facade.dossier.id}), class: 'form-inline', method: 'POST') do - %button#action_button.btn.btn-success + %button.action_button.btn.btn-success = 'Notifier de la bonne réception' -elsif @facade.dossier.received? = form_tag(url_for({controller: 'backoffice/dossiers', action: :close, dossier_id: @facade.dossier.id}), class: 'form-inline action_button', method: 'POST', style: 'display:inline', 'data-toggle' => :tooltip, title: 'Accepter') do - %button#action_button.btn.btn-success + %button.action_button.btn.btn-success %i.fa.fa-check = form_tag(url_for({controller: 'backoffice/dossiers', action: :refuse, dossier_id: @facade.dossier.id}), class: 'form-inline action_button', method: 'POST', style: 'display:inline', 'data-toggle' => :tooltip, title: 'Refuser') do - %button#action_button.btn.btn-danger + %button.action_button.btn.btn-danger %i.fa.fa-times = form_tag(url_for({controller: 'backoffice/dossiers', action: :without_continuation, dossier_id: @facade.dossier.id}), class: 'form-inline action_button', method: 'POST', style: 'display:inline', 'data-toggle' => :tooltip, title: 'Classer sans suite') do - %button#action_button.btn.btn-warning + %button.action_button.btn.btn-warning %i.fa.fa-circle-o diff --git a/spec/mailers/notification_mailer_spec.rb b/spec/mailers/notification_mailer_spec.rb index ff411562d..34a373b35 100644 --- a/spec/mailers/notification_mailer_spec.rb +++ b/spec/mailers/notification_mailer_spec.rb @@ -18,7 +18,7 @@ RSpec.describe NotificationMailer, type: :mailer do subject(:subject) { described_class.dossier_validated(dossier) } - it { expect(subject.body).to match("Votre dossier N°#{dossier.id} a été validé par votre accompagnateur.") } + it { expect(subject.body).to match("Votre dossier N°#{dossier.id} est prêt à être déposé pour instruction.") } it { expect(subject.body).to include("Afin de finaliser son dépôt, merci de vous rendre sur #{users_dossier_recapitulatif_url(dossier_id: dossier.id)}") } it { expect(subject.subject).to eq("Votre dossier TPS N°#{dossier.id} a été validé") } end diff --git a/spec/views/backoffice/dossiers/show.html.html_spec.rb b/spec/views/backoffice/dossiers/show.html.html_spec.rb index 657baeb83..89ef91ff3 100644 --- a/spec/views/backoffice/dossiers/show.html.html_spec.rb +++ b/spec/views/backoffice/dossiers/show.html.html_spec.rb @@ -59,9 +59,9 @@ describe 'backoffice/dossiers/show.html.haml', type: :view do it { expect(rendered).to have_content('Nouveau') } - it 'button Valider le dossier is present' do - expect(rendered).to have_css('#action_button') - expect(rendered).to have_content('Valider le dossier') + it 'button Déclarer complet is present' do + expect(rendered).to have_css('.action_button') + expect(rendered).to have_content('Déclarer complet') end end @@ -74,9 +74,9 @@ describe 'backoffice/dossiers/show.html.haml', type: :view do it { expect(rendered).to have_content('Répondu') } - it 'button Valider le dossier is present' do - expect(rendered).to have_css('#action_button') - expect(rendered).to have_content('Valider le dossier') + it 'button Déclarer complet is present' do + expect(rendered).to have_css('.action_button') + expect(rendered).to have_content('Déclarer complet') end end @@ -89,9 +89,9 @@ describe 'backoffice/dossiers/show.html.haml', type: :view do it { expect(rendered).to have_content('Mis à jour') } - it 'button Valider le dossier is present' do - expect(rendered).to have_css('#action_button') - expect(rendered).to have_content('Valider le dossier') + it 'button Déclarer complet is present' do + expect(rendered).to have_css('.action_button') + expect(rendered).to have_content('Déclarer complet') end end @@ -104,9 +104,9 @@ describe 'backoffice/dossiers/show.html.haml', type: :view do it { expect(rendered).to have_content('Figé') } - it 'button Valider le dossier is not present' do - expect(rendered).not_to have_css('#action_button') - expect(rendered).not_to have_content('Valider le dossier') + it 'button Déclarer complet is not present' do + expect(rendered).not_to have_css('.action_button') + expect(rendered).not_to have_content('Déclarer complet') end end @@ -120,11 +120,11 @@ describe 'backoffice/dossiers/show.html.haml', type: :view do it { expect(rendered).to have_content('Déposé') } it 'button notifier de la bonne réception is present' do - expect(rendered).to have_css('#action_button') + expect(rendered).to have_css('.action_button') expect(rendered).to have_content('Notifier de la bonne réception') end - it 'button Valider le dossier is not present' do + it 'button Déclarer complet is not present' do expect(rendered).not_to have_content('Accepter le dossier') end end @@ -170,7 +170,7 @@ describe 'backoffice/dossiers/show.html.haml', type: :view do it { expect(rendered).to have_content('Sans suite') } - it 'button Valider le dossier is not present' do + it 'button Déclarer complet is not present' do expect(rendered).not_to have_css('.action_button[data-toggle="tooltip"][title="Accepter"]') expect(rendered).not_to have_css('.action_button[data-toggle="tooltip"][title="Classer sans suite"]') expect(rendered).not_to have_css('.action_button[data-toggle="tooltip"][title="Refuser"]') @@ -186,7 +186,7 @@ describe 'backoffice/dossiers/show.html.haml', type: :view do it { expect(rendered).to have_content('Refusé') } - it 'button Valider le dossier is not present' do + it 'button Déclarer complet is not present' do expect(rendered).not_to have_css('.action_button[data-toggle="tooltip"][title="Accepter"]') expect(rendered).not_to have_css('.action_button[data-toggle="tooltip"][title="Classer sans suite"]') expect(rendered).not_to have_css('.action_button[data-toggle="tooltip"][title="Refuser"]')