Commit 8c30e069 authored by Walmyr Lima e Silva Filho's avatar Walmyr Lima e Silva Filho

Merge branch 'qa-shl-fix-group-saml-sso-quarantine' into 'master'

Fix issue with unstable UI state when disabling SSO features

See merge request gitlab-org/gitlab!22751
parents 5c25fa80 9eaffcbd
......@@ -37,6 +37,10 @@ module QA
end
end
def has_enforce_sso_button?
has_element?(:enforced_sso_toggle_button, wait: 1.0)
end
def disable_enforce_sso
Support::Retrier.retry_until(sleep_interval: 1.0, raise_on_failure: true) do
click_element :enforced_sso_toggle_button if find_element(:enforced_sso_toggle_button)[:class].include?('is-checked')
......@@ -44,6 +48,10 @@ module QA
end
end
def has_group_managed_accounts_button?
has_element?(:group_managed_accounts_toggle_button, wait: 1.0)
end
def enable_group_managed_accounts
Support::Retrier.retry_until(sleep_interval: 1.0, raise_on_failure: true) do
click_element :group_managed_accounts_toggle_button unless find_element(:group_managed_accounts_toggle_button)[:class].include?('is-checked')
......
......@@ -348,7 +348,8 @@ module QA
end
def disable_enforce_sso_and_group_managed_account
Runtime::Logger.info('Disabling enforce sso and group managed account')
if Runtime::Feature.enabled?('enforced_sso') || Runtime::Feature.enabled?('group_managed_accounts')
Runtime::Logger.info('Disabling enforce sso and/or group managed account')
page.visit Runtime::Scenario.gitlab_address
......@@ -362,11 +363,11 @@ module QA
Page::Group::Menu.perform(&:go_to_saml_sso_group_settings)
EE::Page::Group::Settings::SamlSSO.perform do |saml_sso|
saml_sso.disable_enforce_sso if Runtime::Feature.enabled?('enforced_sso')
saml_sso.disable_group_managed_accounts if Runtime::Feature.enabled?('group_managed_accounts')
saml_sso.disable_enforce_sso if saml_sso.has_enforce_sso_button?
saml_sso.disable_group_managed_accounts if saml_sso.has_group_managed_accounts_button?
saml_sso.click_save_changes
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