class OpsManagerUiDrivers::Version15::StateChangeProgress
Attributes
browser[R]
Public Class Methods
new(browser:)
click to toggle source
# File lib/ops_manager_ui_drivers/version15/state_change_progress.rb, line 4 def initialize(browser:) @browser = browser end
Public Instance Methods
errand_ran?(errand_name)
click to toggle source
# File lib/ops_manager_ui_drivers/version15/state_change_progress.rb, line 13 def errand_ran?(errand_name) open_install_progress browser.find('#install-output .output', visible: false).text(:all). include?("Errand `#{errand_name}' completed successfully (exit code 0)") end
errand_ran_with_text?(errand_name)
click to toggle source
# File lib/ops_manager_ui_drivers/version15/state_change_progress.rb, line 19 def errand_ran_with_text?(errand_name) { errand_ran: errand_ran?(errand_name), output: browser.find('#install-output .output', {visible: false}).text(:all), } end
state_change_success?()
click to toggle source
# File lib/ops_manager_ui_drivers/version15/state_change_progress.rb, line 8 def state_change_success? open_install_progress browser.all('#install-success-modal').any? end
Private Instance Methods
install_progress_open?()
click to toggle source
# File lib/ops_manager_ui_drivers/version15/state_change_progress.rb, line 36 def install_progress_open? browser.current_path =~ %r(^/+install) end
open_install_progress()
click to toggle source
# File lib/ops_manager_ui_drivers/version15/state_change_progress.rb, line 30 def open_install_progress browser.visit '/install' unless install_progress_open? browser.fail_early('Install probably aborted immediately') unless install_progress_open? browser.fail_early('Install failed') if browser.all('#install-failure-modal').any? end