ole-qa-framework 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
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,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 'A Bib Editor Line' do
19
+
20
+ before :all do
21
+ @ole = OLE_QA::Framework::Session.new
22
+ @browser = @ole.browser
23
+ @data_line = OLE_QA::Framework::OLELS::Data_Line.new(@ole, 1)
24
+ end
25
+
26
+ after :all do
27
+ @ole.quit
28
+ end
29
+
30
+ it 'should create a new instance' do
31
+ @data_line.class.should == OLE_QA::Framework::OLELS::Data_Line
32
+ @data_line.class.superclass.should == OLE_QA::Framework::OLELS::Line_Object
33
+ end
34
+
35
+ it 'should have Marc data line elements' do
36
+ elements = @data_line.methods
37
+ elements.include?(:tag_field).should be_true
38
+ elements.include?(:ind1_field).should be_true
39
+ elements.include?(:ind2_field).should be_true
40
+ elements.include?(:data_field).should be_true
41
+ elements.include?(:add_button).should be_true
42
+ elements.include?(:remove_button).should be_true
43
+ end
44
+ 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 OLELS Describe Workbench page' do
19
+
20
+ before :all do
21
+ @ole = OLE_QA::Framework::Session.new
22
+ @workbench = OLE_QA::Framework::OLELS::Describe_Workbench.new(@ole)
23
+ end
24
+
25
+ it 'should create a new instance' do
26
+ @workbench.class.should == OLE_QA::Framework::OLELS::Describe_Workbench
27
+ @workbench.class.superclass.should == OLE_QA::Framework::OLELS::Lookup
28
+ end
29
+
30
+ it 'should open the describe workbench via URL' do
31
+ @workbench.open
32
+ @workbench.title.text.strip.should == "Describe Workbench"
33
+ end
34
+
35
+ it 'should have describe workbench elements' do
36
+ elements = @workbench.methods
37
+ elements.include?(:title).should be_true
38
+ elements.include?(:search_button).should be_true
39
+ elements.include?(:clear_button).should be_true
40
+ elements.include?(:search_field_1).should be_true
41
+ elements.include?(:search_which_selector_1).should be_true
42
+ elements.include?(:search_field_selector_1).should be_true
43
+ end
44
+ end
@@ -0,0 +1,56 @@
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
+ describe 'The Editor base class' do
20
+
21
+ before :all do
22
+ @ole = OLE_QA::Framework::Session.new
23
+ @editor = OLE_QA::Framework::OLELS::Editor.new(@ole)
24
+ end
25
+
26
+ after :all do
27
+ @ole.quit
28
+ end
29
+
30
+ it 'should create a new instance of the Editor base class' do
31
+ @editor.class.should == OLE_QA::Framework::OLELS::Editor
32
+ end
33
+
34
+ it 'should should be a page' do
35
+ @editor.class.superclass.should == OLE_QA::Framework::Page
36
+ end
37
+
38
+ it 'should open the Marc Editor via URL' do
39
+ @editor.open
40
+ @editor.title.text.should == "Bibliographic Editor - MARC Format"
41
+ end
42
+
43
+ it 'should have editor elements' do
44
+ elements = @editor.methods
45
+ elements.include?(:title).should be_true
46
+ elements.include?(:submit_button).should be_true
47
+ elements.include?(:cancel_button).should be_true
48
+ elements.include?(:close_button).should be_true
49
+ elements.include?(:return_to_search_button).should be_true
50
+ elements.include?(:message).should be_true
51
+ end
52
+
53
+ it 'should wait for a title to be present' do
54
+ @editor.wait_for_page_to_load.should == [:title]
55
+ end
56
+ 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
+
16
+ require 'rspec'
17
+ require 'spec_helper'
18
+
19
+
20
+ describe 'An OLELS E-Document' do
21
+
22
+ before :all do
23
+ @ole = OLE_QA::Framework::Session.new
24
+ @edoc = OLE_QA::Framework::OLELS::E_Doc.new(@ole, @ole.ls_url)
25
+ end
26
+
27
+ after :all do
28
+ @ole.quit
29
+ end
30
+
31
+ it 'should should create a new instance' do
32
+ @edoc.class.should == OLE_QA::Framework::OLELS::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
+ # None yet.
41
+ end
42
+ end
@@ -0,0 +1,41 @@
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 Holdings Note object' do
19
+
20
+ before :all do
21
+ @ole = OLE_QA::Framework::Session.new
22
+ @holdings_note = OLE_QA::Framework::OLELS::Holdings_Note.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
+ @holdings_note.class.should == OLE_QA::Framework::OLELS::Holdings_Note
31
+ @holdings_note.class.superclass.should == OLE_QA::Framework::OLELS::Line_Object
32
+ end
33
+
34
+ it 'should have holdings note elements' do
35
+ elements = @holdings_note.methods
36
+ elements.include?(:note_type_selector)
37
+ elements.include?(:note_field)
38
+ elements.include?(:add_button)
39
+ elements.include?(:remove_button)
40
+ end
41
+ end
@@ -0,0 +1,81 @@
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 Instance Editor page' do
19
+
20
+ before :all do
21
+ @ole = OLE_QA::Framework::Session.new
22
+ @browser = @ole.browser
23
+ @instance_editor = OLE_QA::Framework::OLELS::Instance_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
+ @instance_editor.class.should == OLE_QA::Framework::OLELS::Instance_Editor
32
+ @instance_editor.class.superclass.should == OLE_QA::Framework::OLELS::Editor
33
+ end
34
+
35
+ it 'should have instance editor elements' do
36
+ elements = @instance_editor.methods
37
+ elements.include?(:location_toggle).should be_true
38
+ elements.include?(:location_field).should be_true
39
+ elements.include?(:call_number_toggle).should be_true
40
+ elements.include?(:prefix_field).should be_true
41
+ elements.include?(:call_number_field).should be_true
42
+ elements.include?(:shelving_order_field).should be_true
43
+ elements.include?(:call_number_type_selector).should be_true
44
+ elements.include?(:call_number_browse_button).should be_true
45
+ elements.include?(:ownership_extent_toggle).should be_true
46
+ elements.include?(:extended_information_toggle).should be_true
47
+ elements.include?(:receipt_status_selector).should be_true
48
+ elements.include?(:holding_notes_toggle).should be_true
49
+ elements.include?(:holdings_notes_toggle).should be_true
50
+ end
51
+
52
+ it 'should start with line objects' do
53
+ @instance_editor.methods.include?(:ownership_extent_line_1).should be_true
54
+ @instance_editor.methods.include?(:access_info_line_1).should be_true
55
+ @instance_editor.methods.include?(:holdings_note_1).should be_true
56
+ @instance_editor.ownership_extent_line_1.class.should == OLE_QA::Framework::OLELS::Ownership_Extent_Line
57
+ @instance_editor.access_info_line_1.class.should == OLE_QA::Framework::OLELS::Access_Info_Line
58
+ @instance_editor.holdings_note_1.class.should == OLE_QA::Framework::OLELS::Holdings_Note
59
+ end
60
+
61
+ it 'should add line objects' do
62
+ @instance_editor.add_ownership_extent_line(2)
63
+ @instance_editor.methods.include?(:ownership_extent_line_2).should be_true
64
+ @instance_editor.ownership_extent_line_2.class.should == OLE_QA::Framework::OLELS::Ownership_Extent_Line
65
+ @instance_editor.add_access_info_line(2)
66
+ @instance_editor.methods.include?(:access_info_line_2).should be_true
67
+ @instance_editor.access_info_line_2.class.should == OLE_QA::Framework::OLELS::Access_Info_Line
68
+ @instance_editor.add_holdings_note(2)
69
+ @instance_editor.methods.include?(:holdings_note_2).should be_true
70
+ @instance_editor.holdings_note_2.class.should == OLE_QA::Framework::OLELS::Holdings_Note
71
+ end
72
+
73
+ it 'should remove line objects' do
74
+ @instance_editor.remove_ownership_extent_line(2)
75
+ @instance_editor.methods.include?(:ownership_extent_line_2).should be_false
76
+ @instance_editor.remove_access_info_line(2)
77
+ @instance_editor.methods.include?(:access_info_line_2).should be_false
78
+ @instance_editor.remove_holdings_note(2)
79
+ @instance_editor.methods.include?(:holdings_note_2).should be_false
80
+ end
81
+ end
@@ -0,0 +1,94 @@
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 Item Editor page' do
19
+
20
+ before :all do
21
+ @ole = OLE_QA::Framework::Session.new
22
+ @browser = @ole.browser
23
+ @item_editor = OLE_QA::Framework::OLELS::Item_Editor.new(@ole)
24
+ end
25
+
26
+ it 'should create a new instance' do
27
+ @item_editor.class.should == OLE_QA::Framework::OLELS::Item_Editor
28
+ @item_editor.class.superclass.should == OLE_QA::Framework::OLELS::Editor
29
+ end
30
+
31
+ it 'should have item editor elements' do
32
+ elements = @item_editor.methods
33
+ # Messages Elements
34
+ elements.include?(:message).should be_true
35
+ elements.include?(:messages).should be_true
36
+ # Holdings Location/Call Number Information
37
+ elements.include?(:holdings_location_field).should be_true
38
+ elements.include?(:holdings_prefix_field).should be_true
39
+ elements.include?(:holdings_shelving_order_field).should be_true
40
+ elements.include?(:holdings_call_number_field).should be_true
41
+ elements.include?(:holdings_call_number_type_field).should be_true
42
+ # Item Location/Call Number Information
43
+ elements.include?(:location_field).should be_true
44
+ elements.include?(:prefix_field).should be_true
45
+ elements.include?(:shelving_order_field).should be_true
46
+ elements.include?(:call_number_field).should be_true
47
+ elements.include?(:call_number_type_selector).should be_true
48
+ elements.include?(:browse_button).should be_true
49
+ # Item Information
50
+ elements.include?(:item_id_field).should be_true
51
+ elements.include?(:barcode_field).should be_true
52
+ elements.include?(:barcode_arsl_field).should be_true
53
+ elements.include?(:former_identifiers_field).should be_true
54
+ elements.include?(:statistical_searching_codes_selector).should be_true
55
+ elements.include?(:temp_item_type_selector).should be_true
56
+ elements.include?(:enumeration_field).should be_true
57
+ elements.include?(:chronology_field).should be_true
58
+ elements.include?(:copy_number_field).should be_true
59
+ elements.include?(:access_info_uri_field).should be_true
60
+ elements.include?(:item_type_selector).should be_true
61
+ elements.include?(:number_of_pieces_field).should be_true
62
+ # Acquisition Information
63
+ elements.include?(:po_line_item_id_field).should be_true
64
+ elements.include?(:vendor_line_item_id_field).should be_true
65
+ elements.include?(:fund_field).should be_true
66
+ elements.include?(:price_field).should be_true
67
+ elements.include?(:donor_public_display_field).should be_true
68
+ elements.include?(:donor_note_field).should be_true
69
+ # Circulation Information
70
+ elements.include?(:item_status_selector).should be_true
71
+ elements.include?(:checkin_note_field).should be_true
72
+ elements.include?(:item_effective_status_date).should be_true
73
+ elements.include?(:fast_add_checkbox).should be_true
74
+ elements.include?(:staff_only_checkbox).should be_true
75
+ # Extended Information
76
+ elements.include?(:high_density_storage_field).should be_true
77
+ end
78
+
79
+ it 'should start with an item note' do
80
+ @item_editor.methods.include?(:item_note_1).should be_true
81
+ @item_editor.item_note_1.class.should == OLE_QA::Framework::OLELS::Item_Note
82
+ end
83
+
84
+ it 'should add an item note' do
85
+ @item_editor.add_item_note(2)
86
+ @item_editor.methods.include?(:item_note_2).should be_true
87
+ @item_editor.item_note_2.class.should == OLE_QA::Framework::OLELS::Item_Note
88
+ end
89
+
90
+ it 'should remove an item note' do
91
+ @item_editor.remove_item_note(2)
92
+ @item_editor.methods.include?(:item_note_2).should be_false
93
+ end
94
+ end
@@ -0,0 +1,41 @@
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 'My behaviour' do
19
+
20
+ before :all do
21
+ @ole = OLE_QA::Framework::Session.new
22
+ @item_note = OLE_QA::Framework::OLELS::Item_Note.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
+ @item_note.class.should == OLE_QA::Framework::OLELS::Item_Note
31
+ @item_note.class.superclass.should == OLE_QA::Framework::OLELS::Line_Object
32
+ end
33
+
34
+ it 'should have item note elements' do
35
+ elements = @item_note.methods
36
+ elements.include?(:note_type_selector).should be_true
37
+ elements.include?(:note_field).should be_true
38
+ elements.include?(:add_button).should be_true
39
+ elements.include?(:remove_button).should be_true
40
+ end
41
+ end