diff options
Diffstat (limited to 'spec/features/groups/merge_requests_spec.rb')
-rw-r--r-- | spec/features/groups/merge_requests_spec.rb | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/spec/features/groups/merge_requests_spec.rb b/spec/features/groups/merge_requests_spec.rb index b55078c3bf6..7ce6a61d50c 100644 --- a/spec/features/groups/merge_requests_spec.rb +++ b/spec/features/groups/merge_requests_spec.rb @@ -1,13 +1,15 @@ require 'spec_helper' -feature 'Group merge requests page', feature: true do +feature 'Group merge requests page' do + include FilteredSearchHelpers + let(:path) { merge_requests_group_path(group) } let(:issuable) { create(:merge_request, source_project: project, target_project: project, title: 'this is my created issuable') } include_examples 'project features apply to issuables', MergeRequest context 'archived issuable' do - let(:project_archived) { create(:project, :archived, :merge_requests_enabled, group: group) } + let(:project_archived) { create(:project, :archived, :merge_requests_enabled, :repository, group: group) } let(:issuable_archived) { create(:merge_request, source_project: project_archived, target_project: project_archived, title: 'issuable of an archived project') } let(:access_level) { ProjectFeature::ENABLED } let(:user) { user_in_group } @@ -23,7 +25,7 @@ feature 'Group merge requests page', feature: true do end it 'ignores archived merge request count badges in navbar' do - expect( page.find('[title="Merge Requests"] span.badge.count').text).to eq("1") + expect(first(:link, text: 'Merge Requests').find('.badge').text).to eq("1") end it 'ignores archived merge request count badges in state-filters' do @@ -33,4 +35,17 @@ feature 'Group merge requests page', feature: true do expect(page.find('#state-all span.badge').text).to eq("1") end end + + context 'group filtered search', :js do + let(:access_level) { ProjectFeature::ENABLED } + let(:user) { user_in_group } + let(:user2) { user_outside_group } + + it 'filters by assignee only group users' do + filtered_search.set('assignee:') + + expect(find('#js-dropdown-assignee .filter-dropdown')).to have_content(user.name) + expect(find('#js-dropdown-assignee .filter-dropdown')).not_to have_content(user2.name) + end + end end |