2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-27 19:54:05 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
2023-03-04 22:38:38 +05:30
|
|
|
RSpec.describe 'Search group member', :js, feature_category: :subgroups do
|
2023-06-20 00:43:36 +05:30
|
|
|
include Features::MembersHelpers
|
2021-01-29 00:20:46 +05:30
|
|
|
|
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
|
2021-02-22 17:27:13 +05:30
|
|
|
page.within '[data-testid="members-filtered-search-bar"]' do
|
|
|
|
find_field('Filter members').click
|
|
|
|
find('input').native.send_keys(member.name)
|
|
|
|
click_button 'Search'
|
2018-03-27 19:54:05 +05:30
|
|
|
end
|
|
|
|
|
2021-01-29 00:20:46 +05:30
|
|
|
expect(members_table).to have_content(member.name)
|
|
|
|
expect(members_table).not_to have_content(user.name)
|
2018-03-27 19:54:05 +05:30
|
|
|
end
|
|
|
|
end
|