Commit e19c560d authored by Hiroyuki Sato's avatar Hiroyuki Sato

Add a simple spec that checks filtered search works at group merge request page

parent 05147e20
require 'spec_helper' require 'spec_helper'
feature 'Group merge requests page' do feature 'Group merge requests page' do
include FilteredSearchHelpers
let(:path) { merge_requests_group_path(group) } let(:path) { merge_requests_group_path(group) }
let(:issuable) { create(:merge_request, source_project: project, target_project: project, title: 'this is my created issuable') } let(:issuable) { create(:merge_request, source_project: project, target_project: project, title: 'this is my created issuable') }
...@@ -33,4 +35,17 @@ feature 'Group merge requests page' do ...@@ -33,4 +35,17 @@ feature 'Group merge requests page' do
expect(page.find('#state-all span.badge').text).to eq("1") expect(page.find('#state-all span.badge').text).to eq("1")
end end
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 end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment