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,75 @@
|
|
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
|
+
|
16
|
+
require 'rspec'
|
17
|
+
require 'spec_helper'
|
18
|
+
|
19
|
+
|
20
|
+
describe 'An OLEFS E-Document' do
|
21
|
+
|
22
|
+
before :all do
|
23
|
+
@ole = OLE_QA::Framework::Session.new
|
24
|
+
@edoc = OLE_QA::Framework::OLEFS::E_Doc.new(@ole,@ole.base_url)
|
25
|
+
end
|
26
|
+
|
27
|
+
after :all do
|
28
|
+
@ole.quit
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'should create a new instance' do
|
32
|
+
@edoc.class.should == OLE_QA::Framework::OLEFS::E_Doc
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'should be a page' do
|
36
|
+
@edoc.class.superclass.should == OLE_QA::Framework::Page
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'should have E-document elements' do
|
40
|
+
elements = @edoc.methods
|
41
|
+
# General Info
|
42
|
+
elements.include?(:title).should be_true
|
43
|
+
# Header Area
|
44
|
+
elements.include?(:document_id).should be_true
|
45
|
+
elements.include?(:document_status).should be_true
|
46
|
+
elements.include?(:document_type_id).should be_true
|
47
|
+
elements.include?(:document_type_status).should be_true
|
48
|
+
elements.include?(:document_create_date).should be_true
|
49
|
+
# Document Overview
|
50
|
+
elements.include?(:document_overview_tab_toggle).should be_true
|
51
|
+
elements.include?(:description_field).should be_true
|
52
|
+
elements.include?(:explanation_field).should be_true
|
53
|
+
# Global Input Buttons
|
54
|
+
elements.include?(:approve_button).should be_true
|
55
|
+
elements.include?(:save_button).should be_true
|
56
|
+
elements.include?(:submit_button).should be_true
|
57
|
+
elements.include?(:calculate_button).should be_true
|
58
|
+
elements.include?(:close_button).should be_true
|
59
|
+
elements.include?(:cancel_button).should be_true
|
60
|
+
elements.include?(:copy_button).should be_true
|
61
|
+
# Confirmation Screen Buttons
|
62
|
+
elements.include?(:close_yes_button).should be_true
|
63
|
+
elements.include?(:close_no_button).should be_true
|
64
|
+
elements.include?(:cancel_yes_button).should be_true
|
65
|
+
elements.include?(:cancel_no_button).should be_true
|
66
|
+
# Messages
|
67
|
+
elements.include?(:save_message).should be_true
|
68
|
+
elements.include?(:submit_message).should be_true
|
69
|
+
elements.include?(:error_message).should be_true
|
70
|
+
elements.include?(:generic_message).should be_true
|
71
|
+
# Multiple Error Message Components Watir::HTMLElementCollection
|
72
|
+
elements.include?(:errors_in_tab).should be_true
|
73
|
+
elements.include?(:get_error_array).should be_true
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,52 @@
|
|
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 Exception Notes Line object' do
|
19
|
+
|
20
|
+
before :all do
|
21
|
+
@ole = OLE_QA::Framework::Session.new
|
22
|
+
@browser = @ole.browser
|
23
|
+
@exception_notes_line = OLE_QA::Framework::OLEFS::Exception_Notes_Line.new(@ole, 1, 1)
|
24
|
+
@new_exception_notes_line = OLE_QA::Framework::OLEFS::New_Exception_Notes_Line.new(@ole, 1, 0)
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'should create a new instance' do
|
28
|
+
@exception_notes_line.class.should == OLE_QA::Framework::OLEFS::Exception_Notes_Line
|
29
|
+
@exception_notes_line.class.superclass.should == OLE_QA::Framework::Subline_Object
|
30
|
+
@new_exception_notes_line.class.should == OLE_QA::Framework::OLEFS::New_Exception_Notes_Line
|
31
|
+
@new_exception_notes_line.class.superclass.should == OLE_QA::Framework::Subline_Object
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'should have a browser accessor' do
|
35
|
+
@exception_notes_line.browser.class.should == @ole.browser.class
|
36
|
+
@new_exception_notes_line.browser.class.should == @ole.browser.class
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'should have exception notes elements' do
|
40
|
+
methods = @exception_notes_line.methods
|
41
|
+
methods.include?(:exception_type_selector).should be_true
|
42
|
+
methods.include?(:note_field).should be_true
|
43
|
+
methods.include?(:note_type_selector).should be_true
|
44
|
+
end
|
45
|
+
|
46
|
+
it 'should have new exception notes elements' do
|
47
|
+
elements = @new_exception_notes_line.methods
|
48
|
+
elements.include?(:exception_type_selector).should be_true
|
49
|
+
elements.include?(:note_field).should be_true
|
50
|
+
elements.include?(:note_type_selector).should be_true
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,45 @@
|
|
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 Invoice Notes Line object' do
|
19
|
+
|
20
|
+
before :all do
|
21
|
+
@ole = OLE_QA::Framework::Session.new
|
22
|
+
@browser = @ole.browser
|
23
|
+
@invoice_notes = OLE_QA::Framework::OLEFS::Invoice_Notes_Line.new(@ole, 1, 1)
|
24
|
+
@new_invoice_notes = OLE_QA::Framework::OLEFS::New_Invoice_Notes_Line.new(@ole, 1, 0)
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'should create a new instance' do
|
28
|
+
@invoice_notes.class.should == OLE_QA::Framework::OLEFS::Invoice_Notes_Line
|
29
|
+
@invoice_notes.class.superclass.should == OLE_QA::Framework::Subline_Object
|
30
|
+
@new_invoice_notes.class.should == OLE_QA::Framework::OLEFS::New_Invoice_Notes_Line
|
31
|
+
@new_invoice_notes.class.superclass.should == OLE_QA::Framework::Subline_Object
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'should have invoice notes line elements' do
|
35
|
+
methods = @invoice_notes.methods
|
36
|
+
methods.include?(:note_field).should be_true
|
37
|
+
methods.include?(:delete_button).should be_true
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'should have new invoice notes line elements' do
|
41
|
+
methods = @new_invoice_notes.methods
|
42
|
+
methods.include?(:note_field).should be_true
|
43
|
+
methods.include?(:add_button).should be_true
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,155 @@
|
|
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
|
+
|
19
|
+
describe 'An OLEFS line item' do
|
20
|
+
|
21
|
+
before :all do
|
22
|
+
@ole = OLE_QA::Framework::Session.new
|
23
|
+
@line_number = 1
|
24
|
+
@line_item = OLE_QA::Framework::OLEFS::Line_Item.new(@ole, @line_number)
|
25
|
+
@new_line_item = OLE_QA::Framework::OLEFS::New_Line_Item.new(@ole, @line_number)
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'should should create a new instance' do
|
29
|
+
@line_item.class.should == OLE_QA::Framework::OLEFS::Line_Item
|
30
|
+
@new_line_item.class.should == OLE_QA::Framework::OLEFS::New_Line_Item
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'should be a subclass of Line Object' do
|
34
|
+
@line_item.class.superclass.should == OLE_QA::Framework::OLEFS::Line_Object
|
35
|
+
@new_line_item.class.superclass.should == OLE_QA::Framework::OLEFS::Line_Object
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'should have a browser accessor' do
|
39
|
+
@line_item.browser.class.should == @ole.browser.class
|
40
|
+
@new_line_item.browser.class.should == @ole.browser.class
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'should have line number attributes' do
|
44
|
+
@line_item.line_number.should == 1
|
45
|
+
@new_line_item.line_number.should == 0
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'should have line item elements' do
|
49
|
+
methods_array = @line_item.methods
|
50
|
+
methods_array.include?(:copies_field).should be_true
|
51
|
+
methods_array.include?(:parts_field).should be_true
|
52
|
+
methods_array.include?(:list_price_field).should be_true
|
53
|
+
methods_array.include?(:discount_field).should be_true
|
54
|
+
methods_array.include?(:item_price_source_selector).should be_true
|
55
|
+
methods_array.include?(:request_source_selector).should be_true
|
56
|
+
methods_array.include?(:item_type_selector).should be_true
|
57
|
+
methods_array.include?(:format_selector).should be_true
|
58
|
+
methods_array.include?(:category_selector).should be_true
|
59
|
+
methods_array.include?(:discount_type_selector).should be_true
|
60
|
+
methods_array.include?(:delete_button).should be_true
|
61
|
+
methods_array.include?(:route_to_requestor_checkbox).should be_true
|
62
|
+
methods_array.include?(:public_view_checkbox).should be_true
|
63
|
+
methods_array.include?(:accounting_lines_toggle).should be_true
|
64
|
+
methods_array.include?(:description_field).should be_true
|
65
|
+
methods_array.include?(:item_type_field).should be_true
|
66
|
+
methods_array.include?(:extended_cost_field).should be_true
|
67
|
+
methods_array.include?(:receipt_status_field).should be_true
|
68
|
+
methods_array.include?(:closed_description_field).should be_true
|
69
|
+
methods_array.include?(:closed_item_type_field).should be_true
|
70
|
+
methods_array.include?(:closed_extended_cost_field).should be_true
|
71
|
+
methods_array.include?(:closed_list_price_field).should be_true
|
72
|
+
methods_array.include?(:closed_copies_field).should be_true
|
73
|
+
methods_array.include?(:closed_parts_field).should be_true
|
74
|
+
methods_array.include?(:closed_receipt_status_field).should be_true
|
75
|
+
methods_array.include?(:closed_copies_received_field).should be_true
|
76
|
+
methods_array.include?(:closed_parts_received_field).should be_true
|
77
|
+
methods_array.include?(:closed_item_price_source_field).should be_true
|
78
|
+
methods_array.include?(:closed_request_source_field).should be_true
|
79
|
+
methods_array.include?(:closed_format_field).should be_true
|
80
|
+
methods_array.include?(:closed_category_field).should be_true
|
81
|
+
methods_array.include?(:closed_vendor_item_id_field).should be_true
|
82
|
+
methods_array.include?(:closed_requestor_field).should be_true
|
83
|
+
methods_array.include?(:closed_route_to_requestor_field).should be_true
|
84
|
+
methods_array.include?(:closed_unit_cost_field).should be_true
|
85
|
+
methods_array.include?(:closed_discount_field).should be_true
|
86
|
+
methods_array.include?(:closed_discount_type_field).should be_true
|
87
|
+
#TODO add the methods below when OLE-4329 is fixed.
|
88
|
+
# methods_array.include?(:notes_toggle).should be_true
|
89
|
+
# methods_array.include(:copies_toggle).should be_true
|
90
|
+
end
|
91
|
+
|
92
|
+
it 'should have subline objects' do
|
93
|
+
methods = @line_item.methods
|
94
|
+
methods.include?(:new_accounting_line).should be_true
|
95
|
+
methods.include?(:new_notes_line).should be_true
|
96
|
+
methods.include?(:new_copies_line).should be_true
|
97
|
+
end
|
98
|
+
|
99
|
+
it 'should have new line item elements' do
|
100
|
+
elements = @new_line_item.methods
|
101
|
+
elements.include?(:new_bib_button).should be_true
|
102
|
+
elements.include?(:item_type_selector).should be_true
|
103
|
+
elements.include?(:copies_field).should be_true
|
104
|
+
elements.include?(:parts_field).should be_true
|
105
|
+
elements.include?(:list_price_field).should be_true
|
106
|
+
elements.include?(:public_view_checkbox).should be_true
|
107
|
+
elements.include?(:item_price_source_selector).should be_true
|
108
|
+
elements.include?(:request_source_selector).should be_true
|
109
|
+
elements.include?(:format_selector).should be_true
|
110
|
+
elements.include?(:category_selector).should be_true
|
111
|
+
elements.include?(:route_to_requestor_checkbox).should be_true
|
112
|
+
elements.include?(:discount_field).should be_true
|
113
|
+
elements.include?(:discount_type_selector).should be_true
|
114
|
+
elements.include?(:add_button).should be_true
|
115
|
+
end
|
116
|
+
|
117
|
+
it 'should create an accounting line' do
|
118
|
+
@line_item.create_accounting_line(1)
|
119
|
+
@line_item.methods.include?(:accounting_line_1).should be_true
|
120
|
+
@line_item.accounting_line_1.class.should == OLE_QA::Framework::OLEFS::Accounting_Line
|
121
|
+
end
|
122
|
+
|
123
|
+
it 'should create a notes line' do
|
124
|
+
@line_item.create_notes_line(1)
|
125
|
+
@line_item.methods.include?(:notes_line_1).should be_true
|
126
|
+
@line_item.notes_line_1.class.should == OLE_QA::Framework::OLEFS::Notes_Line
|
127
|
+
end
|
128
|
+
|
129
|
+
it 'should create a copies line' do
|
130
|
+
@line_item.create_copies_line(1)
|
131
|
+
@line_item.methods.include?(:copies_line_1).should be_true
|
132
|
+
@line_item.copies_line_1.class.should == OLE_QA::Framework::OLEFS::Copies_Line
|
133
|
+
end
|
134
|
+
|
135
|
+
it 'should remove an accounting line' do
|
136
|
+
@line_item.remove_accounting_line(1)
|
137
|
+
@line_item.methods.include?(:accounting_line_1).should be_false
|
138
|
+
end
|
139
|
+
|
140
|
+
it 'should remove a notes line' do
|
141
|
+
@line_item.remove_notes_line(1)
|
142
|
+
@line_item.methods.include?(:notes_line_1).should be_false
|
143
|
+
end
|
144
|
+
|
145
|
+
it 'should remove a copies line' do
|
146
|
+
@line_item.remove_copies_line(1)
|
147
|
+
@line_item.methods.include?(:copies_line_1).should be_false
|
148
|
+
end
|
149
|
+
|
150
|
+
it 'should raise an error when asked to remove a subline which does not exist' do
|
151
|
+
lambda {@line_item.remove_accounting_line(1)}.should raise_error
|
152
|
+
lambda {@line_item.remove_notes_line(1)}.should raise_error
|
153
|
+
lambda {@line_item.remove_copies_line(1)}.should raise_error
|
154
|
+
end
|
155
|
+
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 Lookup page' do
|
19
|
+
|
20
|
+
before :all do
|
21
|
+
@ole = OLE_QA::Framework::Session.new
|
22
|
+
@lookup = OLE_QA::Framework::OLEFS::Lookup.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
|
+
@lookup.class.should == OLE_QA::Framework::OLEFS::Lookup
|
31
|
+
@lookup.class.superclass.should == OLE_QA::Framework::Page
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'should have lookup page screen elements' do
|
35
|
+
methods = @lookup.methods
|
36
|
+
methods.include?(:title).should be_true
|
37
|
+
methods.include?(:active_indicator_yes).should be_true
|
38
|
+
methods.include?(:active_indicator_no).should be_true
|
39
|
+
methods.include?(:active_indicator_both).should be_true
|
40
|
+
methods.include?(:search_button).should be_true
|
41
|
+
methods.include?(:clear_button).should be_true
|
42
|
+
methods.include?(:cancel_button).should be_true
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,34 @@
|
|
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
|
+
|
19
|
+
describe "The OLEFS Main Menu" do
|
20
|
+
|
21
|
+
before :all do
|
22
|
+
@ole = OLE_QA::Framework::Session.new
|
23
|
+
@main_menu = OLE_QA::Framework::OLEFS::Main_Menu.new(@ole)
|
24
|
+
end
|
25
|
+
|
26
|
+
after :all do
|
27
|
+
@ole.quit
|
28
|
+
end
|
29
|
+
|
30
|
+
it "should open via url" do
|
31
|
+
@main_menu.open
|
32
|
+
@ole.browser.title.strip.should == "Kuali Portal Index"
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,65 @@
|
|
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 notes line' do
|
19
|
+
|
20
|
+
before :all do
|
21
|
+
@ole = OLE_QA::Framework::Session.new
|
22
|
+
@notes_line = OLE_QA::Framework::OLEFS::Notes_Line.new(@ole, 1, 1)
|
23
|
+
@new_notes_line = OLE_QA::Framework::OLEFS::New_Notes_Line.new(@ole, 1, 0)
|
24
|
+
end
|
25
|
+
|
26
|
+
after :all do
|
27
|
+
@ole.quit
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'should create a new instance' do
|
31
|
+
@notes_line.class.should == OLE_QA::Framework::OLEFS::Notes_Line
|
32
|
+
@new_notes_line.class.should == OLE_QA::Framework::OLEFS::New_Notes_Line
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'should be a subclass of subline object' do
|
36
|
+
@notes_line.class.superclass.should == OLE_QA::Framework::Subline_Object
|
37
|
+
@new_notes_line.class.superclass.should == OLE_QA::Framework::Subline_Object
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'should have a browser accessor' do
|
41
|
+
@notes_line.browser.class.should == @ole.browser.class
|
42
|
+
@new_notes_line.browser.class.should == @ole.browser.class
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'should have line number attributes' do
|
46
|
+
@notes_line.line_number.should == 1
|
47
|
+
@notes_line.subline_number.should == 1
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'should have notes line elements' do
|
51
|
+
methods_array = @notes_line.methods
|
52
|
+
methods_array.include?(:note_type_selector).should be_true
|
53
|
+
methods_array.include?(:note_field).should be_true
|
54
|
+
methods_array.include?(:delete_button).should be_true
|
55
|
+
methods_array.include?(:closed_note_type_field).should be_true
|
56
|
+
methods_array.include?(:closed_note_field).should be_true
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'should have new notes line elements' do
|
60
|
+
elements = @new_notes_line.methods
|
61
|
+
elements.include?(:note_type_selector).should be_true
|
62
|
+
elements.include?(:note_field).should be_true
|
63
|
+
elements.include?(:add_button).should be_true
|
64
|
+
end
|
65
|
+
end
|