diff --git a/app/views/instructeurs/procedures/_dossiers_filter.html.haml b/app/views/instructeurs/procedures/_dossiers_filter.html.haml index 72e547ef5..0d6455f81 100644 --- a/app/views/instructeurs/procedures/_dossiers_filter.html.haml +++ b/app/views/instructeurs/procedures/_dossiers_filter.html.haml @@ -6,11 +6,10 @@ - current_filters.group_by { |filter| filter['table'] }.each_with_index do |(table, filters), i| - if i > 0 - et + = " et " - filters.each_with_index do |filter, i| - if i > 0 - ou - %span.filter - = link_to remove_filter_instructeur_procedure_path(procedure, { statut: statut, field: "#{filter['table']}/#{filter['column']}", value: filter['value'] }) do - %img.close-icon{ src: image_url("close.svg") } + = " ou " + = link_to remove_filter_instructeur_procedure_path(procedure, { statut: statut, field: "#{filter['table']}/#{filter['column']}", value: filter['value'] }), + class: "fr-tag fr-tag--dismiss fr-mb-1w", aria: { label: "Retirer le filtre #{filter['column']}" } do = "#{filter['label'].truncate(50)} : #{procedure_presentation.human_value_for_filter(filter)}" diff --git a/spec/system/instructeurs/procedure_filters_spec.rb b/spec/system/instructeurs/procedure_filters_spec.rb index 35bfd8c30..c4c1d09d8 100644 --- a/spec/system/instructeurs/procedure_filters_spec.rb +++ b/spec/system/instructeurs/procedure_filters_spec.rb @@ -126,7 +126,7 @@ describe "procedure filters" do end def remove_filter(filter_value) - find(:xpath, "(//span[contains(@class, 'filter')]/a[contains(@href, '#{CGI.escape(filter_value)}')])[1]").click + click_link text: filter_value end def add_filter(column_name, filter_value)