-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix #963] Add a "personnes impliquées" tab
- Loading branch information
1 parent
407a788
commit d75a387
Showing
7 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.personnes-impliquees { | ||
padding-bottom: 50px; | ||
|
||
ul { | ||
list-style-type: disc; | ||
margin-left: 16px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
app/views/new_gestionnaire/dossiers/_personnes_impliquees_block.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.accompagnateur-title= title | ||
|
||
- if emails_collection.present? | ||
%ul | ||
- emails_collection.each do |email| | ||
%li | ||
- else | ||
= blank |
10 changes: 10 additions & 0 deletions
10
app/views/new_gestionnaire/dossiers/personnes_impliquees.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
- content_for(:title, "Personnes impliquées · Dossier nº #{@dossier.id} (#{@dossier.owner_name})") | ||
|
||
= render partial: "header", locals: { dossier: @dossier } | ||
|
||
.personnes-impliquees.container | ||
= render partial: 'new_gestionnaire/dossiers/personnes_impliquees_block', locals: { emails_collection: @following_accompagnateurs_emails, title: "Accompagnateurs qui suivent le dossier", blank: "Aucun accompagnateur ne suit ce dossier" } | ||
|
||
= render partial: 'new_gestionnaire/dossiers/personnes_impliquees_block', locals: { emails_collection: @avis_emails, title: "Personnes à qui un avis a été demandé", blank: "Aucun avis n'a été demandé" } | ||
|
||
= render partial: 'new_gestionnaire/dossiers/personnes_impliquees_block', locals: { emails_collection: @invites_emails, title: "Personnes invitées à consulter ce dossier", blank: "Aucune personne n'a été invitée à consulter ce dossier" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,6 +112,29 @@ | |
expect(page).to have_text('a great answer') | ||
end | ||
|
||
scenario 'A gestionnaire can see the personnes impliquées' do | ||
gestionnaire2 = FactoryGirl.create(:gestionnaire, password: password) | ||
|
||
log_in(gestionnaire.email, password) | ||
|
||
click_on 'nouvelle interface' | ||
click_on procedure.libelle | ||
click_on dossier.user.email | ||
|
||
click_on 'Avis externes' | ||
expect(page).to have_current_path(avis_dossier_path(procedure, dossier)) | ||
|
||
expert_email = '[email protected]' | ||
ask_confidential_avis(expert_email, 'a good introduction') | ||
|
||
expert_email = gestionnaire2.email | ||
ask_confidential_avis(expert_email, 'a good introduction') | ||
|
||
click_on 'Personnes impliquées' | ||
expect(page).to have_text(expert_email) | ||
expect(page).to have_text(gestionnaire2.email) | ||
end | ||
|
||
def log_in(email, password) | ||
visit '/' | ||
click_on 'Connexion' | ||
|