ole-qa-framework 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +882 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +45 -0
- data/LICENSE.md +14 -0
- data/README.md +17 -0
- data/Rakefile.rb +25 -0
- data/examples/README.md +57 -0
- data/examples/create_bib_record.rb +64 -0
- data/examples/create_requisition.rb +96 -0
- data/examples/purap_workflow_test.rb +185 -0
- data/lib/common/common_object.rb +57 -0
- data/lib/common/data_object.rb +21 -0
- data/lib/common/line_object.rb +44 -0
- data/lib/common/page.rb +72 -0
- data/lib/common/subline_object.rb +47 -0
- data/lib/config/default_options.yml +7 -0
- data/lib/docstore/docstore.rb +13 -0
- data/lib/module/qa_data_helpers.rb +17 -0
- data/lib/module/qa_helpers.rb +153 -0
- data/lib/module/qa_page_helpers.rb +33 -0
- data/lib/ole-qa-framework.rb +178 -0
- data/lib/ole_qa_framework/COMPATIBILITY.rb +20 -0
- data/lib/ole_qa_framework/VERSION.rb +20 -0
- data/lib/olefs/common/e_doc.rb +79 -0
- data/lib/olefs/common/line_object.rb +39 -0
- data/lib/olefs/common/lookup.rb +30 -0
- data/lib/olefs/common/purap_document.rb +73 -0
- data/lib/olefs/objects/line_item.rb +105 -0
- data/lib/olefs/objects/new_line_item.rb +44 -0
- data/lib/olefs/objects/new_preq_line_item.rb +43 -0
- data/lib/olefs/objects/new_receiving_line.rb +42 -0
- data/lib/olefs/objects/preq_line_item.rb +68 -0
- data/lib/olefs/objects/receiving_line.rb +88 -0
- data/lib/olefs/pages/building_lookup.rb +36 -0
- data/lib/olefs/pages/main_menu.rb +23 -0
- data/lib/olefs/pages/payment_request.rb +67 -0
- data/lib/olefs/pages/payment_request_creation.rb +44 -0
- data/lib/olefs/pages/purchase_order.rb +68 -0
- data/lib/olefs/pages/receiving_document.rb +49 -0
- data/lib/olefs/pages/requisition.rb +61 -0
- data/lib/olefs/pages/vendor_lookup.rb +40 -0
- data/lib/olefs/subobjects/accounting_line.rb +46 -0
- data/lib/olefs/subobjects/copies_line.rb +32 -0
- data/lib/olefs/subobjects/exception_notes_line.rb +26 -0
- data/lib/olefs/subobjects/invoice_notes_line.rb +25 -0
- data/lib/olefs/subobjects/new_accounting_line.rb +43 -0
- data/lib/olefs/subobjects/new_copies_line.rb +37 -0
- data/lib/olefs/subobjects/new_exception_notes_line.rb +30 -0
- data/lib/olefs/subobjects/new_invoice_notes_line.rb +35 -0
- data/lib/olefs/subobjects/new_notes_line.rb +36 -0
- data/lib/olefs/subobjects/new_receipt_notes_line.rb +35 -0
- data/lib/olefs/subobjects/notes_line.rb +29 -0
- data/lib/olefs/subobjects/processing_line.rb +24 -0
- data/lib/olefs/subobjects/receipt_notes_line.rb +25 -0
- data/lib/olels/common/e_doc.rb +23 -0
- data/lib/olels/common/editor.rb +92 -0
- data/lib/olels/common/line_object.rb +39 -0
- data/lib/olels/common/lookup.rb +30 -0
- data/lib/olels/objects/access_info_line.rb +25 -0
- data/lib/olels/objects/data_line.rb +31 -0
- data/lib/olels/objects/editor_note.rb +79 -0
- data/lib/olels/objects/holdings_note.rb +26 -0
- data/lib/olels/objects/item_note.rb +26 -0
- data/lib/olels/objects/ownership_extent_line.rb +40 -0
- data/lib/olels/pages/bib_editor.rb +63 -0
- data/lib/olels/pages/describe_workbench.rb +42 -0
- data/lib/olels/pages/instance_editor.rb +80 -0
- data/lib/olels/pages/item_editor.rb +91 -0
- data/lib/olels/pages/loan.rb +102 -0
- data/lib/olels/pages/main_menu.rb +31 -0
- data/lib/olels/pages/patron_lookup.rb +44 -0
- data/lib/olels/pages/return.rb +64 -0
- data/lib/olels/subobjects/ownership_note.rb +26 -0
- data/ole-qa-framework.gemspec +30 -0
- data/pkg/ole-qa-framework-2.1.0.gem +0 -0
- data/spec/common/browser_spec.rb +37 -0
- data/spec/common/data_object_spec.rb +37 -0
- data/spec/common/line_object_spec.rb +49 -0
- data/spec/common/page_spec.rb +44 -0
- data/spec/common/subline_object_spec.rb +54 -0
- data/spec/modules/qa_helpers_spec.rb +55 -0
- data/spec/modules/qa_page_helpers_spec.rb +43 -0
- data/spec/olefs/accounting_line_spec.rb +85 -0
- data/spec/olefs/building_lookup_spec.rb +45 -0
- data/spec/olefs/copies_line_spec.rb +70 -0
- data/spec/olefs/edocs_spec.rb +75 -0
- data/spec/olefs/exception_notes_line_spec.rb +52 -0
- data/spec/olefs/invoice_notes_line_spec.rb +45 -0
- data/spec/olefs/line_item_spec.rb +155 -0
- data/spec/olefs/lookup_spec.rb +44 -0
- data/spec/olefs/main_menu_spec.rb +34 -0
- data/spec/olefs/notes_line_spec.rb +65 -0
- data/spec/olefs/patron_lookup_spec.rb +54 -0
- data/spec/olefs/payment_request_spec.rb +85 -0
- data/spec/olefs/preq_creation_spec.rb +43 -0
- data/spec/olefs/preq_line_item_spec.rb +111 -0
- data/spec/olefs/processing_line_spec.rb +44 -0
- data/spec/olefs/purap_document_spec.rb +58 -0
- data/spec/olefs/purchase_order_spec.rb +77 -0
- data/spec/olefs/receipt_notes_line_spec.rb +54 -0
- data/spec/olefs/receive_spec.rb +66 -0
- data/spec/olefs/receiving_line_spec.rb +125 -0
- data/spec/olefs/requisition_spec.rb +83 -0
- data/spec/olefs/vendor_lookup_spec.rb +49 -0
- data/spec/olels/access_info_line_spec.rb +40 -0
- data/spec/olels/bib_editor_spec.rb +84 -0
- data/spec/olels/data_line_spec.rb +44 -0
- data/spec/olels/describe_workbench_spec.rb +44 -0
- data/spec/olels/editor_spec.rb +56 -0
- data/spec/olels/edocs_spec.rb +42 -0
- data/spec/olels/holdings_note_spec_spec.rb +41 -0
- data/spec/olels/instance_editor_spec.rb +81 -0
- data/spec/olels/item_editor_spec.rb +94 -0
- data/spec/olels/item_note_spec.rb +41 -0
- data/spec/olels/loan_spec.rb +104 -0
- data/spec/olels/lookup_spec.rb +38 -0
- data/spec/olels/main_menu_spec.rb +35 -0
- data/spec/olels/ownership_extent_line_spec.rb +58 -0
- data/spec/olels/ownership_note_spec.rb +41 -0
- data/spec/olels/return_spec.rb +72 -0
- data/spec/spec_helper.rb +21 -0
- data/spec/workflows/purap_spec.rb +221 -0
- metadata +313 -0
@@ -0,0 +1,67 @@
|
|
1
|
+
# Copyright 2005-2013 The Kuali Foundation
|
2
|
+
#
|
3
|
+
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at:
|
6
|
+
#
|
7
|
+
# http://www.opensource.org/licenses/ecl2.php
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module OLE_QA::Framework::OLEFS
|
16
|
+
# An OLE Financial System Payment Request Document.
|
17
|
+
class Payment_Request < PURAP_Document
|
18
|
+
def initialize(ole_session)
|
19
|
+
new_preq_url = ole_session.fs_url + 'portal.do?channelTitle=Payment Request&channelUrl=selectOlePaymentRequest.do?methodToCall=docHandler&command=initiate&docTypeName=OLE_PREQ'
|
20
|
+
super(ole_session, new_preq_url)
|
21
|
+
end
|
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
|
+
# Set Payment Request document screen elements.
|
29
|
+
def set_elements
|
30
|
+
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
|
+
end
|
65
|
+
alias_method(:delete_line_item,:remove_line_item)
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# Copyright 2005-2013 The Kuali Foundation
|
2
|
+
#
|
3
|
+
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at:
|
6
|
+
#
|
7
|
+
# http://www.opensource.org/licenses/ecl2.php
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module OLE_QA::Framework::OLEFS
|
16
|
+
# A Payment Request Creation screen in the OLE Financial System
|
17
|
+
class PREQ_Creation < E_Doc
|
18
|
+
def initialize(ole_session)
|
19
|
+
url = ole_session.fs_url + 'portal.do?channelTitle=Payment Request&channelUrl=selectOlePaymentRequest.do?methodToCall=docHandler&command=initiate&docTypeName=OLE_PREQ'
|
20
|
+
super(ole_session, url)
|
21
|
+
end
|
22
|
+
|
23
|
+
# Set screen elements on PREQ Creation screen.
|
24
|
+
def set_elements
|
25
|
+
super
|
26
|
+
element(:purchase_order_number_field) {b.text_field(:id => "document.purchaseOrderIdentifier")}
|
27
|
+
element(:invoice_number_field) {b.text_field(:id => "document.invoiceNumber")}
|
28
|
+
element(:invoice_date_field) {b.text_field(:id => "document.invoiceDate")}
|
29
|
+
element(:invoice_amount_field) {b.text_field(:id => "document.vendorInvoiceAmount")}
|
30
|
+
element(:special_handling_line_1) {b.text_field(:id => "document.specialHandlingInstructionLine1Text")}
|
31
|
+
element(:special_handling_line_2) {b.text_field(:id => "document.specialHandlingInstructionLine2Text")}
|
32
|
+
element(:special_handling_line_3) {b.text_field(:id => "document.specialHandlingInstructionLine3Text")}
|
33
|
+
element(:foreign_invoice_amount_field) {b.text_field(:id => "document.foreignVendorInvoiceAmount")}
|
34
|
+
element(:continue_button) {b.div(:id => "globalbuttons").input(:title => "Continue")}
|
35
|
+
element(:clear_button) {b.div(:id => "globalbuttons").input(:title => "Clear")}
|
36
|
+
end
|
37
|
+
|
38
|
+
# Wait for #continue_button to appear before considering the page fully loaded.
|
39
|
+
def wait_for_elements
|
40
|
+
super
|
41
|
+
@wait_on << :continue_button
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# Copyright 2005-2013 The Kuali Foundation
|
2
|
+
#
|
3
|
+
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at:
|
6
|
+
#
|
7
|
+
# http://www.opensource.org/licenses/ecl2.php
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module OLE_QA::Framework::OLEFS
|
16
|
+
# An OLE Financial System Purchase Order
|
17
|
+
# - Many screen elements are identical to those of a Requisition
|
18
|
+
# - Line Item handling is identical to that of a Requisition
|
19
|
+
class Purchase_Order < PURAP_Document
|
20
|
+
# Initialize with a URL of OLE_QA::Framework::Session.base_url
|
21
|
+
# @note OLEFS Purchase Orders do not have a direct link to open new documents.
|
22
|
+
def initialize(ole_session)
|
23
|
+
super(ole_session, ole_session.base_url)
|
24
|
+
end
|
25
|
+
|
26
|
+
# Create a new line item object on the purchase order.
|
27
|
+
def set_lines
|
28
|
+
create_line("new_line_item", "New_Line_Item")
|
29
|
+
end
|
30
|
+
|
31
|
+
# Set Purchase Order screen elements.
|
32
|
+
def set_elements
|
33
|
+
super
|
34
|
+
# Purchase Order Detail Area
|
35
|
+
element(:funding_source_selector) {b.select_list(:id => "document.documentFundingSourceCode")}
|
36
|
+
# Additional Institutional Info Tab
|
37
|
+
element(:additional_info_tab_toggle) {b.input(:id => "tab-AdditionalInstitutionalInfo-imageToggle")}
|
38
|
+
element(:additional_info_phone_number_field) {b.text_field(:id => "document.requestorPersonPhoneNumber")}
|
39
|
+
# Delivery Tab
|
40
|
+
element(:room_field) {b.text_field(:id => "document.deliveryBuildingRoomNumber")}
|
41
|
+
element(:building_search_icon) {b.input(:xpath => "//div[@id='tab-Delivery-div']/descendant::tr[2]/th[1]/following-sibling::td[1]/input[1]")}
|
42
|
+
element(:campus_search_icon) {b.input(:xpath => "//div[@id='tab-Delivery-div']/descendant::tr[1]/th[1]/following-sibling::td[1]/input[1]")}
|
43
|
+
element(:delivery_phone_number_field) {b.text_field(:id => "document.deliveryToPhoneNumber")}
|
44
|
+
# Vendor Tab
|
45
|
+
element(:vendor_name_field) {b.text_field(:id => "document.vendorName")}
|
46
|
+
element(:vendor_search_icon) {b.input(:xpath => "//input[@id='document.vendorName']/following-sibling::input[1]")}
|
47
|
+
# Titles Tab
|
48
|
+
element(:grand_total_field) {b.b(:xpath => "//div[@id='tab-Titles-div']/descendant::th[div[contains(text(),'Grand Total')]]/following-sibling::td/div/b")}
|
49
|
+
# Input Buttons
|
50
|
+
element(:sensitive_data_button) {b.input(:xpath => "//input[@title='Assign sensitive data to the PO']")}
|
51
|
+
element(:payment_hold_button) {b.input(:xpath => "//input[@title='Payment Hold']")}
|
52
|
+
element(:amend_button) {b.input(:xpath => "//input[@title='Amend']")}
|
53
|
+
element(:void_order_button) {b.input(:xpath => "//input[@title='Void PO']")}
|
54
|
+
element(:receiving_button) {b.input(:xpath => "//input[@title='Receiving']")}
|
55
|
+
element(:print_button) {b.input(:xpath => "//input[@title='Print']")}
|
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
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# Copyright 2005-2013 The Kuali Foundation
|
2
|
+
#
|
3
|
+
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at:
|
6
|
+
#
|
7
|
+
# http://www.opensource.org/licenses/ecl2.php
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module OLE_QA::Framework::OLEFS
|
16
|
+
# An OLE Financial System Receiving Document
|
17
|
+
class Receiving_Document < PURAP_Document
|
18
|
+
def initialize(ole_session)
|
19
|
+
new_receiving_doc_url = ole_session.fs_url + 'portal.do?channelTitle=Receiving&channelUrl=selectOleLineItemReceiving.do?methodToCall=docHandler&command=initiate&docTypeName=OLE_RCVL'
|
20
|
+
super(ole_session, new_receiving_doc_url)
|
21
|
+
end
|
22
|
+
|
23
|
+
# Create a new receiving line object on the receiving document.
|
24
|
+
def set_lines
|
25
|
+
create_line("new_receiving_line","New_Receiving_Line")
|
26
|
+
end
|
27
|
+
|
28
|
+
# Set Receiving Doc screen elements.
|
29
|
+
def set_elements
|
30
|
+
super
|
31
|
+
# Vendor Tab
|
32
|
+
element(:date_received_field) {b.text_field(:id => "document.shipmentReceivedDate")}
|
33
|
+
element(:packing_slip_number_field) {b.text_field(:id => "document.shipmentPackingSlipNumber")}
|
34
|
+
element(:bill_of_lading_number_field) {b.text_field(:id => "document.shipmentBillOfLadingNumber")}
|
35
|
+
element(:reference_number_field) {b.text_field(:id => "document.shipmentReferenceNumber")}
|
36
|
+
element(:carrier_selector) {b.select_list(:id => "document.carrierCode")}
|
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
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# Copyright 2005-2013 The Kuali Foundation
|
2
|
+
#
|
3
|
+
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at:
|
6
|
+
#
|
7
|
+
# http://www.opensource.org/licenses/ecl2.php
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module OLE_QA::Framework::OLEFS
|
16
|
+
# An OLE Financial System Requisition
|
17
|
+
class Requisition < PURAP_Document
|
18
|
+
# Set URL and initialize.
|
19
|
+
def initialize(ole_session)
|
20
|
+
new_requisition_url = ole_session.fs_url + 'portal.do?channelTitle=Requisition&channelUrl=purapOleRequisition.do?methodToCall=docHandler&command=initiate&docTypeName=OLE_REQS'
|
21
|
+
super(ole_session, new_requisition_url)
|
22
|
+
end
|
23
|
+
|
24
|
+
# Create a new line item object on the requisition.
|
25
|
+
def set_lines
|
26
|
+
create_line("new_line_item", "New_Line_Item")
|
27
|
+
end
|
28
|
+
|
29
|
+
# Set Requisition screen elements.
|
30
|
+
def set_elements
|
31
|
+
super
|
32
|
+
# Requisition Detail Area
|
33
|
+
element(:license_request_checkbox) {b.checkbox(:id => "document.licensingRequirementIndicator")}
|
34
|
+
element(:receiving_required_checkbox) {b.checkbox(:id => "document.receivingDocumentRequiredIndicator")}
|
35
|
+
element(:payment_request_approval_required_checkbox) {b.checkbox(:id => "document.paymentRequestPositiveApprovalIndicator")}
|
36
|
+
# Additional Institutional Info Tab
|
37
|
+
element(:additional_info_tab_toggle) {b.input(:id => "tab-AdditionalInstitutionalInfo-imageToggle")}
|
38
|
+
element(:additional_info_phone_number_field) {b.text_field(:id => "document.requestorPersonPhoneNumber")}
|
39
|
+
# Delivery Tab
|
40
|
+
element(:room_field) {b.text_field(:id => "document.deliveryBuildingRoomNumber")}
|
41
|
+
element(:building_search_icon) {b.input(:xpath => "//div[@id='tab-Delivery-div']/descendant::tr[2]/th[1]/following-sibling::td[1]/input[1]")}
|
42
|
+
element(:campus_search_icon) {b.input(:xpath => "//div[@id='tab-Delivery-div']/descendant::tr[1]/th[1]/following-sibling::td[1]/input[1]")}
|
43
|
+
element(:delivery_phone_number_field) {b.text_field(:id => "document.deliveryToPhoneNumber")}
|
44
|
+
# Vendor Tab
|
45
|
+
element(:vendor_name_field) {b.text_field(:id => "document.vendorName")}
|
46
|
+
element(:vendor_search_icon) {b.input(:xpath => "//input[@id='document.vendorName']/following-sibling::input[1]")}
|
47
|
+
# Titles Tab
|
48
|
+
element(:grand_total_field) {b.b(:xpath => "//div[@id='tab-Titles-div']/descendant::th[div[contains(text(),'Grand Total')]]/following-sibling::td/div/b")}
|
49
|
+
end
|
50
|
+
|
51
|
+
def create_line_item(which = 1)
|
52
|
+
create_line("line_item_#{which}","Line_Item", which)
|
53
|
+
end
|
54
|
+
alias_method(:add_line_item,:create_line_item)
|
55
|
+
|
56
|
+
def remove_line_item(which = 1)
|
57
|
+
remove_line("line_item_#{which}")
|
58
|
+
end
|
59
|
+
alias_method(:delete_line_item,:remove_line_item)
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# Copyright 2005-2013 The Kuali Foundation
|
2
|
+
#
|
3
|
+
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at:
|
6
|
+
#
|
7
|
+
# http://www.opensource.org/licenses/ecl2.php
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module OLE_QA::Framework::OLEFS
|
16
|
+
# The Vendor Lookup Screen in OLEFS
|
17
|
+
class Vendor_Lookup < Lookup
|
18
|
+
# Set URL and initialize.
|
19
|
+
def initialize(ole_session)
|
20
|
+
# Set @url instance variable from OLE Base URL Variable
|
21
|
+
url = ole_session.base_url + \
|
22
|
+
'portal.do?channelTitle=Vendor&channelUrl=kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.ole.vnd.businessobject.VendorDetail&docFormKey=88888888&returnLocation=' \
|
23
|
+
+ ole_session.base_url + \
|
24
|
+
'portal.do&hideReturnLink=true'
|
25
|
+
super(ole_session, url)
|
26
|
+
end
|
27
|
+
|
28
|
+
# Set Vendor Lookup screen elements.
|
29
|
+
def set_elements
|
30
|
+
super
|
31
|
+
element(:vendor_name_field) {b.text_field(:id => "vendorName")}
|
32
|
+
element(:tax_number_field) {b.text_field(:id => "vendorHeader.vendorTaxNumber")}
|
33
|
+
element(:vendor_number_field) {b.text_field(:id => "vendorNumber")}
|
34
|
+
element(:vendor_type_selector) {b.select_list(:id => "vendorHeader.vendorTypeCode")}
|
35
|
+
element(:state_field) {b.text_field(:id => "vendorAddresses.vendorStateCode")}
|
36
|
+
element(:commodity_code_field) {b.text_field(:id => "vendorCommodities.purchasingCommodityCode")}
|
37
|
+
element(:supplier_diversity_selector) {b.select_list(:id => "vendorHeader.vendorSupplierDiversities.vendorSupplierDiversityCode")}
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# Copyright 2005-2013 The Kuali Foundation
|
2
|
+
#
|
3
|
+
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at:
|
6
|
+
#
|
7
|
+
# http://www.opensource.org/licenses/ecl2.php
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module OLE_QA::Framework::OLEFS
|
16
|
+
# An Accounting Line in an OLE Financial System PURAP E-Document.
|
17
|
+
class Accounting_Line < OLE_QA::Framework::Subline_Object
|
18
|
+
# Set accounting line elements.
|
19
|
+
def set_elements
|
20
|
+
super
|
21
|
+
# Fields
|
22
|
+
element(:account_number_field) {b.text_field(:id => "document.item[#{@line_id}].sourceAccountingLine[#{@subline_id}].accountNumber")}
|
23
|
+
element(:sub_account_number_field) {b.text_field(:id => "document.item[#{@line_id}].sourceAccountingLine[#{@subline_id}].subAccountNumber")}
|
24
|
+
element(:object_field) {b.text_field(:id => "document.item[#{@line_id}].sourceAccountingLine[#{@subline_id}].financialObjectCode")}
|
25
|
+
element(:sub_object_field) {b.text_field(:id => "document.item[#{@line_id}].sourceAccountingLine[#{@subline_id}].financialSubObjectCode")}
|
26
|
+
element(:project_field) {b.text_field(:id => "document.item[#{@line_id}].sourceAccountingLine[#{@subline_id}].projectCode")}
|
27
|
+
element(:org_ref_id_field) {b.text_field(:id => "document.item[#{@line_id}].sourceAccountingLine[#{@subline_id}].organizationReferenceId")}
|
28
|
+
element(:dollar_field) {b.text_field(:id => "document.item[#{@line_id}].sourceAccountingLine[#{@subline_id}].amount")}
|
29
|
+
element(:percent_field) {b.text_field(:id => "document.item[#{@line_id}].sourceAccountingLine[#{@subline_id}].accountLinePercent")}
|
30
|
+
# Selectors
|
31
|
+
element(:chart_selector) {b.select_list(:id => "document.item[#{@line_id}].sourceAccountingLine[#{@subline_id}].chartOfAccountsCode")}
|
32
|
+
# Inputs, Radio Buttons, & Checkboxes
|
33
|
+
element(:delete_button) {b.input(:name => "methodToCall.deleteSourceLine.line#{@line_id}.#{@subline_id}.anchoraccountingSourceAnchor")}
|
34
|
+
element(:balance_inquiry_button) {b.input(:name => "methodToCall.performBalance(InquiryForSourceLine.line#{@line_id}:#{@subline_id}.anchoraccountingSourceExistingLineLineAnchor#{@subline_id}")}
|
35
|
+
# Readonly Fields
|
36
|
+
# Use the fields below when the target accounting line was added on an earlier PURAP document
|
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[#{@subline_id}].chart.finChartOfAccountDescription.div").parent.a}
|
39
|
+
element(:closed_account_number_field) {b.div(:id => "document.item[#{@line_id}].sourceAccountingLine[#{@subline_id}].account.accountName.div").parent.a}
|
40
|
+
element(:closed_object_field) {b.div(:id => "document.item[#{@line_id}].sourceAccountingLine[#{@subline_id}].objectCode.financialObjectCodeName.div").parent.a}
|
41
|
+
element(:closed_dollar_field) {b.div(:id => "document.item[#{@line_id}].sourceAccountingLine[#{@subline_id}].amount.div")}
|
42
|
+
element(:closed_percent_field) {b.div(:id => "document.item[#{@line_id}].sourceAccountingLine[#{@subline_id}].sourceAccountingLinePercent.div")}
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# Copyright 2005-2013 The Kuali Foundation
|
2
|
+
#
|
3
|
+
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at:
|
6
|
+
#
|
7
|
+
# http://www.opensource.org/licenses/ecl2.php
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module OLE_QA::Framework::OLEFS
|
16
|
+
# A Copies Line in an OLE Financial System PURAP E-Document.
|
17
|
+
class Copies_Line < OLE_QA::Framework::Subline_Object
|
18
|
+
# Set copies line elements.
|
19
|
+
def set_elements
|
20
|
+
super
|
21
|
+
element(:location_copies_selector) {b.select_list(:id => "document.item[#{@line_id}].copies[#{@subline_id}].location_copies")}
|
22
|
+
element(:delete_button) {b.input(:name => "methodToCall.deleteCopy.line#{@line_id}:#{@subline_id}")}
|
23
|
+
# Readonly Elements
|
24
|
+
# Use these for closed, uneditable fields as on a purchase order.
|
25
|
+
element(:closed_copies_field) {b.div(:xpath => "//tr[td[@class='subhead'][contains(text(),'Copies #{@subline_num}')]]/following-sibling::tr[1]/td[1]/div")}
|
26
|
+
element(:closed_location_copies_field) {b.div(:xpath => "//tr[td[@class='subhead'][contains(text(),'Copies #{@subline_num}')]]/following-sibling::tr[1]/td[2]/div")}
|
27
|
+
element(:closed_parts_field) {b.div(:xpath => "//tr[td[@class='subhead'][contains(text(),'Copies #{@subline_num}')]]/following-sibling::tr[1]/td[3]/div")}
|
28
|
+
element(:closed_part_enumeration_field) {b.div(:xpath => "//tr[td[@class='subhead'][contains(text(),'Copies #{@subline_num}')]]/following-sibling::tr[1]/td[4]/div")}
|
29
|
+
element(:closed_starting_copy_field) {b.div(:xpath => "//tr[td[@class='subhead'][contains(text(),'Copies #{@subline_num}')]]/following-sibling::tr[1]/td[5]/div")}
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# Copyright 2005-2013 The Kuali Foundation
|
2
|
+
#
|
3
|
+
# Licensed under the Educational Community License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at:
|
6
|
+
#
|
7
|
+
# http://www.opensource.org/licenses/ecl2.php
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module OLE_QA::Framework::OLEFS
|
16
|
+
# An Exception Notes Line in an OLE Financial System Receiving Document
|
17
|
+
class Exception_Notes_Line < OLE_QA::Framework::Subline_Object
|
18
|
+
# Set exception notes line elements.
|
19
|
+
def set_elements
|
20
|
+
super
|
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
|
+
end
|
25
|
+
end
|
26
|
+
end
|