Fix issue with unstable UI state when disabling SSO features
What does this MR do?
Fixes issue with unstable UI state when disabling SSO features.
The disable_enforce_sso_and_group_managed_account
is a generic cleanup method that is called from after(:all)
block and it was using Runtime::Feature.enabled?
to check if an SSO feature should be disabled. But since Runtime::Feature.enabled?
uses the api_client
which requires a personal_access_token
, it would create one if not available which was the case due to quarantining of the test where the token was created. This caused the test to create a new personal access token leaving the UI in an expected state.
This MR simply replaces the checks to see if the buttons are available and moves the Runtime::Feature.enabled?
to the top of the disable_enforce_sso_and_group_managed_account
.
Related to #55242 (closed)