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.
Files changed (123) hide show
  1. data/CHANGELOG.md +882 -0
  2. data/Gemfile +4 -0
  3. data/Gemfile.lock +45 -0
  4. data/LICENSE.md +14 -0
  5. data/README.md +17 -0
  6. data/Rakefile.rb +25 -0
  7. data/examples/README.md +57 -0
  8. data/examples/create_bib_record.rb +64 -0
  9. data/examples/create_requisition.rb +96 -0
  10. data/examples/purap_workflow_test.rb +185 -0
  11. data/lib/common/common_object.rb +57 -0
  12. data/lib/common/data_object.rb +21 -0
  13. data/lib/common/line_object.rb +44 -0
  14. data/lib/common/page.rb +72 -0
  15. data/lib/common/subline_object.rb +47 -0
  16. data/lib/config/default_options.yml +7 -0
  17. data/lib/docstore/docstore.rb +13 -0
  18. data/lib/module/qa_data_helpers.rb +17 -0
  19. data/lib/module/qa_helpers.rb +153 -0
  20. data/lib/module/qa_page_helpers.rb +33 -0
  21. data/lib/ole-qa-framework.rb +178 -0
  22. data/lib/ole_qa_framework/COMPATIBILITY.rb +20 -0
  23. data/lib/ole_qa_framework/VERSION.rb +20 -0
  24. data/lib/olefs/common/e_doc.rb +79 -0
  25. data/lib/olefs/common/line_object.rb +39 -0
  26. data/lib/olefs/common/lookup.rb +30 -0
  27. data/lib/olefs/common/purap_document.rb +73 -0
  28. data/lib/olefs/objects/line_item.rb +105 -0
  29. data/lib/olefs/objects/new_line_item.rb +44 -0
  30. data/lib/olefs/objects/new_preq_line_item.rb +43 -0
  31. data/lib/olefs/objects/new_receiving_line.rb +42 -0
  32. data/lib/olefs/objects/preq_line_item.rb +68 -0
  33. data/lib/olefs/objects/receiving_line.rb +88 -0
  34. data/lib/olefs/pages/building_lookup.rb +36 -0
  35. data/lib/olefs/pages/main_menu.rb +23 -0
  36. data/lib/olefs/pages/payment_request.rb +67 -0
  37. data/lib/olefs/pages/payment_request_creation.rb +44 -0
  38. data/lib/olefs/pages/purchase_order.rb +68 -0
  39. data/lib/olefs/pages/receiving_document.rb +49 -0
  40. data/lib/olefs/pages/requisition.rb +61 -0
  41. data/lib/olefs/pages/vendor_lookup.rb +40 -0
  42. data/lib/olefs/subobjects/accounting_line.rb +46 -0
  43. data/lib/olefs/subobjects/copies_line.rb +32 -0
  44. data/lib/olefs/subobjects/exception_notes_line.rb +26 -0
  45. data/lib/olefs/subobjects/invoice_notes_line.rb +25 -0
  46. data/lib/olefs/subobjects/new_accounting_line.rb +43 -0
  47. data/lib/olefs/subobjects/new_copies_line.rb +37 -0
  48. data/lib/olefs/subobjects/new_exception_notes_line.rb +30 -0
  49. data/lib/olefs/subobjects/new_invoice_notes_line.rb +35 -0
  50. data/lib/olefs/subobjects/new_notes_line.rb +36 -0
  51. data/lib/olefs/subobjects/new_receipt_notes_line.rb +35 -0
  52. data/lib/olefs/subobjects/notes_line.rb +29 -0
  53. data/lib/olefs/subobjects/processing_line.rb +24 -0
  54. data/lib/olefs/subobjects/receipt_notes_line.rb +25 -0
  55. data/lib/olels/common/e_doc.rb +23 -0
  56. data/lib/olels/common/editor.rb +92 -0
  57. data/lib/olels/common/line_object.rb +39 -0
  58. data/lib/olels/common/lookup.rb +30 -0
  59. data/lib/olels/objects/access_info_line.rb +25 -0
  60. data/lib/olels/objects/data_line.rb +31 -0
  61. data/lib/olels/objects/editor_note.rb +79 -0
  62. data/lib/olels/objects/holdings_note.rb +26 -0
  63. data/lib/olels/objects/item_note.rb +26 -0
  64. data/lib/olels/objects/ownership_extent_line.rb +40 -0
  65. data/lib/olels/pages/bib_editor.rb +63 -0
  66. data/lib/olels/pages/describe_workbench.rb +42 -0
  67. data/lib/olels/pages/instance_editor.rb +80 -0
  68. data/lib/olels/pages/item_editor.rb +91 -0
  69. data/lib/olels/pages/loan.rb +102 -0
  70. data/lib/olels/pages/main_menu.rb +31 -0
  71. data/lib/olels/pages/patron_lookup.rb +44 -0
  72. data/lib/olels/pages/return.rb +64 -0
  73. data/lib/olels/subobjects/ownership_note.rb +26 -0
  74. data/ole-qa-framework.gemspec +30 -0
  75. data/pkg/ole-qa-framework-2.1.0.gem +0 -0
  76. data/spec/common/browser_spec.rb +37 -0
  77. data/spec/common/data_object_spec.rb +37 -0
  78. data/spec/common/line_object_spec.rb +49 -0
  79. data/spec/common/page_spec.rb +44 -0
  80. data/spec/common/subline_object_spec.rb +54 -0
  81. data/spec/modules/qa_helpers_spec.rb +55 -0
  82. data/spec/modules/qa_page_helpers_spec.rb +43 -0
  83. data/spec/olefs/accounting_line_spec.rb +85 -0
  84. data/spec/olefs/building_lookup_spec.rb +45 -0
  85. data/spec/olefs/copies_line_spec.rb +70 -0
  86. data/spec/olefs/edocs_spec.rb +75 -0
  87. data/spec/olefs/exception_notes_line_spec.rb +52 -0
  88. data/spec/olefs/invoice_notes_line_spec.rb +45 -0
  89. data/spec/olefs/line_item_spec.rb +155 -0
  90. data/spec/olefs/lookup_spec.rb +44 -0
  91. data/spec/olefs/main_menu_spec.rb +34 -0
  92. data/spec/olefs/notes_line_spec.rb +65 -0
  93. data/spec/olefs/patron_lookup_spec.rb +54 -0
  94. data/spec/olefs/payment_request_spec.rb +85 -0
  95. data/spec/olefs/preq_creation_spec.rb +43 -0
  96. data/spec/olefs/preq_line_item_spec.rb +111 -0
  97. data/spec/olefs/processing_line_spec.rb +44 -0
  98. data/spec/olefs/purap_document_spec.rb +58 -0
  99. data/spec/olefs/purchase_order_spec.rb +77 -0
  100. data/spec/olefs/receipt_notes_line_spec.rb +54 -0
  101. data/spec/olefs/receive_spec.rb +66 -0
  102. data/spec/olefs/receiving_line_spec.rb +125 -0
  103. data/spec/olefs/requisition_spec.rb +83 -0
  104. data/spec/olefs/vendor_lookup_spec.rb +49 -0
  105. data/spec/olels/access_info_line_spec.rb +40 -0
  106. data/spec/olels/bib_editor_spec.rb +84 -0
  107. data/spec/olels/data_line_spec.rb +44 -0
  108. data/spec/olels/describe_workbench_spec.rb +44 -0
  109. data/spec/olels/editor_spec.rb +56 -0
  110. data/spec/olels/edocs_spec.rb +42 -0
  111. data/spec/olels/holdings_note_spec_spec.rb +41 -0
  112. data/spec/olels/instance_editor_spec.rb +81 -0
  113. data/spec/olels/item_editor_spec.rb +94 -0
  114. data/spec/olels/item_note_spec.rb +41 -0
  115. data/spec/olels/loan_spec.rb +104 -0
  116. data/spec/olels/lookup_spec.rb +38 -0
  117. data/spec/olels/main_menu_spec.rb +35 -0
  118. data/spec/olels/ownership_extent_line_spec.rb +58 -0
  119. data/spec/olels/ownership_note_spec.rb +41 -0
  120. data/spec/olels/return_spec.rb +72 -0
  121. data/spec/spec_helper.rb +21 -0
  122. data/spec/workflows/purap_spec.rb +221 -0
  123. 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 'An OLEFS Receipt Notes Line object' do
19
+
20
+ before :all do
21
+ @ole = OLE_QA::Framework::Session.new
22
+ @browser = @ole.browser
23
+ @receipt_notes_line = OLE_QA::Framework::OLEFS::Receipt_Notes_Line.new(@ole, 1, 1)
24
+ @new_receipt_notes_line = OLE_QA::Framework::OLEFS::New_Receipt_Notes_Line.new(@ole, 1, 0)
25
+ end
26
+
27
+ after :all do
28
+ @ole.quit
29
+ end
30
+
31
+ it 'should create a new instance' do
32
+ @receipt_notes_line.class.should == OLE_QA::Framework::OLEFS::Receipt_Notes_Line
33
+ @receipt_notes_line.class.superclass.should == OLE_QA::Framework::Subline_Object
34
+ @new_receipt_notes_line.class.should == OLE_QA::Framework::OLEFS::New_Receipt_Notes_Line
35
+ @new_receipt_notes_line.class.superclass.should == OLE_QA::Framework::Subline_Object
36
+ end
37
+
38
+ it 'should have a browser accessor' do
39
+ @receipt_notes_line.browser.class.should == @ole.browser.class
40
+ @new_receipt_notes_line.browser.class.should == @ole.browser.class
41
+ end
42
+
43
+ it 'should have receipt notes elements' do
44
+ methods = @receipt_notes_line.methods
45
+ methods.include?(:note_type_selector).should be_true
46
+ methods.include?(:note_field).should be_true
47
+ end
48
+
49
+ it 'should have new receipt notes elements' do
50
+ methods = @new_receipt_notes_line.methods
51
+ methods.include?(:note_type_selector).should be_true
52
+ methods.include?(:note_field).should be_true
53
+ end
54
+ end
@@ -0,0 +1,66 @@
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 Receiving Document page' do
19
+
20
+ before :all do
21
+ @ole = OLE_QA::Framework::Session.new
22
+ @rcv = OLE_QA::Framework::OLEFS::Receiving_Document.new(@ole)
23
+ end
24
+
25
+ after :all do
26
+ @ole.quit
27
+ end
28
+
29
+ it 'should create a new instance' do
30
+ @rcv.class.should == OLE_QA::Framework::OLEFS::Receiving_Document
31
+ @rcv.class.superclass.should == OLE_QA::Framework::OLEFS::PURAP_Document
32
+ end
33
+
34
+ it 'should open a new receiving document via URL' do
35
+ @rcv.open
36
+ @rcv.title.text.strip.should == "Line Item Receiving"
37
+ end
38
+
39
+ it 'should have receiving document elements' do
40
+ elements = @rcv.methods
41
+ elements.include?(:date_received_field).should be_true
42
+ elements.include?(:packing_slip_number_field).should be_true
43
+ elements.include?(:bill_of_lading_number_field).should be_true
44
+ elements.include?(:reference_number_field).should be_true
45
+ elements.include?(:carrier_selector).should be_true
46
+ end
47
+
48
+ it 'should have a new receiving line' do
49
+ @rcv.new_receiving_line.class.should == OLE_QA::Framework::OLEFS::New_Receiving_Line
50
+ end
51
+
52
+ it 'should create a receiving line' do
53
+ @rcv.create_receiving_line(1)
54
+ @rcv.methods.include?(:receiving_line_1).should be_true
55
+ @rcv.receiving_line_1.class.should == OLE_QA::Framework::OLEFS::Receiving_Line
56
+ end
57
+
58
+ it 'should delete a receiving line' do
59
+ @rcv.remove_receiving_line(1)
60
+ @rcv.methods.include?(:receiving_line_1).should be_false
61
+ end
62
+
63
+ it 'should not delete a receiving line which does not exist' do
64
+ lambda {@rcv.remove_receiving_line(1)}.should raise_error
65
+ end
66
+ end
@@ -0,0 +1,125 @@
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 Receiving Line object' do
19
+
20
+ before :all do
21
+ @ole = OLE_QA::Framework::Session.new
22
+ @browser = @ole.browser
23
+ @line_number = 1
24
+ @rcv_line = OLE_QA::Framework::OLEFS::Receiving_Line.new(@ole, @line_number)
25
+ @new_rcv_line = OLE_QA::Framework::OLEFS::New_Receiving_Line.new(@ole, @line_number)
26
+ end
27
+
28
+ after :all do
29
+ @ole.quit
30
+ end
31
+
32
+ it 'should create a new instance' do
33
+ @rcv_line.class.should == OLE_QA::Framework::OLEFS::Receiving_Line
34
+ @rcv_line.class.superclass.should == OLE_QA::Framework::OLEFS::Line_Object
35
+ @new_rcv_line.class.should == OLE_QA::Framework::OLEFS::New_Receiving_Line
36
+ @new_rcv_line.class.superclass.should == OLE_QA::Framework::OLEFS::Line_Object
37
+ end
38
+
39
+ it 'should have a browser accessor' do
40
+ @rcv_line.browser.class.should == @ole.browser.class
41
+ @new_rcv_line.browser.class.should == @ole.browser.class
42
+ end
43
+
44
+ it 'should have a line number' do
45
+ @rcv_line.line_number.should == 1
46
+ @new_rcv_line.line_number.should == 0
47
+ end
48
+
49
+ it 'should have receiving line elements' do
50
+ methods = @rcv_line.methods
51
+ methods.include?(:description_field).should be_true
52
+ methods.include?(:quantity_ordered_field).should be_true
53
+ methods.include?(:parts_ordered_field).should be_true
54
+ methods.include?(:prior_quantity_received_field).should be_true
55
+ methods.include?(:prior_parts_received_field).should be_true
56
+ methods.include?(:quantity_to_be_received_field).should be_true
57
+ methods.include?(:parts_to_be_received_field).should be_true
58
+ methods.include?(:item_received_quantity_field).should be_true
59
+ methods.include?(:item_received_parts_field).should be_true
60
+ methods.include?(:item_returned_quantity_field).should be_true
61
+ methods.include?(:item_returned_parts_field).should be_true
62
+ methods.include?(:item_damaged_quantity_field).should be_true
63
+ methods.include?(:item_damaged_parts_field).should be_true
64
+ methods.include?(:available_to_public_checkbox).should be_true
65
+ methods.include?(:public_view_checkbox).should be_true
66
+ methods.include?(:exception_notes_toggle).should be_true
67
+ methods.include?(:receipt_notes_toggle).should be_true
68
+ methods.include?(:special_processing_instructions_toggle).should be_true
69
+ end
70
+
71
+ it 'should have subline objects' do
72
+ @rcv_line.methods.include?(:new_exception_notes_line).should be_true
73
+ @rcv_line.methods.include?(:new_receipt_notes_line).should be_true
74
+ @rcv_line.methods.include?(:new_copies_line).should be_true
75
+ end
76
+
77
+ it 'should add sublines' do
78
+ @rcv_line.create_exception_notes_line(1)
79
+ @rcv_line.methods.include?(:exception_notes_line_1).should be_true
80
+ @rcv_line.exception_notes_line_1.class.should == OLE_QA::Framework::OLEFS::Exception_Notes_Line
81
+ @rcv_line.create_receipt_notes_line(1)
82
+ @rcv_line.methods.include?(:receipt_notes_line_1).should be_true
83
+ @rcv_line.receipt_notes_line_1.class.should == OLE_QA::Framework::OLEFS::Receipt_Notes_Line
84
+ @rcv_line.create_copies_line(1)
85
+ @rcv_line.methods.include?(:copies_line_1).should be_true
86
+ @rcv_line.copies_line_1.class.should == OLE_QA::Framework::OLEFS::Copies_Line
87
+ @rcv_line.create_processing_line(1)
88
+ @rcv_line.methods.include?(:processing_line_1).should be_true
89
+ @rcv_line.processing_line_1.class.should == OLE_QA::Framework::OLEFS::Processing_Line
90
+ end
91
+
92
+ it 'should remove sublines' do
93
+ @rcv_line.remove_exception_notes_line(1)
94
+ @rcv_line.remove_receipt_notes_line(1)
95
+ @rcv_line.remove_copies_line(1)
96
+ @rcv_line.remove_processing_line(1)
97
+ @rcv_line.methods.include?(:exception_notes_line_1).should be_false
98
+ @rcv_line.methods.include?(:receipt_notes_line_1).should be_false
99
+ @rcv_line.methods.include?(:copies_line_1).should be_false
100
+ @rcv_line.methods.include?(:processing_line_1).should be_false
101
+ end
102
+
103
+ it 'should raise an error when asked to remove sublines which do not exist' do
104
+ lambda {@rcv_line.remove_exception_notes_line(1)}.should raise_error
105
+ lambda {@rcv_line.remove_receipt_notes_line(1)}.should raise_error
106
+ lambda {@rcv_line.remove_copies_line(1)}.should raise_error
107
+ lambda {@rcv_line.remove_processing_line(1)}.should raise_error
108
+ end
109
+
110
+ it 'should have new receiving line elements' do
111
+ elements = @new_rcv_line.methods
112
+ elements.include?(:vendor_item_identifier_field).should be_true
113
+ elements.include?(:format_selector).should be_true
114
+ elements.include?(:item_received_quantity_field).should be_true
115
+ elements.include?(:item_received_parts_field).should be_true
116
+ elements.include?(:item_returned_quantity_field).should be_true
117
+ elements.include?(:item_returned_parts_field).should be_true
118
+ elements.include?(:item_damaged_quantity_field).should be_true
119
+ elements.include?(:item_damaged_parts_field).should be_true
120
+ elements.include?(:addition_reason_selector).should be_true
121
+ elements.include?(:available_to_public_checkbox).should be_true
122
+ elements.include?(:public_view_checkbox).should be_true
123
+ elements.include?(:new_bib_button).should be_true
124
+ end
125
+ end
@@ -0,0 +1,83 @@
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 'A purap_requisition document' do
21
+
22
+ before :all do
23
+ @ole = OLE_QA::Framework::Session.new
24
+ @req = OLE_QA::Framework::OLEFS::Requisition.new(@ole)
25
+ end
26
+
27
+ after :all do
28
+ @ole.quit
29
+ end
30
+
31
+ it 'should create a new instance' do
32
+ @req.class.should == OLE_QA::Framework::OLEFS::Requisition
33
+ end
34
+
35
+ it 'should be a subclass of an OLEFS E-Document' do
36
+ @req.class.superclass.should == OLE_QA::Framework::OLEFS::PURAP_Document
37
+ end
38
+
39
+ it 'should open a new purap_requisition via url' do
40
+ @req.open
41
+ @req.title.text.strip.should == "Requisition"
42
+ end
43
+
44
+ it 'should have requisition elements' do
45
+ elements = @req.methods
46
+ elements.include?(:license_request_checkbox).should be_true
47
+ elements.include?(:receiving_required_checkbox).should be_true
48
+ elements.include?(:payment_request_approval_required_checkbox).should be_true
49
+ elements.include?(:additional_info_tab_toggle).should be_true
50
+ elements.include?(:additional_info_phone_number_field).should be_true
51
+ elements.include?(:delivery_tab_toggle).should be_true
52
+ elements.include?(:building_field).should be_true
53
+ elements.include?(:campus_field).should be_true
54
+ elements.include?(:room_field).should be_true
55
+ elements.include?(:building_search_icon).should be_true
56
+ elements.include?(:campus_search_icon).should be_true
57
+ elements.include?(:delivery_phone_number_field).should be_true
58
+ elements.include?(:vendor_tab_toggle).should be_true
59
+ elements.include?(:vendor_name_field).should be_true
60
+ elements.include?(:closed_vendor_name_field).should be_true
61
+ elements.include?(:vendor_search_icon).should be_true
62
+ elements.include?(:grand_total_field).should be_true
63
+ end
64
+
65
+ it 'should have a new line item' do
66
+ @req.new_line_item.class.should == OLE_QA::Framework::OLEFS::New_Line_Item
67
+ end
68
+
69
+ it 'should create a line item' do
70
+ @req.create_line_item(1)
71
+ @req.methods.include?(:line_item_1).should be_true
72
+ @req.line_item_1.class.should == OLE_QA::Framework::OLEFS::Line_Item
73
+ end
74
+
75
+ it 'should delete a line item' do
76
+ @req.remove_line_item(1)
77
+ @req.methods.include?(:line_item_1).should be_false
78
+ end
79
+
80
+ it 'should not delete a line item which does not exist' do
81
+ lambda {@req.remove_line_item(1)}.should raise_error
82
+ end
83
+ end
@@ -0,0 +1,49 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'rspec'
16
+ require 'spec_helper'
17
+
18
+ describe 'An OLEFS Vendor Lookup page' do
19
+
20
+ before :all do
21
+ @ole = OLE_QA::Framework::Session.new
22
+ @vendor_lookup = OLE_QA::Framework::OLEFS::Vendor_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
+ @vendor_lookup.class.should == OLE_QA::Framework::OLEFS::Vendor_Lookup
31
+ @vendor_lookup.class.superclass.should == OLE_QA::Framework::OLEFS::Lookup
32
+ end
33
+
34
+ it 'should open via URL' do
35
+ @vendor_lookup.open
36
+ @vendor_lookup.title.text.strip.should == "Vendor Lookup"
37
+ end
38
+
39
+ it 'should have vendor lookup elements' do
40
+ methods = @vendor_lookup.methods
41
+ methods.include?(:vendor_name_field).should be_true
42
+ methods.include?(:tax_number_field).should be_true
43
+ methods.include?(:vendor_number_field).should be_true
44
+ methods.include?(:vendor_type_selector).should be_true
45
+ methods.include?(:state_field).should be_true
46
+ methods.include?(:commodity_code_field).should be_true
47
+ methods.include?(:supplier_diversity_selector).should be_true
48
+ end
49
+ end
@@ -0,0 +1,40 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'rspec'
16
+ require 'spec_helper'
17
+
18
+ describe 'An OLELS Access Info Line object' do
19
+
20
+ before :all do
21
+ @ole = OLE_QA::Framework::Session.new
22
+ @access_info = OLE_QA::Framework::OLELS::Access_Info_Line.new(@ole,1)
23
+ end
24
+
25
+ after :all do
26
+ @ole.quit
27
+ end
28
+
29
+ it 'should create a new instance' do
30
+ @access_info.class.should == OLE_QA::Framework::OLELS::Access_Info_Line
31
+ @access_info.class.superclass.should == OLE_QA::Framework::OLELS::Line_Object
32
+ end
33
+
34
+ it 'should have access info elements' do
35
+ elements = @access_info.methods
36
+ elements.include?(:access_info_field).should be_true
37
+ elements.include?(:add_button).should be_true
38
+ elements.include?(:remove_button).should be_true
39
+ end
40
+ end
@@ -0,0 +1,84 @@
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 'The Bib Editor' do
19
+
20
+ before :all do
21
+ @ole = OLE_QA::Framework::Session.new
22
+ @browser = @ole.browser
23
+ @bib_editor = OLE_QA::Framework::OLELS::Bib_Editor.new(@ole)
24
+ end
25
+
26
+ after :all do
27
+ @ole.quit
28
+ end
29
+
30
+ it 'should create a new instance' do
31
+ @bib_editor.class.should == OLE_QA::Framework::OLELS::Bib_Editor
32
+ @bib_editor.class.superclass.should == OLE_QA::Framework::OLELS::Editor
33
+ end
34
+
35
+ it 'should have bib editor elements' do
36
+ elements = @bib_editor.methods
37
+ elements.include?(:leader_field).should be_true
38
+ elements.include?(:bib_record_status_selector).should be_true
39
+ elements.include?(:set_button).should be_true
40
+ elements.include?(:control_003_link).should be_true
41
+ elements.include?(:control_005_link).should be_true
42
+ elements.include?(:control_006_link).should be_true
43
+ elements.include?(:control_007_link).should be_true
44
+ elements.include?(:control_008_link).should be_true
45
+ elements.include?(:control_009_link).should be_true
46
+ elements.include?(:control_003_field).should be_true
47
+ elements.include?(:control_005_field).should be_true
48
+ elements.include?(:control_006_field).should be_true
49
+ elements.include?(:control_006_format_selector).should be_true
50
+ elements.include?(:control_006_set_button).should be_true
51
+ elements.include?(:control_006_reset_button).should be_true
52
+ elements.include?(:control_008_field).should be_true
53
+ elements.include?(:delete_bib_button).should be_true
54
+ elements.include?(:holdings_links).should be_true
55
+ elements.include?(:item_links).should be_true
56
+ elements.include?(:add_instance_buttons).should be_true
57
+ elements.include?(:delete_instance_buttons).should be_true
58
+ elements.include?(:add_item_buttons).should be_true
59
+ elements.include?(:delete_item_buttons).should be_true
60
+ end
61
+
62
+ it 'should start with one data line added' do
63
+ @bib_editor.data_line_1.class.should == OLE_QA::Framework::OLELS::Data_Line
64
+ end
65
+
66
+ it 'should add a data line' do
67
+ @bib_editor.add_data_line(2)
68
+ @bib_editor.methods.include?(:data_line_2).should be_true
69
+ @bib_editor.data_line_2.class.should == OLE_QA::Framework::OLELS::Data_Line
70
+ end
71
+
72
+ it 'should delete a data line' do
73
+ @bib_editor.delete_data_line(2)
74
+ @bib_editor.methods.include?(:data_line_2).should be_false
75
+ end
76
+
77
+ it 'should not add a data line which already exists' do
78
+ lambda {@bib_editor.add_data_line(1)}.should raise_error
79
+ end
80
+
81
+ it 'should not delete a data line which does not exist' do
82
+ lambda {@bib_editor.delete_data_line(2)}.should raise_error
83
+ end
84
+ end