Sha256: 19063c4749d5dc41a891e760737e0a9c620e2465ba71a83134fc4b3d3f37a9fe

Contents?: true

Size: 734 Bytes

Versions: 1

Compression:

Stored size: 734 Bytes

Contents

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

1 entries across 1 versions & 1 rubygems

Version Path
ops_manager_ui_drivers-2.3.1 lib/ops_manager_ui_drivers/version17/available_products.rb