Class: OpsManagerUiDrivers::Version17::ProductDashboard

Inherits:
OpsManagerUiDrivers::Version16::ProductDashboard show all
Includes:
AnimationHelper
Defined in:
lib/ops_manager_ui_drivers/version17/product_dashboard.rb

Instance Method Summary collapse

Methods included from AnimationHelper

#disable_css_transitions!

Methods inherited from OpsManagerUiDrivers::Version16::ProductDashboard

#upgrade_microbosh

Methods inherited from OpsManagerUiDrivers::Version15::ProductDashboard

#product_complete?, #product_on_dashboard?

Methods inherited from OpsManagerUiDrivers::Version14::ProductDashboard

#delete_installation_available?, #delete_whole_installation, #deletion_in_progress?, #import_product_from, #initialize, #product_configuration_percentage, #reset_state, #revert_available?, #revert_pending_changes, #upgrade_microbosh, #upgrade_product, #version_for_product, #wait_for_installation_to_be_deleted

Constructor Details

This class inherits a constructor from OpsManagerUiDrivers::Version14::ProductDashboard

Instance Method Details

#apply_updates(validate: true, errands: {}) ⇒ Object



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/ops_manager_ui_drivers/version17/product_dashboard.rb', line 35

def apply_updates(validate: true, errands: {})
  open_dashboard
  check_errands(errands)

  browser.click_on 'install-action'
  if validate
    fail 'Install failed verification' if nonignorable_verification_failed?
    allow_cpu_verification_errors
    allow_privilege_verification_errors
    allow_icmp_verification_errors #this is only for AWS; consider moving out

    ignore_allowable_errors
    assert_installation_started
  end

  ApplyUpdatesResult.new(browser: @browser)
end

#delete_product(product_name) ⇒ Object



18
19
20
21
22
23
# File 'lib/ops_manager_ui_drivers/version17/product_dashboard.rb', line 18

def delete_product(product_name)
  open_dashboard
  disable_css_transitions!
  browser.click_on "open-delete-#{product_name}-modal"
  browser.click_on "delete-#{product_name}-action"
end

#delete_unused_productsObject



25
26
27
28
# File 'lib/ops_manager_ui_drivers/version17/product_dashboard.rb', line 25

def delete_unused_products
  open_dashboard
  @browser.find('a#delete_unused_products').trigger('click')
end

#deleted_product?(product_name) ⇒ Boolean

Returns:

  • (Boolean)


30
31
32
33
# File 'lib/ops_manager_ui_drivers/version17/product_dashboard.rb', line 30

def deleted_product?(product_name)
  open_dashboard
  browser.first("#show-#{product_name}-information-action").present?
end

#enabled_errands(product_name) ⇒ Object



53
54
55
56
57
58
59
# File 'lib/ops_manager_ui_drivers/version17/product_dashboard.rb', line 53

def enabled_errands(product_name)
  open_dashboard
  browser.execute_script "$('li.expandable > a.title').click()"
  browser.all("input[type='checkbox'][name^='enabled_errands[#{product_name}-'][checked='checked']").map do |checkbox|
    checkbox.value
  end
end

#import_installation_file(_file_path) ⇒ Object



9
10
11
# File 'lib/ops_manager_ui_drivers/version17/product_dashboard.rb', line 9

def import_installation_file(_file_path)
  fail('Importing is no longer supported via the Product Dashboard. See Version17::Setup#import_installation_file')
end

#most_recent_install_logObject



61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/ops_manager_ui_drivers/version17/product_dashboard.rb', line 61

def most_recent_install_log
  browser.visit '/change_log'
  sleep 4
  first_log_entry = browser.first('table#change-log tbody tr td a')
  if first_log_entry
    base_url = first_log_entry[:href]
    browser.visit "#{base_url}.text"
    browser.source
  else
    return nil
  end
end

#product_available?(product_name, product_version) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
16
# File 'lib/ops_manager_ui_drivers/version17/product_dashboard.rb', line 13

def product_available?(product_name, product_version)
  open_dashboard
  browser.all("li.#{product_name} input#product_version[value='#{product_version}']", {visible: false}).any?
end