add tag to display and remove active filters

This commit is contained in:
Lisa Durand 2023-05-03 16:47:27 +02:00
parent 7aca10377c
commit 9fd9bdc7c0
5 changed files with 41 additions and 11 deletions

View file

@ -61,7 +61,7 @@ describe 'user access to the list of their dossiers', js: true do
expect(page).to have_text('4 en cours')
expect(page).to have_text('2 traités')
expect(page).to have_text('4 sur 4 dossiers')
click_on('Filtrer')
click_on('Sélectionner un filtre')
expect(page).to have_text('Brouillon')
expect(page).to have_text('En construction')
expect(page).to have_text('En instruction')
@ -77,7 +77,7 @@ describe 'user access to the list of their dossiers', js: true do
expect(page).to have_text('2 traités')
expect(page).to have_text('2 sur 2 dossiers')
click_on('Filtrer')
click_on('Sélectionner un filtre')
expect(page).to have_text('Accepté')
expect(page).to have_text('Refusé')
expect(page).to have_text('Classé sans suite')
@ -86,7 +86,7 @@ describe 'user access to the list of their dossiers', js: true do
expect(page).to have_text('1 dossier')
expect(page).to have_checked_field('Refusé')
click_on('Filtrer')
click_on('Sélectionner un filtre')
click_on('Réinitialiser les filtres')
expect(page).to have_text('2 sur 2 dossiers')
expect(page).to have_unchecked_field('Refusé')
@ -96,7 +96,7 @@ describe 'user access to the list of their dossiers', js: true do
dossier_en_construction.update!(created_at: Date.yesterday)
expect(page).to have_text('4 sur 4 dossiers')
click_on('Filtrer')
click_on('Sélectionner un filtre')
fill_in 'from_created_at_date', with: Date.today
click_on('Appliquer les filtres')
expect(page).to have_text('3 sur 3 dossiers')
@ -107,21 +107,27 @@ describe 'user access to the list of their dossiers', js: true do
dossier_en_instruction.update!(depose_at: Date.yesterday)
expect(page).to have_text('4 sur 4 dossiers')
click_on('Filtrer')
click_on('Sélectionner un filtre')
fill_in 'from_created_at_date', with: Date.today
click_on('Appliquer les filtres')
expect(page).to have_text('3 sur 3 dossiers')
expect(page).to have_text('1 filtre actif')
click_on('Filtrer')
click_on('Sélectionner un filtre')
find("label", text: "En construction").click
find("label", text: "En instruction").click
click_on('Appliquer les filtres')
expect(page).to have_text('2 sur 2 dossiers')
expect(page).to have_text('3 filtres actifs')
click_on('Filtrer')
click_on('Sélectionner un filtre')
fill_in 'from_depose_at_date', with: Date.today
click_on('Appliquer les filtres')
expect(page).to have_text('1 dossier')
expect(page).to have_text('4 filtres actifs')
click_on('4 filtres actifs')
expect(page).to have_text('4 sur 4 dossiers')
expect(page).not_to have_text('4 filtres actifs')
end
end