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,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::OLEFS
16
+ # An Invoice Notes Line on an OLE Financial System Payment Request.
17
+ class Invoice_Notes_Line < OLE_QA::Framework::Subline_Object
18
+ # Set invoice notes line elements.
19
+ def set_elements
20
+ super
21
+ element(:note_field) {b.text_area(:id => "document.item[#{@line_id}].notes[#{@subline_id}].note")}
22
+ element(:delete_button) {b.input(:xpath => "//input[@name='methodToCall.deleteNote.line#{@line_id}:#{@subline_id}']")}
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,43 @@
1
+ # Copyright 2005-2013 The Kuali Foundation
2
+ #
3
+ # Licensed under the Educational Community License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at:
6
+ #
7
+ # http://www.opensource.org/licenses/ecl2.php
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module OLE_QA::Framework::OLEFS
16
+ # A new Accounting Line on an OLE Financial System PURAP Line Object
17
+ class New_Accounting_Line < OLE_QA::Framework::Subline_Object
18
+ # Initialize as a subclass of {OLE_QA::Framework::Subline_Object} with a subline_number of 0.
19
+ def initialize(ole_session, line_number, which)
20
+ super(ole_session, line_number, 0)
21
+ end
22
+
23
+ # Set elements on a New Accounting Line object.
24
+ # @note {OLE_QA::Framework::Line_Object} @line_number and @line_id will be used to
25
+ # perform substitutions in identifiers.
26
+ # @note {OLE_QA::Framework::Subline_Object} @line_number and @line_id will not be
27
+ # need in finding element IDs, as there will only ever be one new
28
+ # subline object on each line object.
29
+ def set_elements
30
+ super
31
+ element(:chart_selector) {b.select_list(:id => "document.item[#{@line_id}].newSourceLine.chartOfAccountsCode")}
32
+ element(:account_number_field) {b.text_field(:id => "document.item[#{@line_id}].newSourceLine.accountNumber")}
33
+ element(:sub_account_number_field) {b.text_field(:id => "document.item[#{@line_id}].newSourceLine.subAccountNumber")}
34
+ element(:object_field) {b.text_field(:id => "document.item[#{@line_id}].newSourceLine.financialObjectCode")}
35
+ element(:sub_object_field) {b.text_field(:id => "document.item[#{@line_id}].newSourceLine.financialSubObjectCode")}
36
+ element(:project_field) {b.text_field(:id => "document.item[#{@line_id}].newSourceLine.projectCode")}
37
+ element(:org_ref_id_field) {b.text_field(:id => "document.item[#{@line_id}].newSourceLine.organizationReferenceId")}
38
+ element(:dollar_field) {b.text_field(:id => "document.item[#{@line_id}].newSourceLine.amount")}
39
+ element(:percent_field) {b.text_field(:id => "document.item[#{@line_id}].newSourceLine.accountLinePercent")}
40
+ element(:add_button) {b.input(:name => "methodToCall.insertSourceLine.line#{@line_id}.anchoraccountingSourceAnchor")}
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,37 @@
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::OLEFS
16
+ # A new Copies Line on an OLE Financial System PURAP Line Object
17
+ class New_Copies_Line < OLE_QA::Framework::Subline_Object
18
+ # Initialize as a subclass of {OLE_QA::Framework::Subline_Object} with a subline_number of 0.
19
+ def initialize(ole_session, line_number, which)
20
+ super(ole_session, line_number, 0)
21
+ end
22
+
23
+ # Set elements on a New Copies Line object.
24
+ # @note {OLE_QA::Framework::Line_Object} @line_number and @line_id will be used to
25
+ # perform substitutions in identifiers.
26
+ # @note {OLE_QA::Framework::Subline_Object} @line_number and @line_id will not be
27
+ # need in finding element IDs, as there will only ever be one new
28
+ # subline object on each line object.
29
+ def set_elements
30
+ super
31
+ element(:copies_field) {b.text_field(:id => "document.item[#{@line_id}].itemCopies")}
32
+ element(:location_copies_selector) {b.select_list(:id => "document.item[#{@line_id}].locationCopies")}
33
+ element(:starting_copy_field) {b.text_field(:id => "document.item[#{@line_id}].startingCopyNumber")}
34
+ element(:add_button) {b.input(:name => "methodToCall.addCopy.line#{@line_id}")}
35
+ end
36
+ end
37
+ 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::OLEFS
16
+ # A new Exception Notes Line on an OLE Financial System Receiving Line.
17
+ class New_Exception_Notes_Line < OLE_QA::Framework::Subline_Object
18
+ # Initialize as a subclass of {OLE_QA::Framework::Subline_Object} with a subline_number of 0.
19
+ def initialize(ole_session, line_number, which)
20
+ super(ole_session, line_number, 0)
21
+ end
22
+
23
+ # Set elements on a New Exception Notes Line.
24
+ def set_elements
25
+ element(:exception_type_selector) {b.select_list(:id => "document.item[#{@line_id}].exceptionTypeId")}
26
+ element(:note_field) {b.text_field(:id => "document.item[#{@line_id}].exceptionNotes")}
27
+ element(:note_type_selector) {b.select_list(:id => "document.item[#{@line_id}].exceptionTypeId")}
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,35 @@
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::OLEFS
16
+ # A new Invoice Notes Line on an OLE Financial System Payment Request Line.
17
+ class New_Invoice_Notes_Line < OLE_QA::Framework::Subline_Object
18
+ # Initialize as a subclass of {OLE_QA::Framework::Subline_Object} with a subline_number of 0.
19
+ def initialize(ole_session, line_number, which)
20
+ super(ole_session, line_number, 0)
21
+ end
22
+
23
+ # Set elements on a New Invoice Notes Line object.
24
+ # @note {OLE_QA::Framework::Line_Object} @line_number and @line_id will be used to
25
+ # perform substitutions in identifiers.
26
+ # @note {OLE_QA::Framework::Subline_Object} @line_number and @line_id will not be
27
+ # need in finding element IDs, as there will only ever be one new
28
+ # subline object on each line object.
29
+ def set_elements
30
+ super
31
+ element(:note_field) {b.text_field(:id => "document.item[#{@line_number}].note")}
32
+ element(:add_button) {b.input(:name => "methodToCall.addNote.line#{@line_number}")}
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,36 @@
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::OLEFS
16
+ # A new Notes Line on an OLE Financial System PURAP Line Object
17
+ class New_Notes_Line < OLE_QA::Framework::Subline_Object
18
+ # Initialize as a subclass of {OLE_QA::Framework::Subline_Object} with a subline_number of 0.
19
+ def initialize(ole_session, line_number, which)
20
+ super(ole_session, line_number, 0)
21
+ end
22
+
23
+ # Set elements on a New Notes Line object.
24
+ # @note {OLE_QA::Framework::Line_Object} @line_number and @line_id will be used to
25
+ # perform substitutions in identifiers.
26
+ # @note {OLE_QA::Framework::Subline_Object} @line_number and @line_id will not be
27
+ # need in finding element IDs, as there will only ever be one new
28
+ # subline object on each line object.
29
+ def set_elements
30
+ super
31
+ element(:note_type_selector) {b.select_list(:id => "document.item[#{@line_id}].noteTypeId")}
32
+ element(:note_field) {b.text_field(:id => "document.item[#{@line_id}].note")}
33
+ element(:add_button) {b.input(:name => "methodToCall.addNote.line#{@line_id}")}
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,35 @@
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::OLEFS
16
+ # A new Receipt Notes Line on an OLE Financial System Receiving Document
17
+ class New_Receipt_Notes_Line < OLE_QA::Framework::Subline_Object
18
+ # Initialize as a subclass of {OLE_QA::Framework::Subline_Object} with a subline_number of 0.
19
+ def initialize(ole_session, line_number, which)
20
+ super(ole_session, line_number, 0)
21
+ end
22
+
23
+ # Set elements on a New Receipt Notes Line object.
24
+ # @note {OLE_QA::Framework::Line_Object} @line_number and @line_id will be used to
25
+ # perform substitutions in identifiers.
26
+ # @note {OLE_QA::Framework::Subline_Object} @line_number and @line_id will not be
27
+ # need in finding element IDs, as there will only ever be one new
28
+ # subline object on each line object.
29
+ def set_elements
30
+ super
31
+ element(:note_type_selector) {b.select_list(:id => "document.item[#{@line_id}].noteTypeId")}
32
+ element(:note_field) {b.text_field(:id => "document.item[#{@line_id}].receiptNotes")}
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,29 @@
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::OLEFS
16
+ # A Notes Line in an OLE Financial System PURAP E-Document.
17
+ class Notes_Line < OLE_QA::Framework::Subline_Object
18
+ # Set notes line elements.
19
+ def set_elements
20
+ super
21
+ element(:note_type_selector) {b.select_list(:id => "document.item[#{@line_id}].notes[#{@subline_id}].noteTypeId")}
22
+ element(:note_field) {b.text_field(:id => "document.item[#{@line_id}].notes[#{@subline_id}].note")}
23
+ element(:delete_button) {b.input(:name => "methodToCall.deleteNote.line#{@line_id}:#{@subline_id}")}
24
+ # Use the elements below for a closed, inaccessible notes field on a PURAP document like a Purchase Order.
25
+ element(:closed_note_type_field) {b.td(:xpath => "//tr[starts-with(@id,'tab-Notes')]/th/table[@class = 'datatable']/tbody[1]/tr[td[@class = 'subhead'][contains(text(),'Note #{@subline_num}')]]/following-sibling::tr[1]/td[1]")}
26
+ element(:closed_note_field) {b.td(:xpath => "//tr[starts-with(@id,'tab-Notes')]/th/table[@class = 'datatable']/tbody[1]/tr[td[@class = 'subhead'][contains(text(),'Note #{@subline_num}')]]/following-sibling::tr[1]/td[2]")}
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,24 @@
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::OLEFS
16
+ # A Special Processing Instructions Line in an OLE Financial System Receiving Document.
17
+ class Processing_Line < OLE_QA::Framework::Subline_Object
18
+ def set_elements
19
+ super
20
+ element(:note_field) {b.td(:xpath => "//table[@summary='Items Section']/tbody/tr[td[1]/b[contains(text(),'#{@line_number}')]]/following-sibling::tr[4]/td[1]/table/tbody/tr[2]/td[1]/table/tbody/tr[td[contains(text(),'Note #{@subline_number}')]]/following-sibling::tr[1]/td[1]")}
21
+ element(:acknowledge_checkbox) {b.checkbox(:xpath => "//table[@summary='Items Section']/tbody/tr[td[1]/b[contains(text(),'#{@line_number}')]]/following-sibling::tr[4]/td[1]/table/tbody/tr[2]/td[1]/table/tbody/tr[td[contains(text(),'Note #{@subline_number}')]]/following-sibling::tr[1]/td[2]")}
22
+ end
23
+ end
24
+ 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::OLEFS
16
+ # A Receipt Notes Line in an OLE Financial System Receiving Document
17
+ class Receipt_Notes_Line < OLE_QA::Framework::Subline_Object
18
+ # Set receipt notes elements.
19
+ def set_elements
20
+ super
21
+ element(:note_type_selector) {b.select_list(:id => "document.item[#{@line_id}].receiptNoteList[#{@subline_id}].noteTypeId")}
22
+ element(:note_field) {b.text_field(:id => "document.item[#{@line_id}].receiptNoteList[#{@subline_id}].notes")}
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,23 @@
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 Libary System E-Document page.
17
+ class E_Doc < OLE_QA::Framework::Page
18
+ # Set elements common to all OLELS E-Document pages.
19
+ def set_elements
20
+ element(:description_field) {b.text_field(:xpath => "//tr/th[descendant::label[contains(text(),'Description:')]]/following-sibling::td[1]/descendant::input[1]")}
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,92 @@
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
+ # This represents the base object for the Describe Editor.
18
+ # It generates elements common to all three editor screens:
19
+ # - Bibliographic Editor
20
+ # - Instance Editor (for Holdings)
21
+ # - Item Editor
22
+ class Editor < OLE_QA::Framework::Page
23
+
24
+ # The URL for this Page object is the universal Describe Editor URL in OLELS.
25
+ # When the Editor is opened via URL, it will start on the
26
+ # MARC Bibliographic Editor screen.
27
+ #
28
+ # NB:
29
+ # The URL of the newly-opened editor instance
30
+ # will differ from the URL with which the screen was
31
+ # opened, so do not rely on URL equivalence tests
32
+ # to verify whether or not the Editor has been opened
33
+ # correctly.
34
+ #
35
+ def initialize(ole_session)
36
+ editor_url = ole_session.ls_url + 'portal.do?channelTitle=Editor&channelUrl='
37
+ editor_url += ole_session.ls_url + 'ole-kr-krad/editorcontroller?viewId=EditorView&methodToCall=load&docCategory=work&docType=bibliographic&docFormat=marc&editable=true'
38
+ super(ole_session, editor_url)
39
+ set_lines if defined?(self.set_lines)
40
+ end
41
+
42
+ # Set elements common to all Editor screens.
43
+ # @note "Return to Search" buttons will not appear when Editors are not invoked via Describe Workbench,
44
+ # despite their commonality.
45
+ def set_elements
46
+ super
47
+ element(:title) {b.h2(:class => "uif-headerText").span}
48
+ element(:submit_button) {b.button(:id => "submitEditor")}
49
+ element(:cancel_button) {b.button(:id => "cancelEditor")}
50
+ element(:close_button) {b.button(:id => "closeEditor")}
51
+ element(:return_to_search_button) {b.button(:id => "returnToSearch_button")}
52
+ element(:message) {b.span(:id => "workMessageSection_span")}
53
+ # Navigation Area Elements
54
+ # TODO Check on necessity of plurality for add instance button once it is functioning again. (see OLE-4294)
55
+ element(:delete_bib_button) {b.img(:xpath => "//img[@class='deleteBib']")}
56
+ element(:holdings_links) {b.divs(:class => "holdingIdentifierClass")}
57
+ element(:item_links) {b.divs(:class => "itemIdentifierClass")}
58
+ element(:add_instance_buttons) {b.imgs(:class => "addInstance")}
59
+ element(:delete_instance_buttons) {b.imgs(:title => "Delete Instance")}
60
+ element(:add_item_buttons) {b.imgs(:title => "Add Item")}
61
+ element(:delete_item_buttons) {b.imgs(:title => "Delete Item")}
62
+ end
63
+
64
+ # Designate elements always expected to be present once the editor has finished loading.
65
+ def wait_for_elements
66
+ @wait_on << :title
67
+ end
68
+
69
+ # Define commonly-used functions on Editor page objects.
70
+ def set_functions
71
+ super
72
+ # Click the submit button, wait until a message appears, and return the message text.
73
+ function(:save_record) {submit_button.click ; message.wait_until_present ; message.text.strip}
74
+ end
75
+
76
+ # Create a Line Object on an Editor page.
77
+ def create_line(instance_name, class_name, which=0)
78
+ raise StandardError, "Line object already exists. (#{instance_name})" if self.instance_variables.include?("@#{instance_name}".to_sym)
79
+ new_line_name = instance_name
80
+ make_accessor(:"#{instance_name}")
81
+ klas = OLE_QA::Framework::OLELS.const_get(:"#{class_name}")
82
+ instance_variable_set(:"@#{new_line_name}", klas.new(@ole, which))
83
+ end
84
+
85
+ # Remove a Line Object from an Editor page.
86
+ def remove_line(instance_name)
87
+ raise StandardError, "Line object does not exist. (#{instance_name})" unless self.instance_variables.include?("@#{instance_name}".to_sym)
88
+ remove_instance_variable("@#{instance_name}".to_sym)
89
+ unmake_attr(instance_name.to_sym)
90
+ end
91
+ end
92
+ end