Sha256: d11d62f29120417d05957593fac404fc3673112b3b00568908934a123bf28f55

Contents?: true

Size: 780 Bytes

Versions: 8

Compression:

Stored size: 780 Bytes

Contents

require 'ops_manager_ui_drivers/wait_helper'

module OpsManagerUiDrivers
  module Version17
    class AvailableProducts
      include WaitHelper

      def initialize(browser:)
        @browser = browser
      end

      def add_product_to_install(product_name)
        browser.visit '/'
        poll_up_to_times 3 do
          browser.click_on "add-#{product_name}"
          browser.find("#show-#{product_name.dasherize}-configure-action")
        end
      end

      def product_added?(product_name)
        browser.visit '/'
        browser.all("#show-#{product_name.dasherize}-configure-action").any?
      end

      private

      attr_reader :browser

      def dasherized_product_name(product_name)
        product_name.to_s.gsub(/[_]/, '-')
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ops_manager_ui_drivers-2.6.0 lib/ops_manager_ui_drivers/version17/available_products.rb
ops_manager_ui_drivers-2.5.2 lib/ops_manager_ui_drivers/version17/available_products.rb
ops_manager_ui_drivers-2.5.1 lib/ops_manager_ui_drivers/version17/available_products.rb
ops_manager_ui_drivers-2.5.0 lib/ops_manager_ui_drivers/version17/available_products.rb
ops_manager_ui_drivers-2.4.2 lib/ops_manager_ui_drivers/version17/available_products.rb
ops_manager_ui_drivers-2.4.1 lib/ops_manager_ui_drivers/version17/available_products.rb
ops_manager_ui_drivers-2.4.0 lib/ops_manager_ui_drivers/version17/available_products.rb
ops_manager_ui_drivers-2.3.2 lib/ops_manager_ui_drivers/version17/available_products.rb