Sha256: f10bb6415c390d4d7c1b27fd6effa548905e41c6f43b6189d44d37c0146b7031

Contents?: true

Size: 1.05 KB

Versions: 187

Compression:

Stored size: 1.05 KB

Contents

module OpsManagerUiDrivers
  module Version14
    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}-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

187 entries across 187 versions & 1 rubygems

Version Path
ops_manager_ui_drivers-2.42.0 lib/ops_manager_ui_drivers/version14/product_availability_zones.rb
ops_manager_ui_drivers-2.41.0 lib/ops_manager_ui_drivers/version14/product_availability_zones.rb
ops_manager_ui_drivers-2.40.1 lib/ops_manager_ui_drivers/version14/product_availability_zones.rb
ops_manager_ui_drivers-2.40.0 lib/ops_manager_ui_drivers/version14/product_availability_zones.rb
ops_manager_ui_drivers-2.39.0 lib/ops_manager_ui_drivers/version14/product_availability_zones.rb
ops_manager_ui_drivers-2.38.0 lib/ops_manager_ui_drivers/version14/product_availability_zones.rb
ops_manager_ui_drivers-2.37.0 lib/ops_manager_ui_drivers/version14/product_availability_zones.rb
ops_manager_ui_drivers-2.36.0 lib/ops_manager_ui_drivers/version14/product_availability_zones.rb
ops_manager_ui_drivers-2.35.2 lib/ops_manager_ui_drivers/version14/product_availability_zones.rb
ops_manager_ui_drivers-2.35.1 lib/ops_manager_ui_drivers/version14/product_availability_zones.rb
ops_manager_ui_drivers-2.35.0 lib/ops_manager_ui_drivers/version14/product_availability_zones.rb
ops_manager_ui_drivers-2.34.1 lib/ops_manager_ui_drivers/version14/product_availability_zones.rb
ops_manager_ui_drivers-2.34.0 lib/ops_manager_ui_drivers/version14/product_availability_zones.rb
ops_manager_ui_drivers-2.33.1 lib/ops_manager_ui_drivers/version14/product_availability_zones.rb
ops_manager_ui_drivers-2.33.0 lib/ops_manager_ui_drivers/version14/product_availability_zones.rb
ops_manager_ui_drivers-2.32.1 lib/ops_manager_ui_drivers/version14/product_availability_zones.rb
ops_manager_ui_drivers-2.32.0 lib/ops_manager_ui_drivers/version14/product_availability_zones.rb
ops_manager_ui_drivers-1.8.3 lib/ops_manager_ui_drivers/version14/product_availability_zones.rb
ops_manager_ui_drivers-2.31.3 lib/ops_manager_ui_drivers/version14/product_availability_zones.rb
ops_manager_ui_drivers-2.31.2 lib/ops_manager_ui_drivers/version14/product_availability_zones.rb