Skip to content

Commit 0852fc0

Browse files
committed
test(personnalisation): cover champ values displayed on dossier cards
1 parent 9b03b55 commit 0852fc0

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

spec/system/users/dossiers_personnalisation_spec.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,20 @@
1616
login_as user, scope: :user
1717
end
1818

19+
it 'shows the chosen champ values on the dossier cards' do
20+
perso_procedure = create(:procedure, :published, types_de_champ_public: [{ type: :text, libelle: 'Titre de la publication' }])
21+
column = perso_procedure.personnalisable_columns.first
22+
create(:dossiers_list_personnalisation, user:, procedure: perso_procedure, displayed_columns: [column])
23+
dossiers = create_list(:dossier, 6, :en_construction, user:, procedure: perso_procedure, populate_champs: true)
24+
champ = dossiers.first.champs.find { _1.stable_id == column.stable_id }
25+
champ.update(value: 'Presse Océan')
26+
27+
visit dossiers_path
28+
29+
expect(page).to have_css('.fr-icon-info-i')
30+
expect(page).to have_text('Presse Océan')
31+
end
32+
1933
it 'lets the user pick fields and persists the personnalisation' do
2034
visit dossiers_path
2135

0 commit comments

Comments
 (0)