ole-qa-framework 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,105 @@
|
|
|
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 single Line Item in an OLE Financial System PURAP E-Document.
|
|
17
|
+
class Line_Item < OLE_QA::Framework::OLEFS::Line_Object
|
|
18
|
+
# Create accessor methods for new subline objects.
|
|
19
|
+
def set_sublines
|
|
20
|
+
create_subline("new_accounting_line","New_Accounting_Line")
|
|
21
|
+
create_subline("new_notes_line","New_Notes_Line")
|
|
22
|
+
create_subline("new_copies_line","New_Copies_Line")
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Set line item elements.
|
|
26
|
+
def set_elements
|
|
27
|
+
super
|
|
28
|
+
# Fields
|
|
29
|
+
element(:copies_field) {b.text_field(:id => "document.item[#{@line_id}].oleItemQuantity")}
|
|
30
|
+
element(:parts_field) {b.text_field(:id => "document.item[#{@line_id}].itemNoOfParts")}
|
|
31
|
+
element(:list_price_field) {b.text_field(:id => "document.item[#{@line_id}].itemListPrice")}
|
|
32
|
+
element(:discount_field) {b.text_field(:id => "document.item[#{@line_id}].itemDiscount")}
|
|
33
|
+
element(:description_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[1]/td[2]")}
|
|
34
|
+
element(:item_type_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[1]/td[3]")}
|
|
35
|
+
element(:extended_cost_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[2]/td[3]")}
|
|
36
|
+
element(:receipt_status_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[3]/td[1]")}
|
|
37
|
+
# Selectors
|
|
38
|
+
element(:item_price_source_selector) {b.select_list(:id => "document.item[#{@line_id}].itemPriceSourceId")}
|
|
39
|
+
element(:request_source_selector) {b.select_list(:id => "document.item[#{@line_id}].requestSourceId")}
|
|
40
|
+
element(:item_type_selector) {b.select_list(:id => "document.item[#{@line_id}].itemTypeDescription")}
|
|
41
|
+
element(:format_selector) {b.select_list(:id => "document.item[#{@line_id}].formatTypeId")}
|
|
42
|
+
element(:category_selector) {b.select_list(:id => "document.item[#{@line_id}].categoryId")}
|
|
43
|
+
element(:discount_type_selector) {b.select_list(:id => "document.item[#{@line_id}].itemDiscountType")}
|
|
44
|
+
# Buttons, Checkboxes, Etc.
|
|
45
|
+
element(:delete_button) {b.input(:title => "Delete Item #{@line_number}")}
|
|
46
|
+
element(:route_to_requestor_checkbox) {b.checkbox(:id => "document.item[#{@line_id}].itemRouteToRequestor")}
|
|
47
|
+
element(:public_view_checkbox) {b.checkbox(:id => "document.item[#{@line_id}].itemPublicViewIndicator")}
|
|
48
|
+
# Readonly Elements
|
|
49
|
+
# Use these for closed, uneditable fields as with a pre-existing line item on a purchase order.
|
|
50
|
+
element(:closed_description_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[1]/td[2]")}
|
|
51
|
+
element(:closed_item_type_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[1]/td[3]")}
|
|
52
|
+
element(:closed_extended_cost_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[2]/td[3]")}
|
|
53
|
+
element(:closed_list_price_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[2]/td[4]")}
|
|
54
|
+
element(:closed_copies_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[2]/td[1]")}
|
|
55
|
+
element(:closed_parts_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[2]/td[2]")}
|
|
56
|
+
element(:closed_receipt_status_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[3]/td[1]")}
|
|
57
|
+
element(:closed_copies_received_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[3]/td[2]")}
|
|
58
|
+
element(:closed_parts_received_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[3]/td[3]")}
|
|
59
|
+
element(:closed_item_price_source_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[3]/td[4]")}
|
|
60
|
+
element(:closed_request_source_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[3]/td[5]")}
|
|
61
|
+
element(:closed_format_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[4]/td[1]")}
|
|
62
|
+
element(:closed_category_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[4]/td[2]")}
|
|
63
|
+
element(:closed_vendor_item_id_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[4]/td[3]")}
|
|
64
|
+
element(:closed_requestor_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[4]/td[4]")}
|
|
65
|
+
element(:closed_route_to_requestor_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[4]/td[5]")}
|
|
66
|
+
element(:closed_unit_cost_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[5]/td[1]")}
|
|
67
|
+
element(:closed_discount_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[5]/td[2]")}
|
|
68
|
+
element(:closed_discount_type_field) {b.td(:xpath => "//tr[td[@class='tab-subhead'][contains(text(),'Item #{@line_number}')]]/following-sibling::tr[5]/td[4]")}
|
|
69
|
+
# Subtab Toggle Buttons # Matches all of type, then selects by index = @line_id (i.e. if @line_num is 1, index is 0)
|
|
70
|
+
element(:accounting_lines_toggle) {b.input(:id => /tab-AccountingLines[0-9]+-imageToggle/, :index => @line_id)}
|
|
71
|
+
#element(:notes_toggle) #TBD - The notes and copies lines are treated as the same line for ID purposes.
|
|
72
|
+
#element(:copies_toggle) # There is no reliable way of knowing which index either should have without being state-aware.
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def create_accounting_line(which = 1)
|
|
76
|
+
create_subline("accounting_line_#{which}","Accounting_Line", which)
|
|
77
|
+
end
|
|
78
|
+
alias_method(:add_accounting_line,:create_accounting_line)
|
|
79
|
+
|
|
80
|
+
def create_notes_line(which = 1)
|
|
81
|
+
create_subline("notes_line_#{which}","Notes_Line", which)
|
|
82
|
+
end
|
|
83
|
+
alias_method(:add_notes_line,:create_notes_line)
|
|
84
|
+
|
|
85
|
+
def create_copies_line(which = 1)
|
|
86
|
+
create_subline("copies_line_#{which}","Copies_Line", which)
|
|
87
|
+
end
|
|
88
|
+
alias_method(:add_copies_line,:create_copies_line)
|
|
89
|
+
|
|
90
|
+
def remove_accounting_line(which = 1)
|
|
91
|
+
remove_subline("accounting_line_#{which}")
|
|
92
|
+
end
|
|
93
|
+
alias_method(:delete_accounting_line,:remove_accounting_line)
|
|
94
|
+
|
|
95
|
+
def remove_notes_line(which = 1)
|
|
96
|
+
remove_subline("notes_line_#{which}")
|
|
97
|
+
end
|
|
98
|
+
alias_method(:delete_notes_line,:remove_notes_line)
|
|
99
|
+
|
|
100
|
+
def remove_copies_line(which = 1)
|
|
101
|
+
remove_subline("copies_line_#{which}")
|
|
102
|
+
end
|
|
103
|
+
alias_method(:delete_copies_line,:remove_copies_line)
|
|
104
|
+
end
|
|
105
|
+
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 new Line Item on an OLE Financial System PURAP E-Document.
|
|
17
|
+
class New_Line_Item < OLE_QA::Framework::OLEFS::Line_Object
|
|
18
|
+
# Initialize as a subclass of {OLE_QA::Framework::OLEFS::Line_Object} with a line_number of 0.
|
|
19
|
+
def initialize(ole_session, which)
|
|
20
|
+
super(ole_session, 0)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Set elements on a new line item.
|
|
24
|
+
# @note No line number substitution will be involved as there is only ever
|
|
25
|
+
# one new line item on an OLEFS PURAP E-Document.
|
|
26
|
+
def set_elements
|
|
27
|
+
super
|
|
28
|
+
element(:new_bib_button) {b.input(:id => "bibCreateCurrentItemButton")}
|
|
29
|
+
element(:item_type_selector) {b.select_list(:id => "newPurchasingItemLine.itemTypeDescription")}
|
|
30
|
+
element(:copies_field) {b.text_field(:id => "newPurchasingItemLine.oleItemQuantity")}
|
|
31
|
+
element(:parts_field) {b.text_field(:id => "newPurchasingItemLine.itemNoOfParts")}
|
|
32
|
+
element(:list_price_field) {b.text_field(:id => "newPurchasingItemLine.itemListPrice")}
|
|
33
|
+
element(:public_view_checkbox) {b.checkbox(:id => "newPurchasingItemLine.itemPublicViewIndicator")}
|
|
34
|
+
element(:item_price_source_selector) {b.select_list(:id => "newPurchasingItemLine.itemPriceSourceId")}
|
|
35
|
+
element(:request_source_selector) {b.select_list(:id => "newPurchasingItemLine.requestSourceTypeId")}
|
|
36
|
+
element(:format_selector) {b.select_list(:id => "newPurchasingItemLine.formatTypeId")}
|
|
37
|
+
element(:category_selector) {b.select_list(:id => "newPurchasingItemLine.categoryId")}
|
|
38
|
+
element(:route_to_requestor_checkbox) {b.checkbox(:id => "newPurchasingItemLine.itemRouteToRequestorIndicator")}
|
|
39
|
+
element(:discount_field) {b.text_field(:id => "newPurchasingItemLine.itemDiscount")}
|
|
40
|
+
element(:discount_type_selector) {b.select_list(:id => "newPurchasingItemLine.itemDiscountType")}
|
|
41
|
+
element(:add_button) {b.input(:name => "methodToCall.addItem")}
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
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 new Line Item on an OLE Financial System Payment Request Document.
|
|
17
|
+
class New_PREQ_Line_Item < OLE_QA::Framework::OLEFS::Line_Object
|
|
18
|
+
# Initialize as a subclass of {OLE_QA::Framework::OLEFS::Line_Object} with a line_number of 0.
|
|
19
|
+
def initialize(ole_session, which)
|
|
20
|
+
super(ole_session, 0)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Set elements on a new PREQ line item.
|
|
24
|
+
# @note No line number substitution will be involved as there is only ever
|
|
25
|
+
# one new line item on an OLEFS Receiving Document.
|
|
26
|
+
def set_elements
|
|
27
|
+
super
|
|
28
|
+
element(:po_unit_price_field) {b.text_field(:id => "newPurchasingItemLine.purchaseOrderItemUnitPrice")}
|
|
29
|
+
element(:format_selector) {b.select_list(:id => "newPurchasingItemLine.formatTypeId")}
|
|
30
|
+
element(:vendor_item_identifier_field) {b.text_field(:id => "newPurchasingItemLine.itemCatalogNumber")}
|
|
31
|
+
element(:number_of_copies_ordered_field) {b.text_field(:id => "newPurchasingItemLine.oleItemQuantity")}
|
|
32
|
+
element(:number_of_parts_ordered_field) {b.text_field(:id => "newPurchasingItemLine.itemNoOfParts")}
|
|
33
|
+
element(:list_price_field) {b.text_field(:id => "newPurchasingItemLine.itemListPrice")}
|
|
34
|
+
element(:discount_field) {b.text_field(:id => "newPurchasingItemLine.itemDiscount")}
|
|
35
|
+
element(:discount_type_selector) {b.select_list(:id => "newPurchasingItemLine.itemDiscountType")}
|
|
36
|
+
element(:assigned_to_trade_in_checkbox) {b.checkbox(:id => "newPurchasingItemLine.itemAssignedToTradeInIndicator")}
|
|
37
|
+
element(:description_field) {b.text_field(:id => "newPurchasingItemLine.itemDescription")}
|
|
38
|
+
element(:new_bib_button) {b.input(:id => "bibCreateCurrentItemButton")}
|
|
39
|
+
element(:receipt_status_selector) {b.select_list(:id => "newPurchasingItemLine.receiptStatusId")}
|
|
40
|
+
element(:add_button) {b.input(:name => "methodToCall.addItem")}
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
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 new Receiving Line on an OLE Financial System Receiving Document.
|
|
17
|
+
class New_Receiving_Line < OLE_QA::Framework::OLEFS::Line_Object
|
|
18
|
+
# Initialize as a subclass of {OLE_QA::Framework::OLEFS::Line_Object} with a line_number of 0.
|
|
19
|
+
def initialize(ole_session, which)
|
|
20
|
+
super(ole_session, 0)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Set elements on a new receiving line.
|
|
24
|
+
# @note No line number substitution will be involved as there is only ever
|
|
25
|
+
# one new line item on an OLEFS Receiving Document.
|
|
26
|
+
def set_elements
|
|
27
|
+
super
|
|
28
|
+
element(:vendor_item_identifier_field) {b.text_field(:id => "newLineItemReceivingItemLine.itemCatalogNumber")}
|
|
29
|
+
element(:format_selector) {b.select_list(:id => "newLineItemReceivingItemLine.oleFormatId")}
|
|
30
|
+
element(:item_received_quantity_field) {b.text_field(:id => "newLineItemReceivingItemLine.oleItemReceivedTotalQuantity")}
|
|
31
|
+
element(:item_received_parts_field) {b.text_field(:id => "newLineItemReceivingItemLine.oleItemReceivedTotalParts")}
|
|
32
|
+
element(:item_returned_quantity_field) {b.text_field(:id => "newLineItemReceivingItemLine.oleItemReturnedTotalQuantity")}
|
|
33
|
+
element(:item_returned_parts_field) {b.text_field(:id => "newLineItemReceivingItemLine.oleItemReturnedTotalParts")}
|
|
34
|
+
element(:item_damaged_quantity_field) {b.text_field(:id => "newLineItemReceivingItemLine.oleItemDamagedTotalQuantity")}
|
|
35
|
+
element(:item_damaged_parts_field) {b.text_field(:id => "newLineItemReceivingItemLine.oleItemDamagedTotalParts")}
|
|
36
|
+
element(:addition_reason_selector) {b.select_list(:id => "newLineItemReceivingItemLine.itemReasonAddedCode")}
|
|
37
|
+
element(:available_to_public_checkbox) {b.checkbox(:id => "newLineItemReceivingItemLine.availableToPublic")}
|
|
38
|
+
element(:public_view_checkbox) {b.checkbox(:id => "newLineItemReceivingItemLine.availableToPublic")}
|
|
39
|
+
element(:new_bib_button) {b.input(:id => "bibCreateCurrentItemButton")}
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
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
|
+
# A single Line Item in an OLE Financial System Payment Request.
|
|
17
|
+
class PREQ_Line_Item < OLE_QA::Framework::OLEFS::Line_Object
|
|
18
|
+
# Create accessor methods for new subline objects.
|
|
19
|
+
def set_sublines
|
|
20
|
+
create_subline("new_invoice_notes_line","New_Invoice_Notes_Line")
|
|
21
|
+
create_subline("new_accounting_line","New_Accounting_Line")
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Set PREQ line item elements.
|
|
25
|
+
def set_elements
|
|
26
|
+
super
|
|
27
|
+
# Read-Only Elements
|
|
28
|
+
element(:open_quantity_field) {b.td(:xpath => "//div[@id='tab-ProcessItems-div']/descendant::table/tbody/tr[th[contains(text(),'Item Line #')]]/following-sibling::tr[td/b[contains(text(),'#{@line_number}')]]/td[2]")}
|
|
29
|
+
element(:po_unit_price_field) {b.td(:xpath => "//div[@id='tab-ProcessItems-div']/descendant::table/tbody/tr[th[contains(text(),'Item Line #')]]/following-sibling::tr[td/b[contains(text(),'#{@line_number}')]]/td[3]")}
|
|
30
|
+
element(:format_field) {b.td(:xpath => "//div[@id='tab-ProcessItems-div']/descendant::table/tbody/tr[th[contains(text(),'Item Line #')]]/following-sibling::tr[td/b[contains(text(),'#{@line_number}')]]/td[4]")}
|
|
31
|
+
element(:vendor_item_identifier_field) {b.td(:xpath => "//div[@id='tab-ProcessItems-div']/descendant::table/tbody/tr[th[contains(text(),'Item Line #')]]/following-sibling::tr[td/b[contains(text(),'#{@line_number}')]]/td[5]")}
|
|
32
|
+
element(:prorated_surcharge_field) {b.td(:xpath => "//div[@id='tab-ProcessItems-div']/descendant::table/tbody/tr[th[contains(text(),'Item Line #')]]/following-sibling::tr[td/b[contains(text(),'#{@line_number}')]]/td[11]")}
|
|
33
|
+
element(:unit_cost_field) {b.td(:xpath => "//div[@id='tab-ProcessItems-div']/descendant::table/tbody/tr[th[contains(text(),'Item Line #')]]/following-sibling::tr[td/b[contains(text(),'#{@line_number}')]]/td[12]")}
|
|
34
|
+
element(:extended_cost_field) {b.td(:xpath => "//div[@id='tab-ProcessItems-div']/descendant::table/tbody/tr[th[contains(text(),'Item Line #')]]/following-sibling::tr[td/b[contains(text(),'#{@line_number}')]]/td[13]")}
|
|
35
|
+
element(:assigned_to_trade_in_field) {b.td(:xpath => "//div[@id='tab-ProcessItems-div']/descendant::table/tbody/tr[th[contains(text(),'Item Line #')]]/following-sibling::tr[td/b[contains(text(),'#{@line_number}')]]/td[14]")}
|
|
36
|
+
element(:description_field) {b.td(:xpath => "//div[@id='tab-ProcessItems-div']/descendant::table/tbody/tr[th[contains(text(),'Item Line #')]]/following-sibling::tr[td/b[contains(text(),'#{@line_number}')]]/td[15]")}
|
|
37
|
+
element(:number_of_copies_ordered_field) {b.text_field(:id => "document.item[#{@line_id}].oleItemQuantity")}
|
|
38
|
+
element(:number_of_parts_ordered_field) {b.text_field(:id => "document.item[#{@line_id}].itemNoOfParts")}
|
|
39
|
+
element(:list_price_field) {b.text_field(:id => "document.item[#{@line_id}].itemListPrice")}
|
|
40
|
+
element(:discount_field) {b.text_field(:id => "document.item[#{@line_id}].itemDiscount")}
|
|
41
|
+
element(:discount_type_selector) {b.select_list(:id => "document.item[#{@line_id}].itemDiscountType")}
|
|
42
|
+
element(:edit_bib_button) {b.input(:id => "bibEditAddedItemButton_#{@line_id}")}
|
|
43
|
+
element(:delete_button) {b.input(:xpath => "//input[@name='methodToCall.deleteItem.line#{@line_id}']")}
|
|
44
|
+
element(:invoice_notes_toggle) {b.input(:xpath => "//div[@id='tab-ProcessItems-div']/descendant::table/tbody/tr[th[contains(text(),'Item Line #')]]/following-sibling::tr[td/b[contains(text(),'#{@line_number}')]]/following-sibling::tr[2]/descendant::input[starts-with(@id,'tab-Notes')]")}
|
|
45
|
+
element(:accounting_lines_toggle) {b.input(:xpath => "//div[@id='tab-ProcessItems-div']/descendant::table/tbody/tr[th[contains(text(),'Item Line #')]]/following-sibling::tr[td/b[contains(text(),'#{@line_number}')]]/following-sibling::tr[3]/descendant::input[starts-with(@id,'tab-AccountingLines')]")}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def create_invoice_notes_line(which = 1)
|
|
49
|
+
create_subline("invoice_notes_line_#{which}","Invoice_Notes_Line", which)
|
|
50
|
+
end
|
|
51
|
+
alias_method(:add_invoice_notes_line,:create_invoice_notes_line)
|
|
52
|
+
|
|
53
|
+
def create_accounting_line(which = 1)
|
|
54
|
+
create_subline("accounting_line_#{which}","Accounting_Line", which)
|
|
55
|
+
end
|
|
56
|
+
alias_method(:add_accounting_line,:create_accounting_line)
|
|
57
|
+
|
|
58
|
+
def remove_invoice_notes_line(which = 1)
|
|
59
|
+
remove_subline("invoice_notes_line_#{which}")
|
|
60
|
+
end
|
|
61
|
+
alias_method(:delete_invoice_notes_line,:remove_invoice_notes_line)
|
|
62
|
+
|
|
63
|
+
def remove_accounting_line(which = 1)
|
|
64
|
+
remove_subline("accounting_line_#{which}")
|
|
65
|
+
end
|
|
66
|
+
alias_method(:delete_accounting_line,:remove_accounting_line)
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -0,0 +1,88 @@
|
|
|
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 single line on an OLE Financial System Receiving Document
|
|
17
|
+
class Receiving_Line < OLE_QA::Framework::OLEFS::Line_Object
|
|
18
|
+
# Create accessor methods for new subline objects.
|
|
19
|
+
def set_sublines
|
|
20
|
+
create_subline("new_exception_notes_line","New_Exception_Notes_Line")
|
|
21
|
+
create_subline("new_receipt_notes_line","New_Receipt_Notes_Line")
|
|
22
|
+
create_subline("new_copies_line","New_Copies_Line")
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Set receiving line elements.
|
|
26
|
+
def set_elements
|
|
27
|
+
super
|
|
28
|
+
element(:description_field) {b.td(:xpath => "//table[@summary='Items Section']/tbody/tr/td[1][b[contains(text(),'#{@line_number}')]]/following-sibling::td[2]")}
|
|
29
|
+
element(:quantity_ordered_field) {b.td(:xpath => "//table[@summary='Items Section']/tbody/tr/td[1][b[contains(text(),'#{@line_number}')]]/following-sibling::td[4]")}
|
|
30
|
+
element(:parts_ordered_field) {b.td(:xpath => "//table[@summary='Items Section']/tbody/tr/td[1][b[contains(text(),'#{@line_number}')]]/following-sibling::td[5]")}
|
|
31
|
+
element(:prior_quantity_received_field) {b.td(:xpath => "//table[@summary='Items Section']/tbody/tr/td[1][b[contains(text(),'#{@line_number}')]]/following-sibling::td[6]")}
|
|
32
|
+
element(:prior_parts_received_field) {b.td(:xpath => "//table[@summary='Items Section']/tbody/tr/td[1][b[contains(text(),'#{@line_number}')]]/following-sibling::td[7]")}
|
|
33
|
+
element(:quantity_to_be_received_field) {b.td(:xpath => "//table[@summary='Items Section']/tbody/tr/td[1][b[contains(text(),'#{@line_number}')]]/following-sibling::td[8]")}
|
|
34
|
+
element(:parts_to_be_received_field) {b.td(:xpath => "//table[@summary='Items Section']/tbody/tr/td[1][b[contains(text(),'#{@line_number}')]]/following-sibling::td[9]")}
|
|
35
|
+
element(:item_received_quantity_field) {b.text_field(:id => "document.item[#{@line_id}].oleItemReceivedTotalQuantity")}
|
|
36
|
+
element(:item_received_parts_field) {b.text_field(:id => "document.item[#{@line_id}].oleItemReceivedTotalParts")}
|
|
37
|
+
element(:item_returned_quantity_field) {b.text_field(:id => "document.item[#{@line_id}].oleItemReturnedTotalQuantity")}
|
|
38
|
+
element(:item_returned_parts_field) {b.text_field(:id => "document.item[#{@line_id}].oleItemReturnedTotalParts")}
|
|
39
|
+
element(:item_damaged_quantity_field) {b.text_field(:id => "document.item[#{@line_id}].oleItemDamagedTotalQuantity")}
|
|
40
|
+
element(:item_damaged_parts_field) {b.text_field(:id => "document.item[#{@line_id}].oleItemDamagedTotalParts")}
|
|
41
|
+
element(:available_to_public_checkbox) {b.checkbox(:id => "document.item[#{@line_id}].availableToPublic")}
|
|
42
|
+
element(:public_view_checkbox) {b.checkbox(:id => "document.item[#{@line_id}].availableToPublic")}
|
|
43
|
+
element(:exception_notes_toggle) {b.input(:xpath => "//tr[td/b[contains(text(),'#{@line_number}')]]/following-sibling::tr[2]/td[1]/table/tbody/tr[1]/th/div/input")}
|
|
44
|
+
element(:receipt_notes_toggle) {b.input(:xpath => "//tr[td/b[contains(text(),'#{@line_number}')]]/following-sibling::tr[3]/td[1]/table/tbody/tr[1]/th/div/input")}
|
|
45
|
+
element(:special_processing_instructions_toggle) {b.input(:xpath => "//tr[td/b[contains(text(),'#{@line_number}')]]/following-sibling::tr[4]/td[1]/table/tbody/tr[1]/th/div/input")}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def create_exception_notes_line(which = 1)
|
|
49
|
+
create_subline("exception_notes_line_#{which}","Exception_Notes_Line", which)
|
|
50
|
+
end
|
|
51
|
+
alias_method(:add_exception_notes_line,:create_exception_notes_line)
|
|
52
|
+
|
|
53
|
+
def create_receipt_notes_line(which = 1)
|
|
54
|
+
create_subline("receipt_notes_line_#{which}","Receipt_Notes_Line", which)
|
|
55
|
+
end
|
|
56
|
+
alias_method(:add_receipt_notes_line,:create_receipt_notes_line)
|
|
57
|
+
|
|
58
|
+
def create_copies_line(which = 1)
|
|
59
|
+
create_subline("copies_line_#{which}","Copies_Line", which)
|
|
60
|
+
end
|
|
61
|
+
alias_method(:add_copies_line,:create_copies_line)
|
|
62
|
+
|
|
63
|
+
def create_processing_line(which = 1)
|
|
64
|
+
create_subline("processing_line_#{which}","Processing_Line", which)
|
|
65
|
+
end
|
|
66
|
+
alias_method(:add_processing_line,:create_processing_line)
|
|
67
|
+
|
|
68
|
+
def remove_exception_notes_line(which = 1)
|
|
69
|
+
remove_subline("exception_notes_line_#{which}")
|
|
70
|
+
end
|
|
71
|
+
alias_method(:delete_exception_notes_line,:remove_exception_notes_line)
|
|
72
|
+
|
|
73
|
+
def remove_receipt_notes_line(which = 1)
|
|
74
|
+
remove_subline("receipt_notes_line_#{which}")
|
|
75
|
+
end
|
|
76
|
+
alias_method(:delete_receipt_notes_line,:remove_receipt_notes_line)
|
|
77
|
+
|
|
78
|
+
def remove_copies_line(which = 1)
|
|
79
|
+
remove_subline("copies_line_#{which}")
|
|
80
|
+
end
|
|
81
|
+
alias_method(:delete_copies_line,:remove_copies_line)
|
|
82
|
+
|
|
83
|
+
def remove_processing_line(which = 1)
|
|
84
|
+
remove_subline("processing_line_#{which}")
|
|
85
|
+
end
|
|
86
|
+
alias_method(:delete_processing_line,:remove_processing_line)
|
|
87
|
+
end
|
|
88
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
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 Building Lookup Screen in OLEFS
|
|
17
|
+
class Building_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=Building&channelUrl=kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.ole.sys.businessobject.Building&docFormKey=88888888&returnLocation='\
|
|
23
|
+
+ ole_session.base_url + \
|
|
24
|
+
'portal.do&hideReturnLink=true'
|
|
25
|
+
super(ole_session, url)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Set Building Lookup screen elements.
|
|
29
|
+
def set_elements
|
|
30
|
+
super
|
|
31
|
+
element(:campus_code_field) {b.text_field(:id => "campusCode")}
|
|
32
|
+
element(:building_code_field) {b.text_field(:id => "buildingCode")}
|
|
33
|
+
element(:building_name_field) {b.text_field(:id => "buildingName")}
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
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 OLE Financial System Main Menu Page
|
|
17
|
+
class Main_Menu < OLE_QA::Framework::Page
|
|
18
|
+
# Set URL and initialize.
|
|
19
|
+
def initialize(ole_session)
|
|
20
|
+
super(ole_session, ole_session.base_url)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|