Sha256: bad56f4b473a93635bb3ff024cacb23586d9fff6c7ed720edb833e82c92d5746

Contents?: true

Size: 965 Bytes

Versions: 102

Compression:

Stored size: 965 Bytes

Contents

module OpsManagerUiDrivers
  module Version15
    module MicroboshSections
      class MicroboshFormSection
        def initialize(browser, field_prefix)
          @browser      = browser
          @field_prefix = field_prefix
        end

        def open_form(form_name)
          @browser.visit '/'
          @browser.click_on 'show-microbosh-configure-action'
          @browser.click_on "show-#{form_name}-action"
        end

        def save_form
          @browser.click_on 'Save'
          @browser.expect(@browser.page).to @browser.have_css('.flash-message.success')
        end

        def set_fields(fields)
          fields.each do |field, value|
            set_field(field, value)
          end
        end

        private

        def set_field(field, value)
          last_field(field).set(value)
        end

        def last_field(field)
          @browser.all(:field, "#{@field_prefix}[#{field}]").last
        end
      end
    end
  end
end

Version data entries

102 entries across 102 versions & 1 rubygems

Version Path
ops_manager_ui_drivers-2.42.0 lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb
ops_manager_ui_drivers-2.41.0 lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb
ops_manager_ui_drivers-2.40.1 lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb
ops_manager_ui_drivers-2.40.0 lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb
ops_manager_ui_drivers-2.39.0 lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb
ops_manager_ui_drivers-2.38.0 lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb
ops_manager_ui_drivers-2.37.0 lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb
ops_manager_ui_drivers-2.36.0 lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb
ops_manager_ui_drivers-2.35.2 lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb
ops_manager_ui_drivers-2.35.1 lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb
ops_manager_ui_drivers-2.35.0 lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb
ops_manager_ui_drivers-2.34.1 lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb
ops_manager_ui_drivers-2.34.0 lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb
ops_manager_ui_drivers-2.33.1 lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb
ops_manager_ui_drivers-2.33.0 lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb
ops_manager_ui_drivers-2.32.1 lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb
ops_manager_ui_drivers-2.32.0 lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb
ops_manager_ui_drivers-2.31.3 lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb
ops_manager_ui_drivers-2.31.2 lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb
ops_manager_ui_drivers-2.31.1 lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb