Sha256: e1abb6bb5245c018e213cc1e3ef6aa4e22a15b61b2634a78fdfc5b4298e62b31

Contents?: true

Size: 1.08 KB

Versions: 102

Compression:

Stored size: 1.08 KB

Contents

module OpsManagerUiDrivers
  module Version16
    class WebUi
      class ProductAvailabilityZones
        def initialize(browser:, product_name:)
          @browser      = browser
          @product_name = product_name
        end

        def assign_availability_zones(singleton_availability_zone:, availability_zones:)
          open_form
          browser.choose(singleton_availability_zone)
          # we don't change the assignments in clean install yet,
          # otherwise we'd want to clear them out first
          availability_zones.each do |az_name|
            browser.check(az_name)
          end
          save_form
        end

        private
        attr_reader :browser, :product_name

        def open_form
          browser.visit '/'
          browser.click_on "show-#{product_name}-configure-action"
          browser.click_on "show-#{product_name}-availability-zone-assignment-action"
        end

        def save_form
          browser.click_on 'Save'

          browser.expect(browser.page).to browser.have_css('.flash-message.success')
        end
      end
    end
  end
end

Version data entries

102 entries across 102 versions & 1 rubygems

Version Path
ops_manager_ui_drivers-2.5.0 lib/ops_manager_ui_drivers/version16/product_availability_zones.rb
ops_manager_ui_drivers-2.4.2 lib/ops_manager_ui_drivers/version16/product_availability_zones.rb
ops_manager_ui_drivers-2.4.1 lib/ops_manager_ui_drivers/version16/product_availability_zones.rb
ops_manager_ui_drivers-2.4.0 lib/ops_manager_ui_drivers/version16/product_availability_zones.rb
ops_manager_ui_drivers-2.3.2 lib/ops_manager_ui_drivers/version16/product_availability_zones.rb
ops_manager_ui_drivers-2.3.1 lib/ops_manager_ui_drivers/version16/product_availability_zones.rb
ops_manager_ui_drivers-2.3.0 lib/ops_manager_ui_drivers/version16/product_availability_zones.rb
ops_manager_ui_drivers-2.2.1 lib/ops_manager_ui_drivers/version16/product_availability_zones.rb
ops_manager_ui_drivers-2.2.0 lib/ops_manager_ui_drivers/version16/product_availability_zones.rb
ops_manager_ui_drivers-2.1.8 lib/ops_manager_ui_drivers/version16/product_availability_zones.rb
ops_manager_ui_drivers-2.1.7 lib/ops_manager_ui_drivers/version16/product_availability_zones.rb
ops_manager_ui_drivers-2.1.6 lib/ops_manager_ui_drivers/version16/product_availability_zones.rb
ops_manager_ui_drivers-2.1.5 lib/ops_manager_ui_drivers/version16/product_availability_zones.rb
ops_manager_ui_drivers-2.1.4 lib/ops_manager_ui_drivers/version16/product_availability_zones.rb
ops_manager_ui_drivers-2.1.3 lib/ops_manager_ui_drivers/version16/product_availability_zones.rb
ops_manager_ui_drivers-2.1.2 lib/ops_manager_ui_drivers/version16/product_availability_zones.rb
ops_manager_ui_drivers-2.1.1 lib/ops_manager_ui_drivers/version16/product_availability_zones.rb
ops_manager_ui_drivers-2.1.0 lib/ops_manager_ui_drivers/version16/product_availability_zones.rb
ops_manager_ui_drivers-2.0.4 lib/ops_manager_ui_drivers/version16/product_availability_zones.rb
ops_manager_ui_drivers-2.0.3 lib/ops_manager_ui_drivers/version16/product_availability_zones.rb