diff options
Diffstat (limited to 'spec/features/explore/groups_list_spec.rb')
-rw-r--r-- | spec/features/explore/groups_list_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/features/explore/groups_list_spec.rb b/spec/features/explore/groups_list_spec.rb index 2ab97a8928b..7b23115c527 100644 --- a/spec/features/explore/groups_list_spec.rb +++ b/spec/features/explore/groups_list_spec.rb @@ -30,4 +30,17 @@ RSpec.describe 'Explore Groups page', js: true, feature: true do expect(page).not_to have_content(public_group.full_name) expect(page).not_to have_content(private_group.full_name) end + + it 'resets search when user cleans the input' do + fill_in 'filter_groups', with: group.name + wait_for_ajax + + fill_in 'filter_groups', with: "" + wait_for_ajax + + expect(page).to have_content(group.full_name) + expect(page).to have_content(public_group.full_name) + expect(page).not_to have_content(private_group.full_name) + expect(page.all('.js-groups-list-holder .content-list li').length).to eq 2 + end end |