Class: PopulationsBase

Inherits:
BasePage
  • Object
show all
Defined in:
lib/sambal-kuali/base_page_classes.rb

Class Method Summary collapse

Methods inherited from BasePage

frame_element, green_search_buttons, validation_elements, wrapper_elements

Class Method Details

.population_attribute_elementsObject



17
18
19
20
21
22
23
24
25
26
27
# File 'lib/sambal-kuali/base_page_classes.rb', line 17

def population_attribute_elements
  element(:name) { |b| b.frm.text_field(name: "document.newMaintainableObject.dataObject.populationInfo.name") }
  element(:description) { |b| b.frm.text_field(name: "document.newMaintainableObject.dataObject.populationInfo.descr.plain") }
  element(:rule) { |b| b.frm.select(name: "document.newMaintainableObject.dataObject.populationRuleInfo.agendaIds[0]") }
  element(:child_population) { |b| b.frm.text_field(name: "newCollectionLines['document.newMaintainableObject.dataObject.childPopulations'].name") }
  element(:reference_population) { |b| b.frm.text_field(name: "document.newMaintainableObject.dataObject.referencePopulation.name") }

  action(:lookup_population) { |b| b.frm.link(id: "lookup_searchPopulation_add").click; b.loading.wait_while_present } 
  action(:lookup_ref_population) { |b| b.frm.link(id: "lookup_searchRefPopulation").click; b.loading.wait_while_present }
  action(:add) { |b| b.child_populations_table.button(text: "add").click; b.loading.wait_while_present; sleep 1.5 }
end

.population_lookup_elementsObject



8
9
10
11
12
13
14
15
# File 'lib/sambal-kuali/base_page_classes.rb', line 8

def population_lookup_elements
  element(:keyword) { |b| b.frm.text_field(name: "lookupCriteria[keyword]") }
  element(:results_table) { |b| b.frm.div(id: "population_lookup").table(index: 0) }

  element(:active) { |b| b.frm.radio(value: "kuali.population.population.state.active") }
  element(:inactive) { |b| b.frm.radio(value: "kuali.population.population.state.inactive") }
  element(:both) { |b| b.frm.radio(value: "both") }
end

.population_view_elementsObject



29
30
31
32
33
34
35
36
37
# File 'lib/sambal-kuali/base_page_classes.rb', line 29

def population_view_elements
  element(:name_label) {|b| b.frm.div(data_label: "Name").label }
  value(:name) { |b| b.frm.div(data_label: "Name").span(index: 1).text }
  value(:description) { |b| b.frm.div(data_label: "Description").span(index: 1).text }
  value(:state) { |b| b.frm.div(data_label: "State").span(index: 1).text }
  value(:rule) { |b| b.frm.div(data_label: "Rule").span(index: 2).text }
  value(:operation) { |b| b.frm.div(data_label: "Operation").span(index: 2).text }
  value(:reference_population) { |b| b.frm.div(data_label: "Reference Population").span(index: 1).text }
end