debian-mirror-gitlab/spec/support/shared_examples/features/issuables_user_dropdown_behaviors_shared_examples.rb
2020-04-08 14:13:33 +05:30

24 lines
689 B
Ruby

# frozen_string_literal: true
RSpec.shared_examples 'issuable user dropdown behaviors' do
include FilteredSearchHelpers
before do
issuable # ensure we have at least one issuable
sign_in(user_in_dropdown)
end
%w[author assignee].each do |dropdown|
describe "#{dropdown} dropdown", :js do
it 'only includes members of the project/group' do
visit issuables_path
filtered_search.set("#{dropdown}:=")
expect(find("#js-dropdown-#{dropdown} .filter-dropdown")).to have_content(user_in_dropdown.name)
expect(find("#js-dropdown-#{dropdown} .filter-dropdown")).not_to have_content(user_not_in_dropdown.name)
end
end
end
end