diff options
author | Phil Hughes <me@iamphill.com> | 2017-05-08 12:42:42 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-05-08 12:42:44 +0100 |
commit | d891e5f731562fd46948116a4cef30f61748f410 (patch) | |
tree | cddaff28d8a8203ed6a27da31051c257b9416a5d /spec/features/search_spec.rb | |
parent | 59c9ec5ce6ef5a59fe989a06f0b8fa94aaba31d7 (diff) | |
download | gitlab-ce-d891e5f731562fd46948116a4cef30f61748f410.tar.gz |
Filter projects by group on search pagesearch-restrict-projects-to-group
After selecting a group, the projects dropdown will now filter by group projects instead
Closes #29489
Diffstat (limited to 'spec/features/search_spec.rb')
-rw-r--r-- | spec/features/search_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/features/search_spec.rb b/spec/features/search_spec.rb index 498a4a5cba0..f2866d071dc 100644 --- a/spec/features/search_spec.rb +++ b/spec/features/search_spec.rb @@ -20,6 +20,7 @@ describe "Search", feature: true do context 'search filters', js: true do let(:group) { create(:group) } + let!(:group_project) { create(:empty_project, group: group) } before do group.add_owner(user) @@ -36,6 +37,24 @@ describe "Search", feature: true do expect(find('.js-search-group-dropdown')).to have_content(group.name) end + it 'filters by group projects after filtering by group' do + find('.js-search-group-dropdown').click + wait_for_ajax + + page.within '.search-holder' do + click_link group.name + end + + expect(find('.js-search-group-dropdown')).to have_content(group.name) + + page.within('.project-filter') do + find('.js-search-project-dropdown').click + wait_for_ajax + + expect(page).to have_link(group_project.name_with_namespace) + end + end + it 'shows project name after filtering' do page.within('.project-filter') do find('.js-search-project-dropdown').click |