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,39 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module OLE_QA::Framework::OLELS
16
+ # An OLE Library System Line Object
17
+ class Line_Object < OLE_QA::Framework::Line_Object
18
+ def initialize(ole_session, line_number)
19
+ super(ole_session, line_number)
20
+ set_sublines if defined?(self.set_sublines)
21
+ end
22
+
23
+ def create_subline(instance_name, class_name, which)
24
+ raise StandardError, "Subline object already exists. (#{instance_name})" if self.instance_variables.include?("@#{instance_name}".to_sym)
25
+ new_line_name = instance_name
26
+ make_accessor(:"#{new_line_name}")
27
+ klas = OLE_QA::Framework::OLELS.const_get(:"#{class_name}")
28
+ instance_variable_set(:"@#{new_line_name}", klas.new(@ole, @line_number, which))
29
+ end
30
+ alias_method(:add_subline,:create_subline)
31
+
32
+ def remove_subline(instance_name)
33
+ raise StandardError, "Subline object does not exist. (#{instance_name})" unless self.instance_variables.include?("@#{instance_name}".to_sym)
34
+ remove_instance_variable("@#{instance_name}".to_sym)
35
+ unmake_attr(instance_name.to_sym)
36
+ end
37
+ alias_method(:delete_subline,:remove_subline)
38
+ end
39
+ end
@@ -0,0 +1,30 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module OLE_QA::Framework::OLELS
16
+ # A lookup screen in the OLE Library System
17
+ class Lookup < OLE_QA::Framework::Page
18
+ # Set elements common to all OLELS lookup screens.
19
+ def set_elements
20
+ super
21
+ element(:title) {b.h1.span(:class => "uif-headerText-span")}
22
+ end
23
+
24
+ # Set elements to be loaded before the page is considered complete.
25
+ def wait_for_elements
26
+ super
27
+ @wait_on << :title
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,25 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module OLE_QA::Framework::OLELS
16
+ # An Access Information Line on the OLE Library System Instance Record Editor
17
+ class Access_Info_Line < OLE_QA::Framework::OLELS::Line_Object
18
+ # Set screen elements for access info line.
19
+ def set_elements
20
+ element(:access_info_field) {b.text_field(:id => "OleAccessInformationField_line#{@line_id}_control")}
21
+ element(:add_button) {b.button(:id => "oleAccessInformation_addTagButton_line#{@line_id}")}
22
+ element(:remove_button) {b.button(:id => "oleAccessInformation_removeTagButton_line#{@line_id}")}
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,31 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module OLE_QA::Framework::OLELS
16
+
17
+ # Represents a Marc data line in the OLE Library System Bib Editor.
18
+ # e.g. '245','','','|aTitle of Work'
19
+ class Data_Line < OLE_QA::Framework::OLELS::Line_Object
20
+
21
+ # Set Marc data line elements.
22
+ def set_elements
23
+ element(:tag_field) {b.text_field(:id => "dataField_tag_id_line#{@line_id}_control")}
24
+ element(:ind1_field) {b.text_field(:id => "dataField_ind1_id_line#{@line_id}_control")}
25
+ element(:ind2_field) {b.text_field(:id => "dataField_ind2_id_line#{@line_id}_control")}
26
+ element(:data_field) {b.text_field(:id => "dataField_value_id_line#{@line_id}_control")}
27
+ element(:add_button) {b.button(:id => "dataField_addTagButton_id_line#{@line_id}")}
28
+ element(:remove_button) {b.button(:id => "dataField_removeTagButton_id_line#{@line_id}")}
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,79 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module OLE_QA::Framework::OLELS
16
+
17
+ # Any of Various Notes which Appear on the OLE Library System Instance Editor
18
+ class Editor_Note < OLE_QA::Framework::Data_Object
19
+
20
+ # The type of Instance Note represented by an instance of this object.
21
+ attr_accessor :note_type
22
+
23
+ # The line number of an instance of this object.
24
+ attr_accessor :line_number
25
+
26
+ # The subline number of an instance of this object.
27
+ # - Set to 0 by default.
28
+ # - 0 indicates that an instance is not a subline element.
29
+ # - Used when note_type = 'ownership note'.
30
+ attr_accessor :subline_number
31
+
32
+ # The YAML element definitions file loaded by an instance of this class.
33
+ attr_accessor :yaml_file
34
+
35
+ # @note Subline Number is only necessary when instantiating for a note type which represents a subline element.
36
+ # e.g., ownership_note = OLE_QA::Framework::OLELS::Editor_Note.new(browser, 'ownership note', 2, 1)
37
+ # Otherwise leave this set to 0.
38
+ def initialize(browser, note_type, line_number, subline_number = 0)
39
+ super(browser)
40
+
41
+ @line_number = line_number
42
+ @line_identifier = line_number - 1
43
+ @subline_number = subline_number
44
+ @subline_identifier = subline_number - 1
45
+ @note_type = note_type
46
+
47
+ subdir = '/olels/objects/editor_note/'
48
+
49
+ case @note_type
50
+ when 'access info'
51
+ yaml_file = 'access_info.yml'
52
+ when 'holdings note'
53
+ yaml_file = 'holdings_note.yml'
54
+ when 'item note'
55
+ yaml_file = 'item_note.yml'
56
+ when 'ownership note'
57
+ yaml_file = 'ownership_note.yml'
58
+ end
59
+ @yaml_file = yaml_file
60
+
61
+ note_elements = load_yml(subdir, yaml_file)
62
+ parse_elements(note_elements)
63
+ set_elements(note_elements)
64
+ end
65
+
66
+ # Replace element identifiers in a series of element hashes.
67
+ # - Replace LINEID with @line_identifier
68
+ # - Replace LINENUM with @line_number
69
+ # - Replace SUBLINEID with @subline_identifier
70
+ # - Replace SUBLINENUM with @subline_number
71
+ def parse_elements(element_hash)
72
+ replace_identifiers(element_hash, /SUBLINEID/, @subline_identifier.to_s)
73
+ replace_identifiers(element_hash, /SUBLINENUM/, @subline_number.to_s)
74
+ replace_identifiers(element_hash, /LINEID/, @line_identifier.to_s)
75
+ replace_identifiers(element_hash, /LINENUM/, @line_number.to_s)
76
+ end
77
+
78
+ end
79
+ end
@@ -0,0 +1,26 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module OLE_QA::Framework::OLELS
16
+ # A Holdings Note on the OLE Library System Instance Editor
17
+ class Holdings_Note < OLE_QA::Framework::OLELS::Line_Object
18
+ # Set holdings note screen elements.
19
+ def set_elements
20
+ element(:note_type_selector) {b.select_list(:id => "OleHoldingNoteTypeField_line#{@line_id}_control")}
21
+ element(:note_field) {b.text_field(:id => "OleHoldingNoteDescField_line#{@line_id}_control")}
22
+ element(:add_button) {b.button(:id => "OleHoldingNotes_addTagButton_line#{@line_id}")}
23
+ element(:remove_button) {b.button(:id => "OleHoldingNotes_removeTagButton_line#{@line_id}")}
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,26 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module OLE_QA::Framework::OLELS
16
+ # An Item Note in the OLE Library System Item Editor
17
+ class Item_Note < OLE_QA::Framework::OLELS::Line_Object
18
+ # Set screen elements for an OLELS Item Note.
19
+ def set_elements
20
+ element(:note_type_selector) {b.select_list(:id => "OleItemNoteTypeField_line#{@line_id}_control")}
21
+ element(:note_field) {b.text_field(:id => "OleItemNoteDescField_line#{@line_id}_control")}
22
+ element(:add_button) {b.button(:id => "OleItemNote_addTagButton_line#{@line_id}")}
23
+ element(:remove_button) {b.button(:id => "OleItemNote_removeTagButton_line#{@line_id}")}
24
+ end
25
+ end
26
+ 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
+ module OLE_QA::Framework::OLELS
16
+ # An Extent of Ownership Line on the OLE Library System Instance Editor.
17
+ class Ownership_Extent_Line < OLE_QA::Framework::OLELS::Line_Object
18
+
19
+ def set_elements
20
+ element(:type_selector) {b.select_list(:id => "extentTextualHoldingsType_line#{@line_id}_control")}
21
+ element(:statement_field) {b.text_field(:id => "extentTextualHoldings_line#{@line_id}_control")}
22
+ element(:add_button) {b.button(:id => "extentOfOwnership_addTagButton_line#{@line_id}")}
23
+ element(:remove_button) {b.button(:id => "extentOfOwnership_removeTagButton_line#{@line_id}")}
24
+ end
25
+
26
+ def set_sublines
27
+ create_ownership_note(1)
28
+ end
29
+
30
+ def create_ownership_note(which = 1)
31
+ create_subline("ownership_note_#{which}","Ownership_Note", which)
32
+ end
33
+ alias_method(:add_ownership_note,:create_ownership_note)
34
+
35
+ def remove_ownership_note(which = 1)
36
+ remove_subline("ownership_note_#{which}")
37
+ end
38
+ alias_method(:delete_ownership_note,:remove_ownership_note)
39
+ end
40
+ end
@@ -0,0 +1,63 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module OLE_QA::Framework::OLELS
16
+ # The OLE Library System MARC Bibliographic Record Editor Screen
17
+ class Bib_Editor < Editor
18
+ # Set OLE Library System Bib Editor screen elements.
19
+ # @note Elements for individual Marc data lines are set on
20
+ # {OLE_QA::Framework::OLELS::Data_Line}
21
+ def set_elements
22
+ super
23
+ element(:leader_field) {b.text_field(:id => "LeaderTextInputField_control")}
24
+ element(:bib_record_status_selector) {b.select_list(:id => "StatusFieldSection_control")}
25
+ element(:set_button) {b.button(:id => "set_button")}
26
+ # Control Field Buttons
27
+ element(:control_003_link) {b.a(:id => "003FieldLink")}
28
+ element(:control_005_link) {b.a(:id => "005FieldLink")}
29
+ element(:control_006_link) {b.a(:id => "006FieldLink")}
30
+ element(:control_007_link) {b.a(:id => "007FieldLink")}
31
+ element(:control_008_link) {b.a(:id => "008FieldLink")}
32
+ element(:control_009_link) {b.a(:id => "009FieldLink")}
33
+ # Control Fields & Related Elements
34
+ # (NB - Dependent on links & leader field state!)
35
+ element(:control_003_field) {b.text_field(:id => "Control_Field_003_control")}
36
+ element(:control_005_field) {b.text_field(:id => "Control_Field_005_control")}
37
+ element(:control_006_field) {b.text_field(:id => "Control_Field_006_control")}
38
+ element(:control_006_format_selector) {b.select_list(:id => "006Field_0_control")}
39
+ element(:control_006_set_button) {b.button(:id => "ControlField_Set_button")}
40
+ element(:control_006_reset_button) {b.button(:id => "ControlField_Reset_button")}
41
+ element(:control_008_field) {b.text_field(:id => "Control_Field_008_control")}
42
+ end
43
+
44
+ # Add the first Marc Data Line to a new Bib Editor record.
45
+ # @note There will always be at least one Marc Data Line on a newly-opened record,
46
+ # whether newly-created or previously extant.
47
+ def set_lines
48
+ create_data_line(1)
49
+ end
50
+
51
+ # Add a Marc data line to the editor page model.
52
+ def create_data_line(which = 1)
53
+ create_line("data_line_#{which}","Data_Line", which)
54
+ end
55
+ alias_method(:add_data_line, :create_data_line)
56
+
57
+ # Remove a Marc data line from the editor page model.
58
+ def remove_data_line(which = 1)
59
+ remove_line("data_line_#{which}")
60
+ end
61
+ alias_method(:delete_data_line,:remove_data_line)
62
+ end
63
+ end
@@ -0,0 +1,42 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module OLE_QA::Framework::OLELS
16
+ # The OLE Library System Describe Workbench Screen
17
+ class Describe_Workbench < Lookup
18
+ # Set URL
19
+ def initialize(ole_session)
20
+ url = ole_session.ls_url + 'portal.do?channelTitle=Describe Workbench&channelUrl='
21
+ url += ole_session.ls_url + 'ole-kr-krad/describeworkbenchcontroller?viewId=DescribeWorkBenchView&methodToCall=start'
22
+ super(ole_session, url)
23
+ end
24
+
25
+ # Set OLELS Describe Workbench page elements.
26
+ def set_elements
27
+ super
28
+ # Buttons
29
+ element(:search_button) {b.button(:id => "search_button")}
30
+ element(:clear_button) {b.button(:id => "clear_button")}
31
+ # Search Fields
32
+ element(:search_field_1) {b.text_area(:id => "searchText_id_line0_control")}
33
+ element(:search_which_selector_1) {b.select_list(:id => "operator_id_line0_control")}
34
+ element(:search_field_selector_1) {b.select_list(:id => "docField_id_line0_control")}
35
+ end
36
+
37
+ def wait_for_elements
38
+ super
39
+ @wait_on << :search_button
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,80 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module OLE_QA::Framework::OLELS
16
+ # The OLE Library System MARC Instance Record Editor Screen
17
+ class Instance_Editor < Editor
18
+ # Set OLELS Instance Editor page elements.
19
+ def set_elements
20
+ super
21
+ # Override :message element on Editor base class.
22
+ element(:message, force = true) {b.span(:id => "workInstanceMessage_span")}
23
+ element(:location_toggle) {b.a(:id => "OleLocationInformationSection_toggle")}
24
+ element(:location_field) {b.text_field(:id => "OleHoldingLocation_control")}
25
+ element(:call_number_toggle) {b.a(:id => "OleCallNumberInformation_toggle")}
26
+ element(:prefix_field) {b.text_field(:id => "OleHoldingCallNumberPrefix_control")}
27
+ element(:call_number_field) {b.text_field(:id => "OleHoldingCallNumber_control")}
28
+ element(:shelving_order_field) {b.text_field(:id => "OleHoldingShelvingOrder_control")}
29
+ element(:call_number_type_selector) {b.select_list(:id => "OleHoldingShelvingScheme_control")}
30
+ element(:call_number_browse_button) {b.button(:id => "callNumberHoldingsBrowseLink")}
31
+ element(:ownership_extent_toggle) {b.a(:id => "OleExtentOfOwnershipSection_toggle")}
32
+ element(:extended_information_toggle) {b.a(:id => "OleExtendedInformationSection_toggle")}
33
+ element(:receipt_status_selector) {b.select_list(:id => "OleReceiptStatusField_control")}
34
+ element(:holding_notes_toggle) {b.a(:id => "OleHoldingNotes_toggle")}
35
+ element(:holdings_notes_toggle) {b.a(:id => "OleHoldingNotes_toggle")}
36
+ end
37
+
38
+ # Wait for location field to appear when opening page.
39
+ def wait_for_elements
40
+ super
41
+ @wait_on << :location_field
42
+ end
43
+
44
+ def set_lines
45
+ create_ownership_extent_line(1)
46
+ create_access_info_line(1)
47
+ create_holdings_note(1)
48
+ end
49
+
50
+ def create_ownership_extent_line(which = 1)
51
+ create_line("ownership_extent_line_#{which}","Ownership_Extent_Line",which)
52
+ end
53
+ alias_method(:add_ownership_extent_line,:create_ownership_extent_line)
54
+
55
+ def create_access_info_line(which = 1)
56
+ create_line("access_info_line_#{which}","Access_Info_Line",which)
57
+ end
58
+ alias_method(:add_access_info_line,:create_access_info_line)
59
+
60
+ def create_holdings_note(which = 1)
61
+ create_line("holdings_note_#{which}","Holdings_Note",which)
62
+ end
63
+ alias_method(:add_holdings_note,:create_holdings_note)
64
+
65
+ def remove_ownership_extent_line(which = 1)
66
+ remove_line("ownership_extent_line_#{which}")
67
+ end
68
+ alias_method(:delete_ownership_extent_line,:remove_ownership_extent_line)
69
+
70
+ def remove_access_info_line(which = 1)
71
+ remove_line("access_info_line_#{which}")
72
+ end
73
+ alias_method(:delete_access_info_line,:remove_access_info_line)
74
+
75
+ def remove_holdings_note(which = 1)
76
+ remove_line("holdings_note_#{which}")
77
+ end
78
+ alias_method(:delete_holdings_note,:remove_holdings_note)
79
+ end
80
+ end