Class: KCAwards
- Inherits:
-
BasePage
show all
- Defined in:
- lib/kuality-coeus/page_objects/kc_awards.rb
Class Method Summary
collapse
Methods inherited from BasePage
budget_header_elements, budget_versions_elements, buttons, custom_data, description_field, document_header_elements, error_messages, glbl, global_buttons, links, route_log, search_results_table, special_review, tab_buttons, tiny_buttons, validation_elements
Class Method Details
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/kuality-coeus/page_objects/kc_awards.rb', line 8
def
buttons 'Award', 'Contacts', 'Commitments', 'Budget Versions',
'Payment, Reports & Terms', 'Special Review', 'Custom Data',
'Comments, Notes & Attachments', 'Award Actions', 'Medusa'
action(:time_and_money) { |b| b.t_m_button.click; b.loading }
element(:t_m_button) { |b| b.frm.button(name: 'methodToCall.timeAndMoney') }
element(:headerinfo_table) { |b| b.frm.div(id: 'headerarea').table(class: 'headerinfo') }
value(:header_pi) { |b| b.[0][1].text }
value(:header_lead_unit) { |b| b.[1][1].text }
value(:header_sponsor_name) { |b| b.[2][1].text }
value(:header_document_id) { |b| b.[0][3].text[/\d+/] }
value(:header_status) { |b| b.[0][3].text[/(?<=:).*/] }
value(:header_award_id) { |b| b.[1][3].text[/.*(?=:)/] }
value(:header_account) { |b| b.[][].text }
value(:header_last_update) { |b| b.[][].text }
end
|
.report_types(*types) ⇒ Object
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/kuality-coeus/page_objects/kc_awards.rb', line 26
def report_types *types
types.each_with_index do |type, index|
name=damballa(type)
tag=type.gsub(/([\s\/])/,'')
element("#{name}_report_type".to_sym) { |b| b.frm.select(name: "awardReportsBean.newAwardReportTerms[#{index}].reportCode") }
element("#{name}_frequency".to_sym) { |b| b.frm.select(name: "awardReportsBean.newAwardReportTerms[#{index}].frequencyCode") }
element("#{name}_frequency_base".to_sym) { |b| b.frm.select(name: "awardReportsBean.newAwardReportTerms[#{index}].frequencyBaseCode") }
action("add_#{name}_report_term".to_sym) { |b| b.(name: /anchorReportClasses:#{tag}/).click; b.loading }
end
end
|
.terms(*terms) ⇒ Object
37
38
39
40
41
42
43
44
|
# File 'lib/kuality-coeus/page_objects/kc_awards.rb', line 37
def terms *terms
terms.each_with_index do |term, index|
name=damballa(term)
tag=term.gsub(/([\s\/])/,'')
element("#{name}_code".to_sym) { |b| b.frm.text_field(name: "sponsorTermFormHelper.newSponsorTerms[#{index}].sponsorTermCode") }
action("add_#{name}_term") { |b| b.frm.button(name: /anchorAwardTerms:#{tag}Terms/).click; b.loading }
end
end
|