Commit 83314b1f authored by Sanad Liaquat's avatar Sanad Liaquat

Merge branch 'qa-shl-fix-protected-tags-spec-flakiness' into 'master'

Fix StaleElementReferenceError and ensure `add_member` success

Closes #231516, #232485, and #232500

See merge request gitlab-org/gitlab!37957
parents 8f37b22a e79cb1f4
......@@ -8,9 +8,12 @@ module QA
#
module Members
def add_member(user, access_level = AccessLevel::DEVELOPER)
Support::Retrier.retry_until do
QA::Runtime::Logger.debug(%Q[Adding user #{user.username} to #{full_path} #{self.class.name}])
post Runtime::API::Request.new(api_client, api_members_path).url, { user_id: user.id, access_level: access_level }
response = post Runtime::API::Request.new(api_client, api_members_path).url, { user_id: user.id, access_level: access_level }
response.code == QA::Support::Api::HTTP_STATUS_CREATED
end
end
def remove_member(user)
......
......@@ -27,8 +27,11 @@ module QA
# The number of selectors should be able to be reduced after
# migration to the new spinner is complete.
# https://gitlab.com/groups/gitlab-org/-/epics/956
# retry_on_exception added here due to `StaleElementReferenceError`. See: https://gitlab.com/gitlab-org/gitlab/-/issues/232485
Support::Retrier.retry_on_exception do
Capybara.page.has_no_css?('.gl-spinner, .fa-spinner, .spinner', wait: wait)
end
end
end
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