Commit 9cd5555e authored by Sanad Liaquat's avatar Sanad Liaquat Committed by Ramya Authappan

E2E: Search member before performing the next action

parent e865eea7
......@@ -151,6 +151,7 @@ export default {
:search-input-placeholder="filteredSearchBar.placeholder"
:initial-filter-value="initialFilterValue"
data-testid="members-filtered-search-bar"
data-qa-selector="members_filtered_search_bar_content"
@onFilter="handleFilter"
/>
</template>
# frozen_string_literal: true
module QA
module Page
module Component
module MembersFilter
extend QA::Page::PageConcern
def self.included(base)
super
base.view 'app/assets/javascripts/members/components/filter_sort/members_filtered_search_bar.vue' do
element :members_filtered_search_bar_content
end
end
def search_member(username)
# TODO: Update the two actions below to use direct qa selectors once this is implemented:
# https://gitlab.com/gitlab-org/gitlab-ui/-/issues/1688
find_element(:members_filtered_search_bar_content).find('input').set(username)
find('.gl-search-box-by-click-search-button').click
end
end
end
end
end
......@@ -6,6 +6,7 @@ module QA
class Members < Page::Base
include Page::Component::InviteMembersModal
include Page::Component::UsersSelect
include Page::Component::MembersFilter
view 'app/assets/javascripts/members/components/modals/remove_member_modal.vue' do
element :remove_member_modal_content
......@@ -31,6 +32,8 @@ module QA
end
def update_access_level(username, access_level)
search_member(username)
within_element(:member_row, text: username) do
click_element :access_level_dropdown
click_element :access_level_link, text: access_level
......
......@@ -5,6 +5,7 @@ module QA
module Project
class Members < Page::Base
include QA::Page::Component::InviteMembersModal
include QA::Page::Component::MembersFilter
view 'app/assets/javascripts/members/components/members_tabs.vue' do
element :groups_list_tab
......
# frozen_string_literal: true
module QA
RSpec.describe 'Manage', :requires_admin, quarantine: {
issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/350598',
type: :needs_update,
only: { subdomain: :staging }
} do
RSpec.describe 'Manage', :requires_admin do
describe 'Add project member' do
before do
Runtime::Feature.enable(:invite_members_group_modal)
......@@ -25,7 +21,7 @@ module QA
Page::Project::Menu.perform(&:click_members)
Page::Project::Members.perform do |members|
members.add_member(user.username)
members.search_member(user.username)
expect(members).to have_content("@#{user.username}")
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