Sha256: de83b8e1ceda09585c7c7bdcb7775da4b5d7109040c264701ad6aa15cc4474f9

Contents?: true

Size: 1.78 KB

Versions: 11

Compression:

Stored size: 1.78 KB

Contents

require 'ops_manager_ui_drivers/wait_helper'

module OpsManagerUiDrivers
  module PageHelpers
    include OpsManagerUiDrivers::WaitHelper

    def om_1_4(ops_manager_url, browser = self)
      @om_1_4 ||= create_web_ui(
        ops_manager_url: ops_manager_url,
        browser: browser,
        version_module: Version14,
      )
    end

    def om_1_5(ops_manager_url, browser = self)
      @om_1_5 ||= create_web_ui(
        ops_manager_url: ops_manager_url,
        browser: browser,
        version_module: Version15,
      )
    end

    def om_1_6(ops_manager_url, browser = self)
      @om_1_6 ||= create_web_ui(
        ops_manager_url: ops_manager_url,
        browser: browser,
        version_module: Version16,
      )
    end

    def om_1_7(ops_manager_url, browser = self)
      @om_1_7 ||= create_web_ui(
        ops_manager_url: ops_manager_url,
        browser: browser,
        version_module: Version17,
      )
    end

    def api_1_4(host:, username:, password:)
      Version14::Api.new(host_uri: host, username: username, password: password)
    end

    def api_1_5(host:, username:, password:)
      Version15::Api.new(host_uri: host, username: username, password: password)
    end

    def api_1_6(host:, username:, password:)
      Version16::Api.new(host_uri: host, username: username, password: password)
    end

    def api_1_7(host:, username:, password:)
      Version17::Api.new(host_uri: host, username: username, password: password)
    end

    alias_method :om_rc, :om_1_7
    alias_method :api_rc, :api_1_7

    private

    def create_web_ui(ops_manager_url:, browser:, version_module:)
      Capybara.app_host = ops_manager_url
      Logger.debug "Creating Ops Manager UI Driver for #{version_module.inspect}"
      version_module::WebUi.new(browser: browser)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ops_manager_ui_drivers-1.28.1 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.28.0 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.27.0 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.26.1 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.26.0 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.25.1 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.25.0 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.24.4 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.24.3 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.24.2 lib/ops_manager_ui_drivers/page_helpers.rb
ops_manager_ui_drivers-1.24.1 lib/ops_manager_ui_drivers/page_helpers.rb