class OpsManagerUiDrivers::Version17::UserSettings

Attributes

browser[R]

Public Class Methods

new(browser:) click to toggle source
# File lib/ops_manager_ui_drivers/version17/user_settings.rb, line 4
def initialize(browser:)
  @browser = browser
end

Public Instance Methods

switch_to_internal_authentication(user: , password:, decryption_passphrase:) click to toggle source
# File lib/ops_manager_ui_drivers/version17/user_settings.rb, line 8
def switch_to_internal_authentication(user: , password:, decryption_passphrase:)
  browser.visit '/settings/edit'
  browser.fill_in 'change_auth_service[admin_user_name]', with: user
  browser.fill_in 'change_auth_service[admin_password]', with: password
  browser.fill_in 'change_auth_service[admin_password_confirmation]', with: password
  browser.fill_in 'change_auth_service[decryption_passphrase]', with: decryption_passphrase
  browser.click_on 'update-auth-service-action'
  wait_for_availability!
end
switch_to_saml_authentication(idp_metadata:, decryption_passphrase:) click to toggle source
# File lib/ops_manager_ui_drivers/version17/user_settings.rb, line 18
def switch_to_saml_authentication(idp_metadata:, decryption_passphrase:)
  browser.visit '/settings/edit'
  browser.fill_in 'change_auth_service[saml_idp_metadata]', with: idp_metadata
  browser.fill_in 'change_auth_service[decryption_passphrase]', with: decryption_passphrase
  browser.click_on 'update-auth-service-action'
  wait_for_availability!
end
wait_for_availability!() click to toggle source
# File lib/ops_manager_ui_drivers/version17/user_settings.rb, line 26
def wait_for_availability!
  Timeout.timeout(150) do
    while browser.current_path.include?('ensure_availability')
      sleep 1
    end
  end
end