debian-mirror-gitlab/spec/features/groups/members/search_members_spec.rb

32 lines
726 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2018-03-27 19:54:05 +05:30
require 'spec_helper'
2020-06-23 00:09:42 +05:30
RSpec.describe 'Search group member' do
2018-03-27 19:54:05 +05:30
let(:user) { create :user }
let(:member) { create :user }
let!(:guest_group) do
create(:group) do |group|
group.add_guest(user)
group.add_guest(member)
end
end
before do
sign_in(user)
visit group_group_members_path(guest_group)
end
it 'renders member users' do
2019-10-12 21:52:04 +05:30
page.within '.user-search-form' do
2018-03-27 19:54:05 +05:30
fill_in 'search', with: member.name
2019-10-12 21:52:04 +05:30
find('.user-search-btn').click
2018-03-27 19:54:05 +05:30
end
2020-03-13 15:44:24 +05:30
group_members_list = find('[data-qa-selector="members_list"]')
2018-03-27 19:54:05 +05:30
expect(group_members_list).to have_content(member.name)
expect(group_members_list).not_to have_content(user.name)
end
end