Class: OpsManagerUiDrivers::Version16::BoshProductSections::BoshProductFormSection
- Inherits:
-
Object
- Object
- OpsManagerUiDrivers::Version16::BoshProductSections::BoshProductFormSection
- Defined in:
- lib/ops_manager_ui_drivers/version16/bosh_product_sections/bosh_product_form_section.rb
Instance Method Summary collapse
-
#initialize(browser, field_prefix) ⇒ BoshProductFormSection
constructor
A new instance of BoshProductFormSection.
- #open_form(form_name) ⇒ Object
- #save_form(allowed_errors = []) ⇒ Object
- #set_fields(fields) ⇒ Object
Constructor Details
#initialize(browser, field_prefix) ⇒ BoshProductFormSection
Returns a new instance of BoshProductFormSection.
5 6 7 8 |
# File 'lib/ops_manager_ui_drivers/version16/bosh_product_sections/bosh_product_form_section.rb', line 5 def initialize(browser, field_prefix) @browser = browser @field_prefix = field_prefix end |
Instance Method Details
#open_form(form_name) ⇒ Object
10 11 12 13 14 |
# File 'lib/ops_manager_ui_drivers/version16/bosh_product_sections/bosh_product_form_section.rb', line 10 def open_form(form_name) @browser.visit '/' @browser.click_on 'show-p-bosh-configure-action' @browser.click_on "show-#{form_name}-action" end |
#save_form(allowed_errors = []) ⇒ Object
16 17 18 19 |
# File 'lib/ops_manager_ui_drivers/version16/bosh_product_sections/bosh_product_form_section.rb', line 16 def save_form(allowed_errors=[]) @browser.click_on 'Save' !@browser.all('.flash-message.success').empty? || only_has_allowed_verification_errors(allowed_errors) end |
#set_fields(fields) ⇒ Object
21 22 23 24 25 |
# File 'lib/ops_manager_ui_drivers/version16/bosh_product_sections/bosh_product_form_section.rb', line 21 def set_fields(fields) fields.each do |field, value| set_field(field, value) end end |