Sha256: 3bab2f02a166ba8619c07fe54129c4a0f1011717a19c8bcee172eaec37406e57

Contents?: true

Size: 1.05 KB

Versions: 32

Compression:

Stored size: 1.05 KB

Contents

module OpsManagerUiDrivers
  module Version13
    class WebUi
      class ProductAvailabilityZones
        def initialize(browser:, product:)
          @browser = browser
          @product = product
        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

        def open_form
          browser.visit '/'
          browser.click_on "show-#{product}-configure-action"
          browser.click_on "show-#{product}-job-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

32 entries across 32 versions & 1 rubygems

Version Path
ops_manager_ui_drivers-0.16.0 lib/ops_manager_ui_drivers/version13/product_availability_zones.rb
ops_manager_ui_drivers-0.15.2 lib/ops_manager_ui_drivers/version13/product_availability_zones.rb
ops_manager_ui_drivers-0.15.1 lib/ops_manager_ui_drivers/version13/product_availability_zones.rb
ops_manager_ui_drivers-0.15.0 lib/ops_manager_ui_drivers/version13/product_availability_zones.rb
ops_manager_ui_drivers-0.14.1 lib/ops_manager_ui_drivers/version13/product_availability_zones.rb
ops_manager_ui_drivers-0.14.0 lib/ops_manager_ui_drivers/version13/product_availability_zones.rb
ops_manager_ui_drivers-0.13.0 lib/ops_manager_ui_drivers/version13/product_availability_zones.rb
ops_manager_ui_drivers-0.12.0 lib/ops_manager_ui_drivers/version13/product_availability_zones.rb
ops_manager_ui_drivers-0.11.0 lib/ops_manager_ui_drivers/version13/product_availability_zones.rb
ops_manager_ui_drivers-0.10.0 lib/ops_manager_ui_drivers/version13/product_availability_zones.rb
ops_manager_ui_drivers-0.9.9 lib/ops_manager_ui_drivers/version13/product_availability_zones.rb
ops_manager_ui_drivers-0.9.8 lib/ops_manager_ui_drivers/version13/product_availability_zones.rb
ops_manager_ui_drivers-0.9.7 lib/ops_manager_ui_drivers/version13/product_availability_zones.rb
ops_manager_ui_drivers-0.9.6 lib/ops_manager_ui_drivers/version13/product_availability_zones.rb
ops_manager_ui_drivers-0.9.5 lib/ops_manager_ui_drivers/version13/product_availability_zones.rb
ops_manager_ui_drivers-0.9.4 lib/ops_manager_ui_drivers/version13/product_availability_zones.rb
ops_manager_ui_drivers-0.9.3 lib/ops_manager_ui_drivers/version13/product_availability_zones.rb
ops_manager_ui_drivers-0.9.2 lib/ops_manager_ui_drivers/version13/product_availability_zones.rb
ops_manager_ui_drivers-0.9.1 lib/ops_manager_ui_drivers/version13/product_availability_zones.rb
ops_manager_ui_drivers-0.9.0 lib/ops_manager_ui_drivers/version13/product_availability_zones.rb