Class: OpsManagerUiDrivers::Version17::UserSettings
- Inherits:
-
Object
- Object
- OpsManagerUiDrivers::Version17::UserSettings
- Defined in:
- lib/ops_manager_ui_drivers/version17/user_settings.rb
Instance Method Summary collapse
-
#initialize(browser:) ⇒ UserSettings
constructor
A new instance of UserSettings.
- #switch_to_internal_authentication(user:, password:, decryption_passphrase:) ⇒ Object
- #switch_to_saml_authentication(idp_metadata:, decryption_passphrase:) ⇒ Object
- #wait_for_availability! ⇒ Object
Constructor Details
#initialize(browser:) ⇒ UserSettings
Returns a new instance of UserSettings.
5 6 7 |
# File 'lib/ops_manager_ui_drivers/version17/user_settings.rb', line 5 def initialize(browser:) @browser = browser end |
Instance Method Details
#switch_to_internal_authentication(user:, password:, decryption_passphrase:) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/ops_manager_ui_drivers/version17/user_settings.rb', line 9 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:) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/ops_manager_ui_drivers/version17/user_settings.rb', line 19 def switch_to_saml_authentication(idp_metadata:, decryption_passphrase:) browser.visit '/settings/edit' browser.fill_in 'change_auth_service[saml_idp_metadata]', with: 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! ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/ops_manager_ui_drivers/version17/user_settings.rb', line 27 def wait_for_availability! Timeout.timeout(150) do while browser.current_path.include?('ensure_availability') sleep 1 end end end |