Skip to content
Snippets Groups Projects
Commit fb5a34ad authored by Valerie Burton's avatar Valerie Burton :two:
Browse files

Update invite_group_to_project_spec to run in jobs outside nightly

parent 8b1b556f
No related branches found
No related tags found
1 merge request!91071Refactor invite_group_to_project_spec to Run in More Jobs Outside Nightly
......@@ -62,12 +62,14 @@ def invite_group(group_name, access_level = 'Guest')
Support::Waiter.wait_until { has_element?(:group_select_dropdown_item) }
# Helps stabilize race condition with concurrent group API calls while searching
# TODO: Replace with `fill_element :group_select_dropdown_search_field, group_name` when this bug is resolved: https://gitlab.com/gitlab-org/gitlab/-/issues/349379
send_keys_to_element(:group_select_dropdown_search_field, group_name)
# Workaround for race condition with concurrent group API calls while searching
# Remove Retrier after https://gitlab.com/gitlab-org/gitlab/-/issues/349379 is resolved
Support::Retrier.retry_on_exception do
fill_element :group_select_dropdown_search_field, group_name
Support::WaitForRequests.wait_for_requests
click_button group_name
end
Support::WaitForRequests.wait_for_requests
click_button group_name
set_access_level(access_level)
end
......
# frozen_string_literal: true
module QA
# Tagging with issue for a transient invite group modal search bug, but does not require quarantine at this time
RSpec.describe 'Manage', :transient, issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/349379' do
RSpec.describe 'Manage' do
describe 'Invite group' do
shared_examples 'invites group to project' do
it 'verifies group is added and members can access project with correct access level' do
......@@ -13,7 +12,7 @@ module QA
expect(project_members).to have_group(group.path)
end
Flow::Login.sign_in(as: @user)
Flow::Login.sign_in(as: user)
Page::Dashboard::Projects.perform do |projects|
projects.filter_by_name(project.name)
......@@ -29,13 +28,11 @@ module QA
end
end
before(:context) do
@user = Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1)
end
let(:user) { Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1) }
before do
Flow::Login.sign_in
group.add_member(@user, Resource::Members::AccessLevel::MAINTAINER)
group.add_member(user, Resource::Members::AccessLevel::MAINTAINER)
project.visit!
end
......@@ -75,11 +72,6 @@ module QA
it_behaves_like 'invites group to project'
end
after do
project&.remove_via_api!
group&.remove_via_api!
end
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment