Class: OpsManagerUiDrivers::Version17::BoshProductSections::BoshProductFormSection
- Inherits:
-
Object
- Object
- OpsManagerUiDrivers::Version17::BoshProductSections::BoshProductFormSection
show all
- Defined in:
- lib/ops_manager_ui_drivers/version17/bosh_product_sections/bosh_product_form_section.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of BoshProductFormSection.
7
8
9
10
|
# File 'lib/ops_manager_ui_drivers/version17/bosh_product_sections/bosh_product_form_section.rb', line 7
def initialize(browser, field_prefix)
@browser = browser
@field_prefix = field_prefix
end
|
Instance Attribute Details
#field_prefix ⇒ Object
Returns the value of attribute field_prefix.
5
6
7
|
# File 'lib/ops_manager_ui_drivers/version17/bosh_product_sections/bosh_product_form_section.rb', line 5
def field_prefix
@field_prefix
end
|
Instance Method Details
12
13
14
15
16
|
# File 'lib/ops_manager_ui_drivers/version17/bosh_product_sections/bosh_product_form_section.rb', line 12
def open_form(form_name)
@browser.visit '/'
@browser.click_on 'show-p-bosh-configure-action'
@browser.click_on "show-#{form_name}-action"
end
|
18
19
20
21
|
# File 'lib/ops_manager_ui_drivers/version17/bosh_product_sections/bosh_product_form_section.rb', line 18
def save_form
@browser.click_on 'Save'
@browser.expect(@browser.page).to @browser.have_css('.flash-message.success')
end
|
#select_all_az_references_on_page ⇒ Object
33
34
35
36
37
|
# File 'lib/ops_manager_ui_drivers/version17/bosh_product_sections/bosh_product_form_section.rb', line 33
def select_all_az_references_on_page
@browser.all(:field, "#{@field_prefix}[availability_zone_references][]").each do |node|
node.set(true)
end
end
|
#set_fields(fields) ⇒ Object
23
24
25
26
27
28
29
30
31
|
# File 'lib/ops_manager_ui_drivers/version17/bosh_product_sections/bosh_product_form_section.rb', line 23
def set_fields(fields)
fields.each do |field, value|
if value.is_a? Hash
handle_customized_field_value(value)
else
set_field(field, value)
end
end
end
|