Sha256: 6622f36a792cb2182113ede141782ffa022fa71174a23d64c0c0e3efb7ea9d2a

Contents?: true

Size: 1.04 KB

Versions: 19

Compression:

Stored size: 1.04 KB

Contents

require 'ops_manager_ui_drivers/version17/state_change_progress'

module OpsManagerUiDrivers
  module Version18
    class StateChangeProgress < OpsManagerUiDrivers::Version17::StateChangeProgress
      def errand_ran?(errand_name)
        open_install_progress
        !!(/Errand '#{errand_name}' completed successfully \(exit code 0\)/ =~
          browser.find('#install-output .output', visible: false).text(:all))
      end

      def state_change_success?
        load_change_log
        content = browser.find('#change-log > tbody > tr:first-child')
        if content.text.include?('FAILED')
          browser.fail_early('Installation failed!')
        else
          content.text.include?('SUCCEEDED')
        end
      end

      private

      def load_change_log
        browser.visit '/change_log'
        browser.poll_up_to_mins(1) do
          content = browser.find('#change-log > tbody > tr:first-child')
          fail StandardError unless content
          fail StandardError if content.text.include?('Loading')
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
ops_manager_ui_drivers-2.42.0 lib/ops_manager_ui_drivers/version18/state_change_progress.rb
ops_manager_ui_drivers-2.41.0 lib/ops_manager_ui_drivers/version18/state_change_progress.rb
ops_manager_ui_drivers-2.40.1 lib/ops_manager_ui_drivers/version18/state_change_progress.rb
ops_manager_ui_drivers-2.40.0 lib/ops_manager_ui_drivers/version18/state_change_progress.rb
ops_manager_ui_drivers-2.39.0 lib/ops_manager_ui_drivers/version18/state_change_progress.rb
ops_manager_ui_drivers-2.38.0 lib/ops_manager_ui_drivers/version18/state_change_progress.rb
ops_manager_ui_drivers-2.37.0 lib/ops_manager_ui_drivers/version18/state_change_progress.rb
ops_manager_ui_drivers-2.36.0 lib/ops_manager_ui_drivers/version18/state_change_progress.rb
ops_manager_ui_drivers-2.35.2 lib/ops_manager_ui_drivers/version18/state_change_progress.rb
ops_manager_ui_drivers-2.35.1 lib/ops_manager_ui_drivers/version18/state_change_progress.rb
ops_manager_ui_drivers-2.35.0 lib/ops_manager_ui_drivers/version18/state_change_progress.rb
ops_manager_ui_drivers-2.34.1 lib/ops_manager_ui_drivers/version18/state_change_progress.rb
ops_manager_ui_drivers-2.34.0 lib/ops_manager_ui_drivers/version18/state_change_progress.rb
ops_manager_ui_drivers-2.33.1 lib/ops_manager_ui_drivers/version18/state_change_progress.rb
ops_manager_ui_drivers-2.33.0 lib/ops_manager_ui_drivers/version18/state_change_progress.rb
ops_manager_ui_drivers-2.32.1 lib/ops_manager_ui_drivers/version18/state_change_progress.rb
ops_manager_ui_drivers-2.32.0 lib/ops_manager_ui_drivers/version18/state_change_progress.rb
ops_manager_ui_drivers-2.31.3 lib/ops_manager_ui_drivers/version18/state_change_progress.rb
ops_manager_ui_drivers-2.31.2 lib/ops_manager_ui_drivers/version18/state_change_progress.rb