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,54 @@
|
|
|
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
|
+
require 'rspec'
|
|
16
|
+
require 'spec_helper'
|
|
17
|
+
|
|
18
|
+
describe 'A Patron Lookup page' do
|
|
19
|
+
|
|
20
|
+
before :all do
|
|
21
|
+
@ole = OLE_QA::Framework::Session.new
|
|
22
|
+
@patron_lookup = OLE_QA::Framework::OLELS::Patron_Lookup.new(@ole)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after :all do
|
|
26
|
+
@ole.quit
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
it 'should create a new instance' do
|
|
30
|
+
@patron_lookup.class.should == OLE_QA::Framework::OLELS::Patron_Lookup
|
|
31
|
+
@patron_lookup.class.superclass.should == OLE_QA::Framework::OLELS::Lookup
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
it 'should open the Patron Lookup screen via URL' do
|
|
35
|
+
@patron_lookup.open
|
|
36
|
+
@patron_lookup.title.text.should == "Patron"
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
it 'should have patron lookup elements' do
|
|
40
|
+
elements = @patron_lookup.elements
|
|
41
|
+
elements.include?(:patron_id_field).should be_true
|
|
42
|
+
elements.include?(:barcode_field).should be_true
|
|
43
|
+
elements.include?(:first_name_field).should be_true
|
|
44
|
+
elements.include?(:last_name_field).should be_true
|
|
45
|
+
elements.include?(:borrower_type_selector).should be_true
|
|
46
|
+
elements.include?(:email_address_field).should be_true
|
|
47
|
+
elements.include?(:search_button).should be_true
|
|
48
|
+
elements.include?(:clear_button).should be_true
|
|
49
|
+
elements.include?(:cancel_button).should be_true
|
|
50
|
+
elements.include?(:active_yes_button).should be_true
|
|
51
|
+
elements.include?(:active_no_button).should be_true
|
|
52
|
+
elements.include?(:active_both_button).should be_true
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
require 'rspec'
|
|
16
|
+
require 'spec_helper'
|
|
17
|
+
|
|
18
|
+
describe 'An OLEFS Payment Request page' do
|
|
19
|
+
|
|
20
|
+
before :all do
|
|
21
|
+
@ole = OLE_QA::Framework::Session.new
|
|
22
|
+
@browser = @ole.browser
|
|
23
|
+
@preq = OLE_QA::Framework::OLEFS::Payment_Request.new(@ole)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after :all do
|
|
27
|
+
@ole.quit
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
it 'should create a new instance' do
|
|
31
|
+
@preq.class.should == OLE_QA::Framework::OLEFS::Payment_Request
|
|
32
|
+
@preq.class.superclass.should == OLE_QA::Framework::OLEFS::PURAP_Document
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
it 'should open a new PREQ document via URL' do
|
|
36
|
+
@preq.open
|
|
37
|
+
@preq.title.text.strip.should == "Payment Request"
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
it 'should have payment request elements' do
|
|
41
|
+
elements = @preq.methods
|
|
42
|
+
elements.include?(:invoice_number_field).should be_true
|
|
43
|
+
elements.include?(:pay_date_field).should be_true
|
|
44
|
+
elements.include?(:invoice_date_field).should be_true
|
|
45
|
+
elements.include?(:immediate_pay_checkbox).should be_true
|
|
46
|
+
elements.include?(:payment_attachment_checkbox).should be_true
|
|
47
|
+
elements.include?(:invoice_type_field).should be_true
|
|
48
|
+
elements.include?(:invoice_subtype_field).should be_true
|
|
49
|
+
elements.include?(:payment_method_selector).should be_true
|
|
50
|
+
elements.include?(:grand_total_field).should be_true
|
|
51
|
+
elements.include?(:additional_charges_toggle).should be_true
|
|
52
|
+
elements.include?(:freight_extended_cost_field).should be_true
|
|
53
|
+
elements.include?(:freight_description_field).should be_true
|
|
54
|
+
elements.include?(:shipping_handling_extended_cost_field).should be_true
|
|
55
|
+
elements.include?(:shipping_handling_description_field).should be_true
|
|
56
|
+
elements.include?(:minimum_order_extended_cost_field).should be_true
|
|
57
|
+
elements.include?(:minimum_order_description_field).should be_true
|
|
58
|
+
elements.include?(:misc_overhead_extended_cost_field).should be_true
|
|
59
|
+
elements.include?(:misc_overhead_description_field).should be_true
|
|
60
|
+
elements.include?(:prorate_by_quantity_checkbox).should be_true
|
|
61
|
+
elements.include?(:prorate_by_dollar_checkbox).should be_true
|
|
62
|
+
elements.include?(:prorate_manual_checkbox).should be_true
|
|
63
|
+
elements.include?(:close_po_checkbox).should be_true
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
it 'should have a new line item' do
|
|
67
|
+
@preq.methods.include?(:new_line_item).should be_true
|
|
68
|
+
@preq.new_line_item.class.should == OLE_QA::Framework::OLEFS::New_PREQ_Line_Item
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
it 'should create a line item' do
|
|
72
|
+
@preq.create_line_item(1)
|
|
73
|
+
@preq.methods.include?(:line_item_1).should be_true
|
|
74
|
+
@preq.line_item_1.class.should == OLE_QA::Framework::OLEFS::PREQ_Line_Item
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
it 'should remove a line item' do
|
|
78
|
+
@preq.remove_line_item(1)
|
|
79
|
+
@preq.methods.include?(:line_item_1).should be_false
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
it 'should raise an error when asked to remove a line item which does not exist' do
|
|
83
|
+
lambda {@preq.remove_line_item(1)}.should raise_error
|
|
84
|
+
end
|
|
85
|
+
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
|
+
require 'rspec'
|
|
16
|
+
require 'spec_helper'
|
|
17
|
+
|
|
18
|
+
describe 'An OLEFS Payment Request Creation page' do
|
|
19
|
+
|
|
20
|
+
before :all do
|
|
21
|
+
@ole = OLE_QA::Framework::Session.new
|
|
22
|
+
@preq_screen = OLE_QA::Framework::OLEFS::PREQ_Creation.new(@ole)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
it 'should create a new instance' do
|
|
26
|
+
@preq_screen.class.should == OLE_QA::Framework::OLEFS::PREQ_Creation
|
|
27
|
+
@preq_screen.class.superclass.should == OLE_QA::Framework::OLEFS::E_Doc
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
it 'should have PREQ creation screen elements' do
|
|
31
|
+
elements = @preq_screen.methods
|
|
32
|
+
elements.include?(:purchase_order_number_field).should be_true
|
|
33
|
+
elements.include?(:invoice_number_field).should be_true
|
|
34
|
+
elements.include?(:invoice_date_field).should be_true
|
|
35
|
+
elements.include?(:invoice_amount_field).should be_true
|
|
36
|
+
elements.include?(:special_handling_line_1).should be_true
|
|
37
|
+
elements.include?(:special_handling_line_2).should be_true
|
|
38
|
+
elements.include?(:special_handling_line_3).should be_true
|
|
39
|
+
elements.include?(:foreign_invoice_amount_field).should be_true
|
|
40
|
+
elements.include?(:continue_button).should be_true
|
|
41
|
+
elements.include?(:clear_button).should be_true
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,111 @@
|
|
|
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
|
+
require 'rspec'
|
|
16
|
+
require 'spec_helper'
|
|
17
|
+
|
|
18
|
+
describe 'An OLEFS Preq Line Item object' do
|
|
19
|
+
|
|
20
|
+
before :all do
|
|
21
|
+
@ole = OLE_QA::Framework::Session.new
|
|
22
|
+
@browser = @ole.browser
|
|
23
|
+
@preq_line_item = OLE_QA::Framework::OLEFS::PREQ_Line_Item.new(@ole, 1)
|
|
24
|
+
@new_preq_line = OLE_QA::Framework::OLEFS::New_PREQ_Line_Item.new(@ole, 1)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
after :all do
|
|
28
|
+
@ole.quit
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
it 'should create a new instance' do
|
|
32
|
+
@preq_line_item.class.should == OLE_QA::Framework::OLEFS::PREQ_Line_Item
|
|
33
|
+
@preq_line_item.class.superclass.should == OLE_QA::Framework::OLEFS::Line_Object
|
|
34
|
+
@new_preq_line.class.should == OLE_QA::Framework::OLEFS::New_PREQ_Line_Item
|
|
35
|
+
@new_preq_line.class.superclass.should == OLE_QA::Framework::OLEFS::Line_Object
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
it 'should have a browser accessor' do
|
|
39
|
+
@preq_line_item.browser.class.should == @ole.browser.class
|
|
40
|
+
@new_preq_line.browser.class.should == @ole.browser.class
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
it 'should have a line number of 1' do
|
|
44
|
+
@preq_line_item.line_number.should == 1
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
it 'should have PREQ line item elements' do
|
|
48
|
+
methods = @preq_line_item.methods
|
|
49
|
+
methods.include?(:open_quantity_field).should be_true
|
|
50
|
+
methods.include?(:po_unit_price_field).should be_true
|
|
51
|
+
methods.include?(:format_field).should be_true
|
|
52
|
+
methods.include?(:vendor_item_identifier_field).should be_true
|
|
53
|
+
methods.include?(:prorated_surcharge_field).should be_true
|
|
54
|
+
methods.include?(:unit_cost_field).should be_true
|
|
55
|
+
methods.include?(:extended_cost_field).should be_true
|
|
56
|
+
methods.include?(:assigned_to_trade_in_field).should be_true
|
|
57
|
+
methods.include?(:description_field).should be_true
|
|
58
|
+
methods.include?(:number_of_copies_ordered_field).should be_true
|
|
59
|
+
methods.include?(:number_of_parts_ordered_field).should be_true
|
|
60
|
+
methods.include?(:list_price_field).should be_true
|
|
61
|
+
methods.include?(:discount_field).should be_true
|
|
62
|
+
methods.include?(:discount_type_selector).should be_true
|
|
63
|
+
methods.include?(:edit_bib_button).should be_true
|
|
64
|
+
methods.include?(:delete_button).should be_true
|
|
65
|
+
methods.include?(:invoice_notes_toggle).should be_true
|
|
66
|
+
methods.include?(:accounting_lines_toggle).should be_true
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
it 'should have new PREQ line elements' do
|
|
70
|
+
elements = @new_preq_line.methods
|
|
71
|
+
elements.include?(:po_unit_price_field).should be_true
|
|
72
|
+
elements.include?(:format_selector).should be_true
|
|
73
|
+
elements.include?(:vendor_item_identifier_field).should be_true
|
|
74
|
+
elements.include?(:number_of_copies_ordered_field).should be_true
|
|
75
|
+
elements.include?(:number_of_parts_ordered_field).should be_true
|
|
76
|
+
elements.include?(:list_price_field).should be_true
|
|
77
|
+
elements.include?(:discount_field).should be_true
|
|
78
|
+
elements.include?(:discount_type_selector).should be_true
|
|
79
|
+
elements.include?(:assigned_to_trade_in_checkbox).should be_true
|
|
80
|
+
elements.include?(:description_field).should be_true
|
|
81
|
+
elements.include?(:new_bib_button).should be_true
|
|
82
|
+
elements.include?(:receipt_status_selector).should be_true
|
|
83
|
+
elements.include?(:add_button).should be_true
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
it 'should have sublines' do
|
|
87
|
+
@preq_line_item.methods.include?(:new_invoice_notes_line).should be_true
|
|
88
|
+
@preq_line_item.methods.include?(:new_accounting_line).should be_true
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
it 'should create additional sublines' do
|
|
92
|
+
@preq_line_item.create_accounting_line(1)
|
|
93
|
+
@preq_line_item.methods.include?(:accounting_line_1).should be_true
|
|
94
|
+
@preq_line_item.accounting_line_1.class.should == OLE_QA::Framework::OLEFS::Accounting_Line
|
|
95
|
+
@preq_line_item.create_invoice_notes_line(1)
|
|
96
|
+
@preq_line_item.methods.include?(:invoice_notes_line_1).should be_true
|
|
97
|
+
@preq_line_item.invoice_notes_line_1.class.should == OLE_QA::Framework::OLEFS::Invoice_Notes_Line
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
it 'should remove sublines' do
|
|
101
|
+
@preq_line_item.remove_accounting_line(1)
|
|
102
|
+
@preq_line_item.methods.include?(:accounting_line_1).should be_false
|
|
103
|
+
@preq_line_item.remove_invoice_notes_line(1)
|
|
104
|
+
@preq_line_item.methods.include?(:invoice_notes_line_1).should be_false
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
it 'should not remove sublines which do not exist' do
|
|
108
|
+
lambda {@preq_line_item.remove_accounting_line(1)}.should raise_error
|
|
109
|
+
lambda {@preq_line_item.remove_invoice_notes_line(1)}.should raise_error
|
|
110
|
+
end
|
|
111
|
+
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
|
+
require 'rspec'
|
|
16
|
+
require 'spec_helper'
|
|
17
|
+
|
|
18
|
+
describe 'An OLEFS Processing Line object' do
|
|
19
|
+
|
|
20
|
+
before :all do
|
|
21
|
+
@ole = OLE_QA::Framework::Session.new
|
|
22
|
+
@browser = @ole.browser
|
|
23
|
+
@processing_line = OLE_QA::Framework::OLEFS::Processing_Line.new(@ole, 1, 1)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
after :all do
|
|
27
|
+
@ole.quit
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
it 'should create a new instance' do
|
|
31
|
+
@processing_line.class.should == OLE_QA::Framework::OLEFS::Processing_Line
|
|
32
|
+
@processing_line.class.superclass.should == OLE_QA::Framework::Subline_Object
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
it 'should have a browser accessor' do
|
|
36
|
+
@processing_line.browser.class.should == @ole.browser.class
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
it 'should have processing line elements' do
|
|
40
|
+
methods = @processing_line.methods
|
|
41
|
+
methods.include?(:note_field).should be_true
|
|
42
|
+
methods.include?(:acknowledge_checkbox).should be_true
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
require 'rspec'
|
|
16
|
+
require 'spec_helper'
|
|
17
|
+
|
|
18
|
+
describe 'An OLEFS Purap Document page' do
|
|
19
|
+
|
|
20
|
+
before :all do
|
|
21
|
+
@ole = OLE_QA::Framework::Session.new
|
|
22
|
+
@purap_document = OLE_QA::Framework::OLEFS::PURAP_Document.new(@ole, @ole.base_url)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after :all do
|
|
26
|
+
@ole.quit
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
it 'should create a new instance' do
|
|
30
|
+
@purap_document.class.should == OLE_QA::Framework::OLEFS::PURAP_Document
|
|
31
|
+
@purap_document.class.superclass.should == OLE_QA::Framework::OLEFS::E_Doc
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
it 'should have PURAP document elements' do
|
|
35
|
+
elements = @purap_document.methods
|
|
36
|
+
elements.include?(:view_related_tab_toggle).should be_true
|
|
37
|
+
elements.include?(:view_related_po_link).should be_true
|
|
38
|
+
elements.include?(:view_related_requisition_link).should be_true
|
|
39
|
+
elements.include?(:delivery_tab_toggle).should be_true
|
|
40
|
+
elements.include?(:building_field).should be_true
|
|
41
|
+
elements.include?(:campus_field).should be_true
|
|
42
|
+
elements.include?(:closed_room_field).should be_true
|
|
43
|
+
elements.include?(:closed_building_field).should be_true
|
|
44
|
+
elements.include?(:closed_campus_field).should be_true
|
|
45
|
+
elements.include?(:closed_address_1_field).should be_true
|
|
46
|
+
elements.include?(:closed_address_2_field).should be_true
|
|
47
|
+
elements.include?(:closed_city_field).should be_true
|
|
48
|
+
elements.include?(:closed_state_field).should be_true
|
|
49
|
+
elements.include?(:closed_postal_code_field).should be_true
|
|
50
|
+
elements.include?(:closed_country_field).should be_true
|
|
51
|
+
elements.include?(:closed_delivery_to_field).should be_true
|
|
52
|
+
elements.include?(:closed_delivery_phone_number_field).should be_true
|
|
53
|
+
elements.include?(:closed_email_field).should be_true
|
|
54
|
+
elements.include?(:route_log_tab_toggle).should be_true
|
|
55
|
+
elements.include?(:vendor_tab_toggle).should be_true
|
|
56
|
+
elements.include?(:closed_vendor_name_field).should be_true
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
require 'rspec'
|
|
16
|
+
require 'spec_helper'
|
|
17
|
+
|
|
18
|
+
describe 'An OLEFS Purchase Order' do
|
|
19
|
+
|
|
20
|
+
before :all do
|
|
21
|
+
@ole = OLE_QA::Framework::Session.new
|
|
22
|
+
@purchase_order = OLE_QA::Framework::OLEFS::Purchase_Order.new(@ole)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after :all do
|
|
26
|
+
@ole.quit
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
it 'should create a new instance' do
|
|
30
|
+
@purchase_order.class.should == OLE_QA::Framework::OLEFS::Purchase_Order
|
|
31
|
+
@purchase_order.class.superclass.should == OLE_QA::Framework::OLEFS::PURAP_Document
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
it 'should have purchase order elements' do
|
|
35
|
+
elements = @purchase_order.methods
|
|
36
|
+
elements.include?(:additional_info_tab_toggle).should be_true
|
|
37
|
+
elements.include?(:additional_info_phone_number_field).should be_true
|
|
38
|
+
elements.include?(:delivery_tab_toggle).should be_true
|
|
39
|
+
elements.include?(:building_field).should be_true
|
|
40
|
+
elements.include?(:campus_field).should be_true
|
|
41
|
+
elements.include?(:room_field).should be_true
|
|
42
|
+
elements.include?(:building_search_icon).should be_true
|
|
43
|
+
elements.include?(:campus_search_icon).should be_true
|
|
44
|
+
elements.include?(:delivery_phone_number_field).should be_true
|
|
45
|
+
elements.include?(:vendor_tab_toggle).should be_true
|
|
46
|
+
elements.include?(:vendor_name_field).should be_true
|
|
47
|
+
elements.include?(:closed_vendor_name_field).should be_true
|
|
48
|
+
elements.include?(:vendor_search_icon).should be_true
|
|
49
|
+
elements.include?(:grand_total_field).should be_true
|
|
50
|
+
elements.include?(:sensitive_data_button).should be_true
|
|
51
|
+
elements.include?(:payment_hold_button).should be_true
|
|
52
|
+
elements.include?(:amend_button).should be_true
|
|
53
|
+
elements.include?(:void_order_button).should be_true
|
|
54
|
+
elements.include?(:receiving_button).should be_true
|
|
55
|
+
elements.include?(:print_button).should be_true
|
|
56
|
+
elements.include?(:send_ad_hoc_button).should be_true
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
it 'should have a new line item' do
|
|
60
|
+
@purchase_order.new_line_item.class.should == OLE_QA::Framework::OLEFS::New_Line_Item
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
it 'should create a line item' do
|
|
64
|
+
@purchase_order.create_line_item(1)
|
|
65
|
+
@purchase_order.methods.include?(:line_item_1).should be_true
|
|
66
|
+
@purchase_order.line_item_1.class.should == OLE_QA::Framework::OLEFS::Line_Item
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
it 'should delete a line item' do
|
|
70
|
+
@purchase_order.remove_line_item(1)
|
|
71
|
+
@purchase_order.methods.include?(:line_item_1).should be_false
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
it 'should not delete a line item which does not exist' do
|
|
75
|
+
lambda {@purchase_order.remove_line_item(1)}.should raise_error
|
|
76
|
+
end
|
|
77
|
+
end
|