Merge pull request #10656 from colinux/fix-when-removing-all-displayed-fields
ETQ instructeur, pas d'erreur quand on veut enlever la dernière colonne affichée dans le tableau
This commit is contained in:
commit
12c11c563f
2 changed files with 8 additions and 1 deletions
|
@ -134,7 +134,8 @@ module Instructeurs
|
|||
end
|
||||
|
||||
def update_displayed_fields
|
||||
values = params['values'].presence || []
|
||||
values = (params['values'].presence || []).reject(&:empty?)
|
||||
|
||||
procedure_presentation.update_displayed_fields(values)
|
||||
|
||||
redirect_back(fallback_location: instructeur_procedure_url(procedure))
|
||||
|
|
|
@ -60,6 +60,12 @@ describe "procedure filters" do
|
|||
expect(page).not_to have_link(type_de_champ.libelle)
|
||||
expect(page).not_to have_link(champ.value)
|
||||
end
|
||||
|
||||
# Test removal of all customizable fields
|
||||
remove_column("Demandeur")
|
||||
within ".dossiers-table" do
|
||||
expect(page).not_to have_link("Demandeur")
|
||||
end
|
||||
end
|
||||
|
||||
scenario "should be able to add and remove filter", js: true do
|
||||
|
|
Loading…
Reference in a new issue