ole-qa-framework 2.7.3 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +15 -0
- data/lib/common/common_object.rb +1 -1
- data/lib/common/line_object.rb +35 -10
- data/lib/common/page.rb +5 -0
- data/lib/common/subline_object.rb +8 -24
- data/lib/module/qa_helpers.rb +1 -1
- data/lib/module/qa_page_helpers.rb +24 -0
- data/lib/ole_qa_framework/VERSION.rb +1 -1
- data/lib/olefs/common/purap_document.rb +20 -25
- data/lib/olefs/objects/invoice_current_item.rb +1 -1
- data/lib/olefs/objects/invoice_line.rb +5 -2
- data/lib/olefs/objects/line_item.rb +44 -50
- data/lib/olefs/objects/receiving_line.rb +22 -52
- data/lib/olefs/pages/invoice.rb +5 -2
- data/lib/olefs/pages/payment_request.rb +0 -39
- data/lib/olefs/pages/purchase_order.rb +1 -11
- data/lib/olefs/pages/receiving_document.rb +1 -11
- data/lib/olefs/pages/requisition.rb +1 -11
- data/lib/olefs/subobjects/accounting_line.rb +16 -16
- data/lib/olefs/subobjects/copies_line.rb +9 -7
- data/lib/olefs/subobjects/exception_notes_line.rb +3 -3
- data/lib/olefs/{objects → subobjects}/invoice_line_item.rb +34 -45
- data/lib/olefs/subobjects/notes_line.rb +5 -5
- data/lib/olefs/subobjects/processing_line.rb +2 -2
- data/lib/olefs/subobjects/receipt_notes_line.rb +2 -2
- data/lib/olels/common/e_doc.rb +0 -17
- data/lib/olels/common/editor.rb +0 -17
- data/lib/olels/objects/access_info_line.rb +4 -4
- data/lib/olels/objects/control_006_line.rb +6 -6
- data/lib/olels/objects/control_007_line.rb +6 -6
- data/lib/olels/objects/data_line.rb +7 -7
- data/lib/olels/objects/editor_note.rb +3 -3
- data/lib/olels/objects/holdings_note.rb +5 -5
- data/lib/olels/objects/item_note.rb +5 -5
- data/lib/olels/objects/ownership_extent_line.rb +6 -16
- data/lib/olels/objects/patron_address_line.rb +33 -33
- data/lib/olels/objects/patron_email_line.rb +10 -10
- data/lib/olels/objects/patron_phone_line.rb +14 -14
- data/lib/olels/pages/bib_editor.rb +3 -44
- data/lib/olels/pages/instance_editor.rb +3 -33
- data/lib/olels/pages/item_editor.rb +1 -13
- data/lib/olels/pages/patron.rb +4 -33
- data/lib/olels/pages/return.rb +1 -0
- data/lib/olels/pages/staff_upload.rb +1 -0
- data/lib/olels/subobjects/ownership_note.rb +4 -4
- data/spec/common/line_object_spec.rb +41 -8
- data/spec/common/subline_object_spec.rb +9 -19
- data/spec/modules/qa_page_helpers_spec.rb +54 -0
- data/spec/olefs/accounting_line_spec.rb +9 -30
- data/spec/olefs/copies_line_spec.rb +1 -16
- data/spec/olefs/exception_notes_line_spec.rb +3 -13
- data/spec/olefs/invoice_current_item_spec.rb +1 -1
- data/spec/olefs/invoice_line_item_spec.rb +5 -5
- data/spec/olefs/invoice_line_spec.rb +2 -2
- data/spec/olefs/invoice_spec.rb +2 -2
- data/spec/olefs/line_item_spec.rb +32 -67
- data/spec/olefs/notes_line_spec.rb +5 -17
- data/spec/olefs/payment_request_spec.rb +1 -43
- data/spec/olefs/processing_line_spec.rb +5 -4
- data/spec/olefs/purap_document_spec.rb +23 -1
- data/spec/olefs/purchase_order_spec.rb +4 -18
- data/spec/olefs/receipt_notes_line_spec.rb +5 -14
- data/spec/olefs/receive_spec.rb +3 -18
- data/spec/olefs/receiving_line_spec.rb +35 -74
- data/spec/olefs/requisition_spec.rb +5 -19
- data/spec/olels/access_info_line_spec.rb +1 -1
- data/spec/olels/bib_editor_spec.rb +8 -56
- data/spec/olels/data_line_spec.rb +2 -2
- data/spec/olels/editor_spec.rb +0 -4
- data/spec/olels/{holdings_note_spec_spec.rb → holdings_note_spec.rb} +1 -1
- data/spec/olels/instance_editor_spec.rb +8 -31
- data/spec/olels/item_editor_spec.rb +4 -14
- data/spec/olels/item_note_spec.rb +2 -2
- data/spec/olels/ownership_extent_line_spec.rb +6 -16
- data/spec/olels/ownership_note_spec.rb +2 -1
- data/spec/olels/patron_address_line_spec.rb +1 -1
- data/spec/olels/patron_email_line_spec.rb +1 -1
- data/spec/olels/patron_phone_line_spec.rb +2 -2
- data/spec/olels/patron_spec.rb +8 -40
- metadata +7 -30
- data/lib/olefs/common/invoice_line_object.rb +0 -37
- data/lib/olefs/common/line_object.rb +0 -39
- data/lib/olefs/objects/new_line_item.rb +0 -48
- data/lib/olefs/objects/new_preq_line_item.rb +0 -43
- data/lib/olefs/objects/new_receiving_line.rb +0 -42
- data/lib/olefs/objects/preq_line_item.rb +0 -68
- data/lib/olefs/pages/payment_request_creation.rb +0 -44
- data/lib/olefs/subobjects/invoice_notes_line.rb +0 -25
- data/lib/olefs/subobjects/new_accounting_line.rb +0 -43
- data/lib/olefs/subobjects/new_copies_line.rb +0 -37
- data/lib/olefs/subobjects/new_exception_notes_line.rb +0 -30
- data/lib/olefs/subobjects/new_invoice_notes_line.rb +0 -35
- data/lib/olefs/subobjects/new_notes_line.rb +0 -36
- data/lib/olefs/subobjects/new_receipt_notes_line.rb +0 -35
- data/lib/olels/common/line_object.rb +0 -39
- data/spec/olefs/invoice_line_object_spec.rb +0 -49
- data/spec/olefs/invoice_notes_line_spec.rb +0 -49
- data/spec/olefs/preq_creation_spec.rb +0 -47
- data/spec/olefs/preq_line_item_spec.rb +0 -111
- data/spec/workflows/purap_spec.rb +0 -221
data/lib/olefs/pages/invoice.rb
CHANGED
@@ -27,8 +27,6 @@ module OLE_QA::Framework::OLEFS
|
|
27
27
|
url = ole_session.url + '/portal.do?channelTitle=Create&channelUrl='
|
28
28
|
url += ole_session.url + '/ole-kr-krad/OLEInvoice?viewId=OLEInvoiceDocumentView&methodToCall=docHandler&command=initiate&documentClass=org.kuali.ole.krad.transaction.documents.OLEInvoiceDocument'
|
29
29
|
super(ole_session, url)
|
30
|
-
@po_line = OLE_QA::Framework::OLEFS::Invoice_Line.new(@ole, 1)
|
31
|
-
@current_items_line = OLE_QA::Framework::OLEFS::Invoice_Current_Item.new(@ole, 1)
|
32
30
|
end
|
33
31
|
|
34
32
|
# Define basic invoice document screen elements.
|
@@ -85,5 +83,10 @@ module OLE_QA::Framework::OLEFS
|
|
85
83
|
super
|
86
84
|
function(:message) {|which = 1| b.ul(:id => 'pageValidationList').li(:index => which - 1)}
|
87
85
|
end
|
86
|
+
|
87
|
+
def set_lines
|
88
|
+
set_line(:po_line, OLE_QA::Framework::OLEFS::Invoice_Line)
|
89
|
+
set_line(:current_items_line, OLE_QA::Framework::OLEFS::Invoice_Current_Item)
|
90
|
+
end
|
88
91
|
end
|
89
92
|
end
|
@@ -20,48 +20,9 @@ module OLE_QA::Framework::OLEFS
|
|
20
20
|
super(ole_session, new_preq_url)
|
21
21
|
end
|
22
22
|
|
23
|
-
# Create a new payment request line item on the payment request document.
|
24
|
-
def set_lines
|
25
|
-
create_line("new_line_item","New_PREQ_Line_Item")
|
26
|
-
end
|
27
|
-
|
28
23
|
# Set Payment Request document screen elements.
|
29
24
|
def set_elements
|
30
25
|
super
|
31
|
-
# Invoice Info Tab
|
32
|
-
element(:invoice_number_field) {b.td(:xpath => "//h3[contains(text(),'Invoice Info')]/following-sibling::table/tbody/tr[1]/td[1]")}
|
33
|
-
element(:pay_date_field) {b.text_field(:id => "document.paymentRequestPayDate")}
|
34
|
-
element(:invoice_date_field) {b.td(:xpath => "//h3[contains(text(),'Invoice Info')]/following-sibling::table/tbody/tr[3]/td[1]")}
|
35
|
-
element(:immediate_pay_checkbox) {b.checkbox(:id => "document.immediatePaymentIndicator")}
|
36
|
-
element(:payment_attachment_checkbox) {b.checkbox(:id => "document.paymentAttachmentIndicator")}
|
37
|
-
element(:invoice_type_field) {b.text_field(:id => "document.oleInvoiceType.invoiceType")}
|
38
|
-
element(:invoice_subtype_field) {b.text_field(:id => "document.oleInvoiceSubType.invoiceSubType")}
|
39
|
-
element(:payment_method_selector) {b.select_list(:id => "document.paymentMethod.paymentMethodId")}
|
40
|
-
# Titles Tab
|
41
|
-
element(:grand_total_field) {b.b(:xpath => "//div[@id='tab-Titles-div']/descendant::th[div[contains(text(),'Grand Total')]]/following-sibling::td/div/b")}
|
42
|
-
element(:additional_charges_toggle) {b.input(:id => "tab-AdditionalCharges-imageToggle")}
|
43
|
-
element(:freight_extended_cost_field) {b.text_field(:id => "document.item[1].itemUnitPrice")}
|
44
|
-
element(:freight_description_field) {b.text_field(:id => "document.item[1].description")}
|
45
|
-
element(:shipping_handling_extended_cost_field) {b.text_field(:id => "document.item[2].itemUnitPrice")}
|
46
|
-
element(:shipping_handling_description_field) {b.text_field(:id => "document.item[2].description")}
|
47
|
-
element(:minimum_order_extended_cost_field) {b.text_field(:id => "document.item[3].itemUnitPrice")}
|
48
|
-
element(:minimum_order_description_field) {b.text_field(:id => "document.item[3].description")}
|
49
|
-
element(:misc_overhead_extended_cost_field) {b.text_field(:id => "document.item[4].itemUnitPrice")}
|
50
|
-
element(:misc_overhead_description_field) {b.text_field(:id => "document.item[4].description")}
|
51
|
-
element(:prorate_by_quantity_checkbox) {b.checkbox(:id => "document.prorateQty")}
|
52
|
-
element(:prorate_by_dollar_checkbox) {b.checkbox(:id => "document.prorateDollar")}
|
53
|
-
element(:prorate_manual_checkbox) {b.checkbox(:id => "document.prorateManual")}
|
54
|
-
element(:close_po_checkbox) {b.checkbox(:id => "document.closePurchaseOrderIndicator")}
|
55
|
-
end
|
56
|
-
|
57
|
-
def create_line_item(which = 1)
|
58
|
-
create_line("line_item_#{which}","PREQ_Line_Item",which)
|
59
|
-
end
|
60
|
-
alias_method(:add_line_item,:create_line_item)
|
61
|
-
|
62
|
-
def remove_line_item(which = 1)
|
63
|
-
remove_line("line_item_#{which}")
|
64
26
|
end
|
65
|
-
alias_method(:delete_line_item,:remove_line_item)
|
66
27
|
end
|
67
28
|
end
|
@@ -25,7 +25,7 @@ module OLE_QA::Framework::OLEFS
|
|
25
25
|
|
26
26
|
# Create a new line item object on the purchase order.
|
27
27
|
def set_lines
|
28
|
-
|
28
|
+
set_line(:line_item, OLE_QA::Framework::OLEFS::Line_Item)
|
29
29
|
end
|
30
30
|
|
31
31
|
# Set Purchase Order screen elements.
|
@@ -54,15 +54,5 @@ module OLE_QA::Framework::OLEFS
|
|
54
54
|
element(:receiving_button) {b.input(:xpath => "//input[@title='Receiving']")}
|
55
55
|
element(:print_button) {b.input(:xpath => "//input[@title='Print']")}
|
56
56
|
end
|
57
|
-
|
58
|
-
def create_line_item(which = 1)
|
59
|
-
create_line("line_item_#{which}","Line_Item", which)
|
60
|
-
end
|
61
|
-
alias_method(:add_line_item,:create_line_item)
|
62
|
-
|
63
|
-
def remove_line_item(which = 1)
|
64
|
-
remove_line("line_item_#{which}")
|
65
|
-
end
|
66
|
-
alias_method(:delete_line_item,:remove_line_item)
|
67
57
|
end
|
68
58
|
end
|
@@ -22,7 +22,7 @@ module OLE_QA::Framework::OLEFS
|
|
22
22
|
|
23
23
|
# Create a new receiving line object on the receiving document.
|
24
24
|
def set_lines
|
25
|
-
|
25
|
+
set_line(:receiving_line,OLE_QA::Framework::OLEFS::Receiving_Line)
|
26
26
|
end
|
27
27
|
|
28
28
|
# Set Receiving Doc screen elements.
|
@@ -35,15 +35,5 @@ module OLE_QA::Framework::OLEFS
|
|
35
35
|
element(:reference_number_field) {b.text_field(:id => "document.shipmentReferenceNumber")}
|
36
36
|
element(:carrier_selector) {b.select_list(:id => "document.carrierCode")}
|
37
37
|
end
|
38
|
-
|
39
|
-
def create_receiving_line(which = 1)
|
40
|
-
create_line("receiving_line_#{which}","Receiving_Line",which)
|
41
|
-
end
|
42
|
-
alias_method(:add_receiving_line,:create_receiving_line)
|
43
|
-
|
44
|
-
def remove_receiving_line(which = 1)
|
45
|
-
remove_line("receiving_line_#{which}")
|
46
|
-
end
|
47
|
-
alias_method(:delete_receiving_line,:remove_receiving_line)
|
48
38
|
end
|
49
39
|
end
|
@@ -23,7 +23,7 @@ module OLE_QA::Framework::OLEFS
|
|
23
23
|
|
24
24
|
# Create a new line item object on the requisition.
|
25
25
|
def set_lines
|
26
|
-
|
26
|
+
set_line(:line_item, OLE_QA::Framework::OLEFS::Line_Item)
|
27
27
|
end
|
28
28
|
|
29
29
|
# Set Requisition screen elements.
|
@@ -49,15 +49,5 @@ module OLE_QA::Framework::OLEFS
|
|
49
49
|
# Titles Tab
|
50
50
|
element(:grand_total_field) {b.b(:xpath => "//div[@id='tab-Titles-div']/descendant::th[div[contains(text(),'Grand Total')]]/following-sibling::td/div/b")}
|
51
51
|
end
|
52
|
-
|
53
|
-
def create_line_item(which = 1)
|
54
|
-
create_line("line_item_#{which}","Line_Item", which)
|
55
|
-
end
|
56
|
-
alias_method(:add_line_item,:create_line_item)
|
57
|
-
|
58
|
-
def remove_line_item(which = 1)
|
59
|
-
remove_line("line_item_#{which}")
|
60
|
-
end
|
61
|
-
alias_method(:delete_line_item,:remove_line_item)
|
62
52
|
end
|
63
53
|
end
|
@@ -19,27 +19,27 @@ module OLE_QA::Framework::OLEFS
|
|
19
19
|
def set_elements
|
20
20
|
super
|
21
21
|
# Fields
|
22
|
-
element(:account_number_field) {b.text_field(:id => "document.item[#{@line_id}].sourceAccountingLine[#{
|
23
|
-
element(:sub_account_number_field) {b.text_field(:id => "document.item[#{@line_id}].sourceAccountingLine[#{
|
24
|
-
element(:object_field) {b.text_field(:id => "document.item[#{@line_id}].sourceAccountingLine[#{
|
25
|
-
element(:sub_object_field) {b.text_field(:id => "document.item[#{@line_id}].sourceAccountingLine[#{
|
26
|
-
element(:project_field) {b.text_field(:id => "document.item[#{@line_id}].sourceAccountingLine[#{
|
27
|
-
element(:org_ref_id_field) {b.text_field(:id => "document.item[#{@line_id}].sourceAccountingLine[#{
|
28
|
-
element(:dollar_field) {b.text_field(:id => "document.item[#{@line_id}].sourceAccountingLine[#{
|
29
|
-
element(:percent_field) {b.text_field(:id => "document.item[#{@line_id}].sourceAccountingLine[#{
|
22
|
+
element(:account_number_field) {b.text_field(:id => "document.item[#{@parent_line.line_id}].sourceAccountingLine[#{line_id}].accountNumber")}
|
23
|
+
element(:sub_account_number_field) {b.text_field(:id => "document.item[#{@parent_line.line_id}].sourceAccountingLine[#{line_id}].subAccountNumber")}
|
24
|
+
element(:object_field) {b.text_field(:id => "document.item[#{@parent_line.line_id}].sourceAccountingLine[#{line_id}].financialObjectCode")}
|
25
|
+
element(:sub_object_field) {b.text_field(:id => "document.item[#{@parent_line.line_id}].sourceAccountingLine[#{line_id}].financialSubObjectCode")}
|
26
|
+
element(:project_field) {b.text_field(:id => "document.item[#{@parent_line.line_id}].sourceAccountingLine[#{line_id}].projectCode")}
|
27
|
+
element(:org_ref_id_field) {b.text_field(:id => "document.item[#{@parent_line.line_id}].sourceAccountingLine[#{line_id}].organizationReferenceId")}
|
28
|
+
element(:dollar_field) {b.text_field(:id => "document.item[#{@parent_line.line_id}].sourceAccountingLine[#{line_id}].amount")}
|
29
|
+
element(:percent_field) {b.text_field(:id => "document.item[#{@parent_line.line_id}].sourceAccountingLine[#{line_id}].accountLinePercent")}
|
30
30
|
# Selectors
|
31
|
-
element(:chart_selector) {b.select_list(:id => "document.item[#{@line_id}].sourceAccountingLine[#{
|
31
|
+
element(:chart_selector) {b.select_list(:id => "document.item[#{@parent_line.line_id}].sourceAccountingLine[#{line_id}].chartOfAccountsCode")}
|
32
32
|
# Inputs, Radio Buttons, & Checkboxes
|
33
|
-
element(:delete_button) {b.input(:name => "methodToCall.deleteSourceLine.line#{@line_id}.#{
|
34
|
-
element(:balance_inquiry_button) {b.input(:name => "methodToCall.performBalance(InquiryForSourceLine.line#{@line_id}:#{
|
33
|
+
element(:delete_button) {b.input(:name => "methodToCall.deleteSourceLine.line#{@parent_line.line_id}.#{line_id}.anchoraccountingSourceAnchor")}
|
34
|
+
element(:balance_inquiry_button) {b.input(:name => "methodToCall.performBalance(InquiryForSourceLine.line#{@parent_line.line_id}:#{line_id}.anchoraccountingSourceExistingLineLineAnchor#{line_id}")}
|
35
35
|
# Readonly Fields
|
36
36
|
# Use the fields below when the target accounting line was added on an earlier PURAP document
|
37
37
|
# (e.g., for accounting lines on a purchase order which were added on the requisition).
|
38
|
-
element(:closed_chart_field) {b.div(:id => "document.item[#{@line_id}].sourceAccountingLine[#{
|
39
|
-
element(:closed_account_number_field) {b.div(:id => "document.item[#{@line_id}].sourceAccountingLine[#{
|
40
|
-
element(:closed_object_field) {b.div(:id => "document.item[#{@line_id}].sourceAccountingLine[#{
|
41
|
-
element(:closed_dollar_field) {b.div(:id => "document.item[#{@line_id}].sourceAccountingLine[#{
|
42
|
-
element(:closed_percent_field) {b.div(:id => "document.item[#{@line_id}].sourceAccountingLine[#{
|
38
|
+
element(:closed_chart_field) {b.div(:id => "document.item[#{@parent_line.line_id}].sourceAccountingLine[#{line_id}].chart.finChartOfAccountDescription.div").parent.a}
|
39
|
+
element(:closed_account_number_field) {b.div(:id => "document.item[#{@parent_line.line_id}].sourceAccountingLine[#{line_id}].account.accountName.div").parent.a}
|
40
|
+
element(:closed_object_field) {b.div(:id => "document.item[#{@parent_line.line_id}].sourceAccountingLine[#{line_id}].objectCode.financialObjectCodeName.div").parent.a}
|
41
|
+
element(:closed_dollar_field) {b.div(:id => "document.item[#{@parent_line.line_id}].sourceAccountingLine[#{line_id}].amount.div")}
|
42
|
+
element(:closed_percent_field) {b.div(:id => "document.item[#{@parent_line.line_id}].sourceAccountingLine[#{line_id}].sourceAccountingLinePercent.div")}
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
@@ -18,15 +18,17 @@ module OLE_QA::Framework::OLEFS
|
|
18
18
|
# Set copies line elements.
|
19
19
|
def set_elements
|
20
20
|
super
|
21
|
-
element(:location_copies_selector) {b.select_list(:id => "document.item[#{@line_id}].copies[#{
|
22
|
-
element(:delete_button) {b.input(:name => "methodToCall.deleteCopy.line#{@line_id}:#{
|
21
|
+
element(:location_copies_selector) {b.select_list(:id => "document.item[#{@parent_line.line_id}].copies[#{line_id}].location_copies")}
|
22
|
+
element(:delete_button) {b.input(:name => "methodToCall.deleteCopy.line#{@parent_line.line_id}:#{line_id}")}
|
23
23
|
# Readonly Elements
|
24
24
|
# Use these for closed, uneditable fields as on a purchase order.
|
25
|
-
|
26
|
-
|
27
|
-
element(:
|
28
|
-
element(:
|
29
|
-
element(:
|
25
|
+
# FIXME Add open fields to match the new copies line fields on OLEFS Line Item
|
26
|
+
# FIXME Redefine closed fields
|
27
|
+
element(:closed_copies_field) {b.div(:xpath => "//tr[td[@class='subhead'][contains(text(),'Copies #{line_number}')]]/following-sibling::tr[1]/td[1]/div")}
|
28
|
+
element(:closed_location_copies_field) {b.div(:xpath => "//tr[td[@class='subhead'][contains(text(),'Copies #{line_number}')]]/following-sibling::tr[1]/td[2]/div")}
|
29
|
+
element(:closed_parts_field) {b.div(:xpath => "//tr[td[@class='subhead'][contains(text(),'Copies #{line_number}')]]/following-sibling::tr[1]/td[3]/div")}
|
30
|
+
element(:closed_part_enumeration_field) {b.div(:xpath => "//tr[td[@class='subhead'][contains(text(),'Copies #{line_number}')]]/following-sibling::tr[1]/td[4]/div")}
|
31
|
+
element(:closed_starting_copy_field) {b.div(:xpath => "//tr[td[@class='subhead'][contains(text(),'Copies #{line_number}')]]/following-sibling::tr[1]/td[5]/div")}
|
30
32
|
end
|
31
33
|
end
|
32
34
|
end
|
@@ -18,9 +18,9 @@ module OLE_QA::Framework::OLEFS
|
|
18
18
|
# Set exception notes line elements.
|
19
19
|
def set_elements
|
20
20
|
super
|
21
|
-
element(:exception_type_selector) {b.select_list(:id => "document.item[#{
|
22
|
-
element(:note_field) {b.text_field(:id => "document.item[#{
|
23
|
-
element(:note_type_selector) {b.select_list(:id => "document.item[#{
|
21
|
+
element(:exception_type_selector) {b.select_list(:id => "document.item[#{line_id}].exceptionNoteList[#{@subline_id}].exceptionTypeId")}
|
22
|
+
element(:note_field) {b.text_field(:id => "document.item[#{line_id}].exceptionNoteList[#{@subline_id}].exceptionNotes")}
|
23
|
+
element(:note_type_selector) {b.select_list(:id => "document.item[#{line_id}].exceptionNoteList[#{@subline_id}].exceptionTypeId")}
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -14,59 +14,48 @@
|
|
14
14
|
|
15
15
|
module OLE_QA::Framework::OLEFS
|
16
16
|
# A single Line Item from a Purchase Order, as represented on an OLE Invoice E-Document.
|
17
|
-
class Invoice_Line_Item < OLE_QA::Framework::
|
18
|
-
|
19
|
-
# Allow the line number to be dynamically set, as needed for addressing various PO lines on an Invoice.
|
20
|
-
attr_accessor :line_number
|
21
|
-
|
22
|
-
# The instance of {OLE_QA::Framework::OLELS::PO_Line} which instantiated the Invoice Line Item object.
|
23
|
-
attr_reader :po_line
|
24
|
-
|
25
|
-
def initialize(ole_session, po_line, line_number = 1)
|
26
|
-
@po_line = po_line
|
27
|
-
super(ole_session, line_number)
|
28
|
-
end
|
17
|
+
class Invoice_Line_Item < OLE_QA::Framework::Subline_Object
|
29
18
|
|
30
19
|
def set_elements
|
31
20
|
super
|
32
|
-
element(:number) {b.span(:id => "CurrentItem_LineItemNo_line#{@
|
33
|
-
element(:open_quantity) {b.span(:id => "CurrentItem_openQuantity_line#{@
|
34
|
-
element(:title) {b.div(:id => "CurrentItem_Title_line#{@
|
35
|
-
element(:copies_ordered) {b.div(:id => "CurrentItem_NoOfCopiesOrdered_line#{@
|
36
|
-
element(:parts_ordered) {b.div(:id => "CurrentItem_NoOfParts_line#{@
|
37
|
-
element(:copies_invoiced_field) {b.text_field(:id => "CurrentItem_NoOfCopiesInvoice_line#{@
|
38
|
-
element(:parts_invoiced_field) {b.text_field(:id => "CurrentItem_NoOfPartsInvoice_line#{@
|
39
|
-
element(:invoiced_price_field) {b.text_field(:id => "CurrentItem_ListPrice_line#{@
|
40
|
-
element(:discount_field) {b.text_field(:id => "CurrentItem_Discount_line#{@
|
41
|
-
element(:discount_type_selector) {b.select_list(:id => "CurrentItem_DiscountType_line#{@
|
42
|
-
element(:unit_cost) {b.span(:id => "CurrentItem_UnitCost_line#{@
|
43
|
-
element(:extended_cost) {b.span(:id => "CurrentItem_ExtendedCost_line#{@
|
44
|
-
element(:invoice_checkbox) {b.span(:id => "CurrentItem_ItemForInvoice_line#{@
|
45
|
-
element(:new_chart_selector) {b.select_list(:id => "Invoice-chartOfAccountsCode_line#{@
|
46
|
-
element(:new_account_number_field) {b.text_field(:id => "Invoice-accountNumber_line#{@
|
47
|
-
element(:new_subaccount_number_field) {b.text_field(:id => "Invoice-subAccountNumber_line#{@
|
48
|
-
element(:new_object_code_field) {b.text_field(:id => "Invoice-financialObjectCode_line#{@
|
49
|
-
element(:new_subobject_code_field) {b.text_field(:id => "Invoice-financialSubObjectCode_line#{@
|
50
|
-
element(:new_project_field) {b.text_field(:id => "Invoice-projectCode_line#{@
|
51
|
-
element(:new_org_ref_id_field) {b.text_field(:id => "InvoiceorgRefId_line#{@
|
52
|
-
element(:new_dollar_field) {b.text_field(:id => "Invoice-amount_line#{@
|
53
|
-
element(:new_percentage_field) {b.text_field(:id => "Invoice-percent_line#{@
|
54
|
-
element(:add_account_button) {b.button(:id => "OLEInvoiceView-processItems-accountingLines_line#{@
|
21
|
+
element(:number) {b.span(:id => "CurrentItem_LineItemNo_line#{@parent_line.line_id}_line#{line_id}_control")}
|
22
|
+
element(:open_quantity) {b.span(:id => "CurrentItem_openQuantity_line#{@parent_line.line_id}_line#{line_id}_control")}
|
23
|
+
element(:title) {b.div(:id => "CurrentItem_Title_line#{@parent_line.line_id}_line#{line_id}")}
|
24
|
+
element(:copies_ordered) {b.div(:id => "CurrentItem_NoOfCopiesOrdered_line#{@parent_line.line_id}_line#{line_id}")}
|
25
|
+
element(:parts_ordered) {b.div(:id => "CurrentItem_NoOfParts_line#{@parent_line.line_id}_line#{line_id}")}
|
26
|
+
element(:copies_invoiced_field) {b.text_field(:id => "CurrentItem_NoOfCopiesInvoice_line#{@parent_line.line_id}_line#{line_id}_control")}
|
27
|
+
element(:parts_invoiced_field) {b.text_field(:id => "CurrentItem_NoOfPartsInvoice_line#{@parent_line.line_id}_line#{line_id}_control")}
|
28
|
+
element(:invoiced_price_field) {b.text_field(:id => "CurrentItem_ListPrice_line#{@parent_line.line_id}_line#{line_id}_control")}
|
29
|
+
element(:discount_field) {b.text_field(:id => "CurrentItem_Discount_line#{@parent_line.line_id}_line#{line_id}_control")}
|
30
|
+
element(:discount_type_selector) {b.select_list(:id => "CurrentItem_DiscountType_line#{@parent_line.line_id}_line#{line_id}_control")}
|
31
|
+
element(:unit_cost) {b.span(:id => "CurrentItem_UnitCost_line#{@parent_line.line_id}_line#{line_id}_control")}
|
32
|
+
element(:extended_cost) {b.span(:id => "CurrentItem_ExtendedCost_line#{@parent_line.line_id}_line#{line_id}_control")}
|
33
|
+
element(:invoice_checkbox) {b.span(:id => "CurrentItem_ItemForInvoice_line#{@parent_line.line_id}_line#{line_id}_control")}
|
34
|
+
element(:new_chart_selector) {b.select_list(:id => "Invoice-chartOfAccountsCode_line#{@parent_line.line_id}_line#{line_id}_add_control")}
|
35
|
+
element(:new_account_number_field) {b.text_field(:id => "Invoice-accountNumber_line#{@parent_line.line_id}_line#{line_id}_add_control")}
|
36
|
+
element(:new_subaccount_number_field) {b.text_field(:id => "Invoice-subAccountNumber_line#{@parent_line.line_id}_line#{line_id}_add_control")}
|
37
|
+
element(:new_object_code_field) {b.text_field(:id => "Invoice-financialObjectCode_line#{@parent_line.line_id}_line#{line_id}_add_control")}
|
38
|
+
element(:new_subobject_code_field) {b.text_field(:id => "Invoice-financialSubObjectCode_line#{@parent_line.line_id}_line#{line_id}_add_control")}
|
39
|
+
element(:new_project_field) {b.text_field(:id => "Invoice-projectCode_line#{@parent_line.line_id}_line#{line_id}_add_control")}
|
40
|
+
element(:new_org_ref_id_field) {b.text_field(:id => "InvoiceorgRefId_line#{@parent_line.line_id}_line#{line_id}_add_control")}
|
41
|
+
element(:new_dollar_field) {b.text_field(:id => "Invoice-amount_line#{@parent_line.line_id}_line#{line_id}_add_control")}
|
42
|
+
element(:new_percentage_field) {b.text_field(:id => "Invoice-percent_line#{@parent_line.line_id}_line#{line_id}_add_control")}
|
43
|
+
element(:add_account_button) {b.button(:id => "OLEInvoiceView-processItems-accountingLines_line#{@parent_line.line_id}_line#{line_id}_add")}
|
55
44
|
end
|
56
45
|
|
57
46
|
def set_functions
|
58
47
|
super
|
59
48
|
# Functions for accounting lines on an Invoice PO Line Item.
|
60
|
-
function(:chart_selector) { |which = 1| which -= 1; b.select_list(:id => "Invoice-chartOfAccountsCode_line#{@
|
61
|
-
function(:account_number_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-accountNumber_line#{@
|
62
|
-
function(:subaccount_number_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-subAccountNumber_line#{@
|
63
|
-
function(:object_code_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-financialObjectCode_line#{@
|
64
|
-
function(:subobject_code_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-financialSubObjectCode_line#{@
|
65
|
-
function(:project_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-projectCode_line#{@
|
66
|
-
function(:org_ref_id_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-orgRefId_line#{@
|
67
|
-
function(:dollar_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-amount_line#{@
|
68
|
-
function(:percentage_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-percent_line#{@
|
69
|
-
function(:delete_account_button) { |which = 1| which -= 1; b.button(:id => "OLEInvoiceView-processItems-accountingLines_line#{@
|
49
|
+
function(:chart_selector) { |which = 1| which -= 1; b.select_list(:id => "Invoice-chartOfAccountsCode_line#{@parent_line.line_id}_line#{line_id}_line#{which}_control")}
|
50
|
+
function(:account_number_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-accountNumber_line#{@parent_line.line_id}_line#{line_id}_line#{which}_control")}
|
51
|
+
function(:subaccount_number_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-subAccountNumber_line#{@parent_line.line_id}_line#{line_id}_line#{which}_control")}
|
52
|
+
function(:object_code_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-financialObjectCode_line#{@parent_line.line_id}_line#{line_id}_line#{which}_control")}
|
53
|
+
function(:subobject_code_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-financialSubObjectCode_line#{@parent_line.line_id}_line#{line_id}_line#{which}_control")}
|
54
|
+
function(:project_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-projectCode_line#{@parent_line.line_id}_line#{line_id}_line#{which}_control")}
|
55
|
+
function(:org_ref_id_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-orgRefId_line#{@parent_line.line_id}_line#{line_id}_line#{which}_control")}
|
56
|
+
function(:dollar_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-amount_line#{@parent_line.line_id}_line#{line_id}_line#{which}_control")}
|
57
|
+
function(:percentage_field) { |which = 1| which -= 1; b.text_field(:id => "Invoice-percent_line#{@parent_line.line_id}_line#{line_id}_line#{which}_control")}
|
58
|
+
function(:delete_account_button) { |which = 1| which -= 1; b.button(:id => "OLEInvoiceView-processItems-accountingLines_line#{@parent_line.line_id}_line#{line_id}_del_line#{@parent_line.line_id}_line#{line_id}_line#{which}")}
|
70
59
|
end
|
71
60
|
end
|
72
61
|
end
|
@@ -18,12 +18,12 @@ module OLE_QA::Framework::OLEFS
|
|
18
18
|
# Set notes line elements.
|
19
19
|
def set_elements
|
20
20
|
super
|
21
|
-
element(:note_type_selector) {b.select_list(:id => "document.item[#{@line_id}].notes[#{
|
22
|
-
element(:note_field) {b.text_field(:id => "document.item[#{@line_id}].notes[#{
|
23
|
-
element(:delete_button) {b.input(:name => "methodToCall.deleteNote.line#{@line_id}:#{
|
21
|
+
element(:note_type_selector) {b.select_list(:id => "document.item[#{@parent_line.line_id}].notes[#{line_id}].noteTypeId")}
|
22
|
+
element(:note_field) {b.text_field(:id => "document.item[#{@parent_line.line_id}].notes[#{line_id}].note")}
|
23
|
+
element(:delete_button) {b.input(:name => "methodToCall.deleteNote.line#{@parent_line.line_id}:#{line_id}")}
|
24
24
|
# Use the elements below for a closed, inaccessible notes field on a PURAP document like a Purchase Order.
|
25
|
-
element(:closed_note_type_field) {b.td(:xpath => "//tr[starts-with(@id,'tab-Notes')]/th/table[@class = 'datatable']/tbody[1]/tr[td[@class = 'subhead'][contains(text(),'Note #{@
|
26
|
-
element(:closed_note_field) {b.td(:xpath => "//tr[starts-with(@id,'tab-Notes')]/th/table[@class = 'datatable']/tbody[1]/tr[td[@class = 'subhead'][contains(text(),'Note #{@
|
25
|
+
element(:closed_note_type_field) {b.td(:xpath => "//tr[starts-with(@id,'tab-Notes')]/th/table[@class = 'datatable']/tbody[1]/tr[td[@class = 'subhead'][contains(text(),'Note #{@line_number}')]]/following-sibling::tr[1]/td[1]")}
|
26
|
+
element(:closed_note_field) {b.td(:xpath => "//tr[starts-with(@id,'tab-Notes')]/th/table[@class = 'datatable']/tbody[1]/tr[td[@class = 'subhead'][contains(text(),'Note #{@line_number}')]]/following-sibling::tr[1]/td[2]")}
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
@@ -17,8 +17,8 @@ module OLE_QA::Framework::OLEFS
|
|
17
17
|
class Processing_Line < OLE_QA::Framework::Subline_Object
|
18
18
|
def set_elements
|
19
19
|
super
|
20
|
-
element(:note_field) {b.td(:xpath => "//table[@summary='Items Section']/tbody/tr[td[1]/b[contains(text(),'#{@line_number}')]]/following-sibling::tr[4]/td[1]/table/tbody/tr[2]/td[1]/table/tbody/tr[td[contains(text(),'Note #{@
|
21
|
-
element(:acknowledge_checkbox) {b.checkbox(:xpath => "//table[@summary='Items Section']/tbody/tr[td[1]/b[contains(text(),'#{@line_number}')]]/following-sibling::tr[4]/td[1]/table/tbody/tr[2]/td[1]/table/tbody/tr[td[contains(text(),'Note #{@
|
20
|
+
element(:note_field) {b.td(:xpath => "//table[@summary='Items Section']/tbody/tr[td[1]/b[contains(text(),'#{@parent_line.line_number}')]]/following-sibling::tr[4]/td[1]/table/tbody/tr[2]/td[1]/table/tbody/tr[td[contains(text(),'Note #{@line_number}')]]/following-sibling::tr[1]/td[1]")}
|
21
|
+
element(:acknowledge_checkbox) {b.checkbox(:xpath => "//table[@summary='Items Section']/tbody/tr[td[1]/b[contains(text(),'#{@parent_line.line_number}')]]/following-sibling::tr[4]/td[1]/table/tbody/tr[2]/td[1]/table/tbody/tr[td[contains(text(),'Note #{@line_number}')]]/following-sibling::tr[1]/td[2]")}
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
@@ -18,8 +18,8 @@ module OLE_QA::Framework::OLEFS
|
|
18
18
|
# Set receipt notes elements.
|
19
19
|
def set_elements
|
20
20
|
super
|
21
|
-
element(:note_type_selector) {b.select_list(:id => "document.item[#{@line_id}].receiptNoteList[#{
|
22
|
-
element(:note_field) {b.text_field(:id => "document.item[#{@line_id}].receiptNoteList[#{
|
21
|
+
element(:note_type_selector) {b.select_list(:id => "document.item[#{@parent_line.line_id}].receiptNoteList[#{line_id}].noteTypeId")}
|
22
|
+
element(:note_field) {b.text_field(:id => "document.item[#{@parent_line.line_id}].receiptNoteList[#{line_id}].notes")}
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
data/lib/olels/common/e_doc.rb
CHANGED
@@ -28,23 +28,6 @@ module OLE_QA::Framework::OLELS
|
|
28
28
|
element(:creation_timestamp) {b.span(:xpath => "//table[@class='uif-gridLayout']/descendant::th[span/label[contains(text(),'Creation Timestamp:')]]/following-sibling::td[1]/div/span")}
|
29
29
|
end
|
30
30
|
|
31
|
-
# FIXME - Make this a single flexible method during namespace revision.
|
32
|
-
# Create a line object on a page.
|
33
|
-
def create_line(instance_name, class_name, which=0)
|
34
|
-
raise StandardError, "Line object already exists. (#{instance_name})" if self.instance_variables.include?("@#{instance_name}".to_sym)
|
35
|
-
new_line_name = instance_name
|
36
|
-
make_accessor(:"#{instance_name}")
|
37
|
-
klas = OLE_QA::Framework::OLELS.const_get(:"#{class_name}")
|
38
|
-
instance_variable_set(:"@#{new_line_name}", klas.new(@ole, which))
|
39
|
-
end
|
40
|
-
|
41
|
-
# Remove a line object from a page.
|
42
|
-
def remove_line(instance_name)
|
43
|
-
raise StandardError, "Line object does not exist. (#{instance_name})" unless self.instance_variables.include?("@#{instance_name}".to_sym)
|
44
|
-
remove_instance_variable("@#{instance_name}".to_sym)
|
45
|
-
unmake_attr(instance_name.to_sym)
|
46
|
-
end
|
47
|
-
|
48
31
|
def wait_for_elements
|
49
32
|
super
|
50
33
|
@wait_on << :title
|
data/lib/olels/common/editor.rb
CHANGED
@@ -36,7 +36,6 @@ module OLE_QA::Framework::OLELS
|
|
36
36
|
editor_url = ole_session.url + 'portal.do?channelTitle=Editor&channelUrl='
|
37
37
|
editor_url += ole_session.url + 'ole-kr-krad/editorcontroller?viewId=EditorView&methodToCall=load&docCategory=work&docType=bibliographic&docFormat=marc&editable=true'
|
38
38
|
super(ole_session, editor_url)
|
39
|
-
set_lines if defined?(self.set_lines)
|
40
39
|
end
|
41
40
|
|
42
41
|
# Set elements common to all Editor screens.
|
@@ -82,21 +81,5 @@ module OLE_QA::Framework::OLELS
|
|
82
81
|
# - If .message_header is not present, a "0" will be returned.
|
83
82
|
function(:message_count) { if message_header.present? then message_header.text.match(/\d(?=\smessage)/).to_s else "0" end}
|
84
83
|
end
|
85
|
-
|
86
|
-
# Create a Line Object on an Editor page.
|
87
|
-
def create_line(instance_name, class_name, which=0)
|
88
|
-
raise StandardError, "Line object already exists. (#{instance_name})" if self.instance_variables.include?("@#{instance_name}".to_sym)
|
89
|
-
new_line_name = instance_name
|
90
|
-
make_accessor(:"#{instance_name}")
|
91
|
-
klas = OLE_QA::Framework::OLELS.const_get(:"#{class_name}")
|
92
|
-
instance_variable_set(:"@#{new_line_name}", klas.new(@ole, which))
|
93
|
-
end
|
94
|
-
|
95
|
-
# Remove a Line Object from an Editor page.
|
96
|
-
def remove_line(instance_name)
|
97
|
-
raise StandardError, "Line object does not exist. (#{instance_name})" unless self.instance_variables.include?("@#{instance_name}".to_sym)
|
98
|
-
remove_instance_variable("@#{instance_name}".to_sym)
|
99
|
-
unmake_attr(instance_name.to_sym)
|
100
|
-
end
|
101
84
|
end
|
102
85
|
end
|
@@ -14,12 +14,12 @@
|
|
14
14
|
|
15
15
|
module OLE_QA::Framework::OLELS
|
16
16
|
# An Access Information Line on the OLE Library System Instance Record Editor
|
17
|
-
class Access_Info_Line < OLE_QA::Framework::
|
17
|
+
class Access_Info_Line < OLE_QA::Framework::Line_Object
|
18
18
|
# Set screen elements for access info line.
|
19
19
|
def set_elements
|
20
|
-
element(:access_info_field) {b.text_field(:id => "OleAccessInformationField_line#{
|
21
|
-
element(:add_button) {b.button(:id => "oleAccessInformation_addTagButton_line#{
|
22
|
-
element(:remove_button) {b.button(:id => "oleAccessInformation_removeTagButton_line#{
|
20
|
+
element(:access_info_field) {b.text_field(:id => "OleAccessInformationField_line#{line_id}_control")}
|
21
|
+
element(:add_button) {b.button(:id => "oleAccessInformation_addTagButton_line#{line_id}")}
|
22
|
+
element(:remove_button) {b.button(:id => "oleAccessInformation_removeTagButton_line#{line_id}")}
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
@@ -15,15 +15,15 @@
|
|
15
15
|
module OLE_QA::Framework::OLELS
|
16
16
|
|
17
17
|
# Represents a Marc control field 006 line in the OLELS Bib Editor.
|
18
|
-
class Control_006_Line < OLE_QA::Framework::
|
18
|
+
class Control_006_Line < OLE_QA::Framework::Line_Object
|
19
19
|
|
20
20
|
# Set Marc data line elements.
|
21
21
|
def set_elements
|
22
|
-
element(:field) {b.text_field(:id => "Control_Field_006_line#{
|
23
|
-
element(:add_button) {b.button(:id => "Control_Field_006_addTagButton_id_line#{
|
24
|
-
element(:edit_button) {b.button(:id => "Control_Field_006_EditTagButton_id_line#{
|
25
|
-
element(:remove_button) {b.button(:id => "Control_Field_006_removeTagButton_id_line#{
|
26
|
-
element(:clear_button) {b.button(:id => "Control_Field_006_clearTagButton_id_line#{
|
22
|
+
element(:field) {b.text_field(:id => "Control_Field_006_line#{line_id}_control")}
|
23
|
+
element(:add_button) {b.button(:id => "Control_Field_006_addTagButton_id_line#{line_id}")}
|
24
|
+
element(:edit_button) {b.button(:id => "Control_Field_006_EditTagButton_id_line#{line_id}")}
|
25
|
+
element(:remove_button) {b.button(:id => "Control_Field_006_removeTagButton_id_line#{line_id}")}
|
26
|
+
element(:clear_button) {b.button(:id => "Control_Field_006_clearTagButton_id_line#{line_id}")}
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|