Commit 7fea5e9f authored by Dan Davison's avatar Dan Davison

Merge branch 'qa-shl-fix-group-saml-flakiness' into 'master'

Add wait between retries of SSO settings

Closes #55242

See merge request gitlab-org/gitlab!22360
parents 393ef373 131c3296
......@@ -31,28 +31,28 @@ module QA
end
def enforce_sso
Support::Retrier.retry_until do
Support::Retrier.retry_until(sleep_interval: 1.0, exit_on_failure: true) do
click_element :enforced_sso_toggle_button unless find_element(:enforced_sso_toggle_button)[:class].include?('is-checked')
find_element(:enforced_sso_toggle_button)[:class].include?('is-checked')
end
end
def disable_enforce_sso
Support::Retrier.retry_until do
Support::Retrier.retry_until(sleep_interval: 1.0, exit_on_failure: true) do
click_element :enforced_sso_toggle_button if find_element(:enforced_sso_toggle_button)[:class].include?('is-checked')
!find_element(:enforced_sso_toggle_button)[:class].include?('is-checked')
end
end
def enable_group_managed_accounts
Support::Retrier.retry_until do
Support::Retrier.retry_until(sleep_interval: 1.0, exit_on_failure: true) do
click_element :group_managed_accounts_toggle_button unless find_element(:group_managed_accounts_toggle_button)[:class].include?('is-checked')
find_element(:group_managed_accounts_toggle_button)[:class].include?('is-checked')
end
end
def disable_group_managed_accounts
Support::Retrier.retry_until do
Support::Retrier.retry_until(sleep_interval: 1.0, exit_on_failure: true) do
click_element :group_managed_accounts_toggle_button if find_element(:group_managed_accounts_toggle_button)[:class].include?('is-checked')
!find_element(:group_managed_accounts_toggle_button)[:class].include?('is-checked')
end
......
......@@ -320,6 +320,8 @@ module QA
end
def remove_user_if_exists(username_or_email)
QA::Runtime::Logger.debug("Removing user \"#{username_or_email}\" via API")
response = parse_body(get Runtime::API::Request.new(@api_client, "/users?search=#{username_or_email}").url)
delete Runtime::API::Request.new(@api_client, "/users/#{response.first[:id]}").url if response.any?
......
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