ole-qa-framework 3.1.1 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. data/CHANGELOG.md +14 -1
  2. data/lib/common/page.rb +3 -0
  3. data/lib/ole_qa_framework/VERSION.rb +1 -1
  4. data/lib/olels/common/batch_profile.rb +53 -0
  5. data/lib/olels/objects/batch_data_mapping_line.rb +41 -0
  6. data/lib/olels/objects/batch_delete_field_line.rb +26 -0
  7. data/lib/olels/objects/batch_rename_field_line.rb +32 -0
  8. data/lib/olels/objects/export_filter_line.rb +28 -0
  9. data/lib/olels/objects/import_defaults_line.rb +27 -0
  10. data/{spec/olels/main_menu_spec.rb → lib/olels/objects/import_match_line.rb} +7 -19
  11. data/lib/olels/objects/import_pf_line.rb +27 -0
  12. data/lib/olels/pages/batch_export_profile.rb +82 -0
  13. data/lib/olels/pages/batch_import_profile.rb +136 -0
  14. data/lib/olels/pages/batch_job_details.rb +48 -0
  15. data/lib/olels/pages/batch_process.rb +47 -0
  16. data/lib/olels/pages/batch_profile_lookup.rb +56 -0
  17. data/lib/olels/pages/batch_type_lookup.rb +52 -0
  18. data/spec/common/page_spec.rb +30 -1
  19. data/spec/modules/qa_page_helpers_spec.rb +1 -1
  20. metadata +16 -98
  21. data/spec/olefs/accounting_line_spec.rb +0 -64
  22. data/spec/olefs/building_lookup_spec.rb +0 -45
  23. data/spec/olefs/copies_line_spec.rb +0 -56
  24. data/spec/olefs/edocs_spec.rb +0 -75
  25. data/spec/olefs/exception_notes_line_spec.rb +0 -46
  26. data/spec/olefs/invoice_current_item_spec.rb +0 -48
  27. data/spec/olefs/invoice_line_item_spec.rb +0 -80
  28. data/spec/olefs/invoice_line_spec.rb +0 -64
  29. data/spec/olefs/invoice_spec.rb +0 -91
  30. data/spec/olefs/line_item_spec.rb +0 -129
  31. data/spec/olefs/load_report_spec.rb +0 -56
  32. data/spec/olefs/load_summary_lookup_spec.rb +0 -53
  33. data/spec/olefs/lookup_spec.rb +0 -50
  34. data/spec/olefs/main_menu_spec.rb +0 -34
  35. data/spec/olefs/notes_line_spec.rb +0 -53
  36. data/spec/olefs/payment_request_spec.rb +0 -43
  37. data/spec/olefs/processing_line_spec.rb +0 -45
  38. data/spec/olefs/purap_document_spec.rb +0 -80
  39. data/spec/olefs/purchase_order_spec.rb +0 -63
  40. data/spec/olefs/receipt_notes_line_spec.rb +0 -45
  41. data/spec/olefs/receive_spec.rb +0 -51
  42. data/spec/olefs/receiving_line_spec.rb +0 -87
  43. data/spec/olefs/requisition_spec.rb +0 -71
  44. data/spec/olefs/vendor_lookup_spec.rb +0 -49
  45. data/spec/olels/access_info_line_spec.rb +0 -40
  46. data/spec/olels/bib_editor_spec.rb +0 -87
  47. data/spec/olels/control_006_line_spec.rb +0 -41
  48. data/spec/olels/control_007_line_spec.rb +0 -41
  49. data/spec/olels/data_line_spec.rb +0 -44
  50. data/spec/olels/describe_workbench_spec.rb +0 -75
  51. data/spec/olels/editor_spec.rb +0 -68
  52. data/spec/olels/edocs_spec.rb +0 -50
  53. data/spec/olels/holdings_note_spec.rb +0 -41
  54. data/spec/olels/instance_editor_spec.rb +0 -73
  55. data/spec/olels/item_editor_spec.rb +0 -96
  56. data/spec/olels/item_note_spec.rb +0 -41
  57. data/spec/olels/loan_spec.rb +0 -104
  58. data/spec/olels/lookup_spec.rb +0 -38
  59. data/spec/olels/ownership_extent_line_spec.rb +0 -48
  60. data/spec/olels/ownership_note_spec.rb +0 -42
  61. data/spec/olels/patron_address_line_spec.rb +0 -55
  62. data/spec/olels/patron_email_line_spec.rb +0 -44
  63. data/spec/olels/patron_lookup_spec.rb +0 -54
  64. data/spec/olels/patron_phone_line_spec.rb +0 -47
  65. data/spec/olels/patron_spec.rb +0 -93
  66. data/spec/olels/return_spec.rb +0 -72
  67. data/spec/olels/staff_upload_spec.rb +0 -55
data/CHANGELOG.md CHANGED
@@ -1,9 +1,22 @@
1
+ ### v3.2.0 - 2013/11/12
2
+
3
+ * Batch Import Screens
4
+ * Batch Process Profile Search Screen
5
+ * Batch Job Details Screen
6
+ * Batch Process Type Search Screen
7
+ * Batch Profile Base Class
8
+ * Batch Import Profile Page
9
+ * Batch Export Profile Page
10
+ * Page Base Class
11
+ * Improved .wait_for_page_to_load rescues not-present exceptions and returns
12
+ true or false if page is loaded.
13
+
1
14
  ### v3.1.1 - 2013/11/05
2
15
 
3
16
  * Update Invoice Line
4
17
  * Add button ID was changed
5
18
 
6
- ### v3.1.0
19
+ ### v3.1.0 - 2013/10/30
7
20
 
8
21
  * OLE 1.0 Receiving
9
22
  * Re-create receiving elements on PURAP line items
data/lib/common/page.rb CHANGED
@@ -73,6 +73,9 @@ module OLE_QA::Framework
73
73
  def wait_for_page_to_load
74
74
  @wait_on.each { |element| wait_for_element(element) }
75
75
  loading_message.wait_while_present if loading_message.present?
76
+ true
77
+ rescue Watir::Wait::TimeoutError
78
+ false
76
79
  end
77
80
 
78
81
  # Set screen elements common to most or all pages across the OLE interface.
@@ -15,6 +15,6 @@
15
15
  module OLE_QA
16
16
  module Framework
17
17
  # The version number for this project.
18
- VERSION = '3.1.1'
18
+ VERSION = '3.2.0'
19
19
  end
20
20
  end
@@ -0,0 +1,53 @@
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 base Batch Process Profile Page in the OLE Library System
17
+ class Batch_Profile < OLE_QA::Framework::Page
18
+ # Linking directly with a 'create new' link returns a stacktrace or HTTP 500.
19
+ # The link included in the :url attribute is for the lookup screen.
20
+ def initialize(ole_session)
21
+ url = ole_session.url + 'portal.do?channelTitle=Batch Process Profile&channelUrl='
22
+ url += ole_session.url + 'ole-kr-krad/lookup?methodToCall=start&dataObjectClassName=org.kuali.ole.batch.bo.OLEBatchProcessProfileBo&returnLocation='
23
+ url += ole_session.url + 'portal.do&hideReturnLink=true&showMaintenanceLinks=true'
24
+ super(ole_session, url)
25
+ end
26
+
27
+ def set_elements
28
+ super
29
+ element(:title) {b.h1(:class => 'uif-headerText').span(:class => 'uif-headerText-span')}
30
+ element(:description_field) {b.text_field(:xpath => "//tr/th[descendant::label[contains(text(),'Description:')]]/following-sibling::td[1]/descendant::input[1]")}
31
+ element(:explanation_field) {b.text_field(:xpath => "//tr/th[descendant::label[contains(text(),'Explanation:')]]/following-sibling::td[1]/descendant::textarea[1]")}
32
+ element(:org_doc_number_field) {b.text_field(:xpath => "//tr/th[descendant::label[contains(text(),'Organization Document Number:')]]/following-sibling::td[1]/descendant::input[1]")}
33
+ element(:document_id) {b.span(:xpath => "//table[@class='uif-gridLayout']/descendant::th[span/label[contains(text(),'Document Number:')]]/following-sibling::td[1]/div/span")}
34
+ element(:initiator_id) {b.span(:xpath => "//table[@class='uif-gridLayout']/descendant::th[span/label[contains(text(),'Initiator Network Id:')]]/following-sibling::td[1]/div/span")}
35
+ element(:document_status) {b.span(:xpath => "//table[@class='uif-gridLayout']/descendant::th[span/label[contains(text(),'Document Status:')]]/following-sibling::td[1]/div/span")}
36
+ element(:creation_timestamp) {b.span(:xpath => "//table[@class='uif-gridLayout']/descendant::th[span/label[contains(text(),'Creation Timestamp:')]]/following-sibling::td[1]/div/span")}
37
+ element(:batch_profile_name_field) {b.text_field(:id => 'mainSection-MaintenanceView-batchProcessProfileName_control')}
38
+ element(:batch_process_type_field) {b.text_field(:id => 'mainSection-MaintenanceView-batchProcessProfileType_control')}
39
+ element(:batch_process_type_icon) {batch_process_type_field.parent.input(:index => 2)}
40
+ element(:submit_button) {b.button(:text => 'submit')}
41
+ element(:save_button) {b.button(:id => 'usave')}
42
+ element(:close_button) {b.button(:id => 'uclose')}
43
+ element(:cancel_button) {b.a(:id => 'ucancel')}
44
+ end
45
+
46
+ def wait_for_elements
47
+ super
48
+ @wait_on << :title
49
+ @wait_on << :batch_profile_name_field
50
+ @wait_on << :save_button
51
+ end
52
+ end
53
+ 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
+ module OLE_QA::Framework::OLELS
16
+ # A Data Mapping Line in the OLE Library System Batch Process Bib Profile
17
+ class Batch_Data_Mapping_Line < OLE_QA::Framework::Line_Object
18
+ # Element definitions for the data mapping lines are expected to change in 1.5 development.
19
+ # - Data mapping lines can currently be conceptualized as line objects that, when
20
+ # added, transform to subline objects.
21
+ # - There is absolutely no need to add more than one main data mapping line, as its
22
+ # only function is to create sublines.
23
+ # - This object can be considered a line object, although it represents a subline on the
24
+ # screen. The first line id in the element ID attributes will be hard-coded to 0.
25
+ # - "New line" elements will be set on the batch export profile page, with line IDs
26
+ # hard-coded to 0.
27
+ #
28
+ def set_elements
29
+ element(:data_type) {b.span(:id => "batchExportDataTypeField_line0_line#{line_id}_control")}
30
+ element(:source) {b.span(:id => "holding-sourcefield_line0_line#{line_id}_control")}
31
+ element(:source_2) {b.span(:id => "dataMappingOptions_sourceField1_line0_line#{line_id}_control")}
32
+ element(:source_field_value) {b.span(:id => "dataMappingOptions_sourceFieldValue_line0_line#{line_id}_control")}
33
+ element(:destination_data_type) {b.span(:id => "batchExportDataType-destinationfield_line0_line#{line_id}_control")}
34
+ element(:destination_field) {b.span(:id => "bibmarc_destinationField_line0_line#{line_id}_control")}
35
+ element(:destination_field_2) {b.span(:id => "dataMappingOptions_destinationField1_line0_line#{line_id}_control")}
36
+ element(:destination_field_value) {b.span(:id => "dataMappingOptions_destinationFieldValue_line0_line#{line_id}_control")}
37
+ element(:priority) {b.span(:id => "dataMappingOptions_priority_line0_line#{line_id}_control")}
38
+ element(:delete_button) {b.button(:id => "addLineDataMapping-delete_line0_line#{line_id}")}
39
+ end
40
+ end
41
+ 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 Delete Field line on the OLE Library System Batch Process Bib Profile
17
+ class Batch_Delete_Field_Line < OLE_QA::Framework::Line_Object
18
+ def set_elements
19
+ element(:name) {b.span(:id => "deleteField_tag_line#{line_id}_control")}
20
+ element(:ind_1) {b.span(:id => "deleteField_indicator1_line#{line_id}_control")}
21
+ element(:ind_2) {b.span(:id => "deleteField_indicator2_line#{line_id}_control")}
22
+ element(:subfield) {b.span(:id => "deleteField_subField_line#{line_id}_control")}
23
+ element(:delete_button) {b.button(:id => "deleteField-delete_line#{line_id}")}
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,32 @@
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 Rename Field line on the OLE Library System Batch Process Bib Profile
17
+ class Batch_Rename_Field_Line < OLE_QA::Framework::Line_Object
18
+ def set_elements
19
+ element(:orig_tag) {b.span(:id => "originalField_originalTag_line#{line_id}_control")}
20
+ element(:orig_ind_1) {b.span(:id => "originalField_originalIndicator1_line#{line_id}_control")}
21
+ element(:orig_ind_2) {b.span(:id => "originalField_originalIndicator2_line#{line_id}_control")}
22
+ element(:orig_subfield) {b.span(:id => "originalField_originalSubField_line#{line_id}_control")}
23
+ element(:orig_contains) {b.span(:id => "originalField_originalSubFieldContains_line#{line_id}_control")}
24
+ element(:new_tag) {b.span(:id => "renameField_renamedTag_line#{line_id}")}
25
+ element(:new_ind_1) {b.span(:id => "renameField_renamedIndicator1_line#{line_id}_control")}
26
+ element(:new_ind_2) {b.span(:id => "renameField_renamedIndicator2_line#{line_id}")}
27
+ element(:new_subfield) {b.span(:id => "renameField_renamedSubField_line#{line_id}_control")}
28
+ element(:new_contains) {b.span(:id => "renameField_renamedSubFieldContains_line#{line_id}_control")}
29
+ element(:delete_button) {b.button(:id => "renameField-delete_line#{line_id}")}
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,28 @@
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 Filter Criteria Line on the OLE Library System Batch Export Process Profile
17
+ class Export_Filter_Line < OLE_QA::Framework::Line_Object
18
+
19
+ def set_elements
20
+ element(:name) {b.span(:id => "filterCriteria_filterFieldName_select_line#{line_id}_control")}
21
+ element(:name_readonly) {b.span(:id => "filterCriteria_filterFieldName_text_line#{line_id}_control")}
22
+ element(:value) {b.span(:id => "filterCriteria_filterFieldValue_line#{line_id}_control")}
23
+ element(:range_from) {b.span(:id => "filterCriteria_filterRangeFrom_line#{line_id}_control")}
24
+ element(:range_to) {b.span(:id => "filterCriteria_filterRangeTo_line#{line_id}_control")}
25
+ element(:delete_button) {b.button(:id => "filterCriteria-delete_line#{line_id}")}
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,27 @@
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 Defaults and Constants Line on an OLE Library System Batch Import Profile
17
+ class Import_Defaults_Line < OLE_QA::Framework::Line_Object
18
+ def set_elements
19
+ element(:data_type) {b.span(:id => "profileConstants_dataType_line#{line_id}_control")}
20
+ element(:field_name_1) {b.span(:id => "constant-datatype-bibmarc_line#{line_id}_control")}
21
+ element(:field_name_2) {b.span(:id => "profileConstants_attributeName1_line#{line_id}_control")}
22
+ element(:field_value) {b.span(:id => "profileConstants_attributeValue_line#{line_id}_control")}
23
+ element(:default_or_constant) {b.span(:id => "profileConstants_defaultValue_line#{line_id}_control")}
24
+ element(:delete_button) {b.button(:id => "ProfileConstant-delete_line#{line_id}")}
25
+ end
26
+ end
27
+ end
@@ -12,24 +12,12 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require "rspec"
16
- require "spec_helper"
17
-
18
-
19
- describe "The OLELS Main Menu" do
20
-
21
- before :all do
22
- @ole = OLE_QA::Framework::Session.new
23
- @olels = OLE_QA::Framework::OLELS::Main_Menu.new(@ole)
24
- end
25
-
26
- after :all do
27
- @ole.quit
28
- end
29
-
30
- it "should open via url" do
31
- @olels.open
32
- @ole.browser.title.should == "Kuali Portal Index"
15
+ module OLE_QA::Framework::OLELS
16
+ # A Data Match Point Line on an OLE Library System Batch Import Profile
17
+ class Import_Match_Line < OLE_QA::Framework::Line_Object
18
+ def set_elements
19
+ element(:match_point) {b.span(:id => "bibMatchPoint-oleBibMatchPoint_line#{line_id}_control")}
20
+ element(:delete_button) {b.button(:id => "bibMatchPoint-delete_line#{line_id}")}
21
+ end
33
22
  end
34
-
35
23
  end
@@ -0,0 +1,27 @@
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 Profile (Local) Protected Fields Line on an OLE Library System Batch Import Profile
17
+ class Import_PF_Line < OLE_QA::Framework::Line_Object
18
+ def set_elements
19
+ element(:tag) {b.span(:id => "profileProtectedFields_tag_line#{line_id}_control")}
20
+ element(:ind_1) {b.span(:id => "profileProtectedFields_firstIndicator_line#{line_id}_control")}
21
+ element(:ind_2) {b.span(:id => "profileProtectedFields_secondIndicator_line#{line_id}_control")}
22
+ element(:subfield) {b.span(:id => "profileProtectedFields_subField_line#{line_id}_control")}
23
+ element(:subfield_match) {b.span(:id => "profileProtectedFields_subFieldContains_line#{line_id}_control")}
24
+ element(:delete_button) {b.button(:id => "ProfileProtectedField-delete_line#{line_id}")}
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,82 @@
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 Batch Export Process Profile Page in the OLE Library System
17
+ class Batch_Export_Profile < OLE_QA::Framework::OLELS::Batch_Profile
18
+ def set_elements
19
+ super
20
+ element(:data_to_export_selector) {b.select_list(:id => 'mainSection-MaintenanceView-dataToExport_control')}
21
+ element(:export_scope_selector) {b.select_list(:id => 'mainSection-MaintenanceView-exportScope_control')}
22
+ element(:filter_criteria_toggle) {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-filterCriteriaSection_toggle')}
23
+ element(:data_mapping_toggle) {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-dataMappingSection_toggle')}
24
+ element(:delete_field_toggle) {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-deleteFieldSection_toggle')}
25
+ element(:rename_field_toggle) {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-renameFieldSection_toggle')}
26
+ # New Filter Line Elements
27
+ element(:filter_field_name_selector) {b.select_list(:id => 'filterCriteria_filterFieldName_select_add_control')}
28
+ element(:filter_field_name_field) {b.text_field(:id => 'filterCriteria_filterFieldName_text_add_control')}
29
+ element(:filter_field_value_field) {b.text_field(:id => 'filterCriteria_filterFieldValue_add_control')}
30
+ element(:filter_field_range_from) {b.text_field(:id => 'filterCriteria_filterRangeFrom_add_control')}
31
+ element(:filter_field_range_to) {b.text_field(:id => 'filterCriteria_filterRangeTo_add_control')}
32
+ element(:add_filter_line_button) {b.button(:id => 'addFilterMapping_add')}
33
+ # New Data Mapping Line Elements
34
+ # See note on {OLE_QA::Framework::OLELS::Batch_Data_Mapping_Line#set_elements} for an explanation of hard-coded line ID values.
35
+ element(:add_data_mapping_line_button) {b.button(:id => 'OLEBatchProcessProfileBo-MaintenanceView-dataMappingSection_add')}
36
+ element(:data_type_selector) {b.select_list(:id => 'batchExportDataTypeField_line0_add_control')}
37
+ element(:source_field_selector) {b.select_list(:id => 'remaining-sourcefield_line0_add_control')}
38
+ element(:source_field_name_readonly) {b.text_field(:id => 'dataMappingOptions_sourceField1_line0_add_control')}
39
+ element(:source_field_value_field) {b.text_field(:id => 'dataMappingOptions_sourceFieldValue_line0_add_control')}
40
+ element(:destination_data_type_selector) {b.select_list(:id => 'batchExportDataType-destinationfield_line0_add_control')}
41
+ element(:destination_field_selector) {b.select_list(:id => 'remaining-destinationField_line0_add_control')}
42
+ element(:destination_field_field) {b.text_field(:id => 'dataMappingOptions_destinationField1_line0_add_control')}
43
+ element(:destination_field_value_field) {b.text_field(:id => 'dataMappingOptions_destinationFieldValue_line0_add_control')}
44
+ element(:priority_field) {b.text_field(:id => 'dataMappingOptions_priority_line0_add_control')}
45
+ element(:add_data_mapping_rule_button) {b.button(:id => 'addDataMapping_line0_add')}
46
+ # Field Deletion Elements
47
+ element(:delete_name_field) {b.text_field(:id => 'deleteField_tag_add_control')}
48
+ element(:delete_ind_1_field) {b.text_field(:id => 'deleteField_indicator1_add_control')}
49
+ element(:delete_ind_2_field) {b.text_field(:id => 'deleteField_indicator2_add_control')}
50
+ element(:delete_subfield_field) {b.text_field(:id => 'deleteField_subField_add_control')}
51
+ element(:delete_subfield_contains_field) {b.text_field(:id => 'deleteField_subFieldContains_add_control')}
52
+ element(:add_delete_line_button) {b.button(:id => 'OLEBatchProcessProfileBo-MaintenanceView-deleteFieldSection_add')}
53
+ # Field Renaming Elements
54
+ element(:rename_orig_tag_field) {b.text_field(:id => 'originalField_originalTag_add_control')}
55
+ element(:rename_orig_ind_1_field) {b.text_field(:id => 'originalField_originalIndicator1_add_control')}
56
+ element(:rename_orig_ind_2_field) {b.text_field(:id => 'originalField_originalIndicator2_add_control')}
57
+ element(:rename_orig_subfield_field) {b.text_field(:id => 'originalField_originalSubField_add_control')}
58
+ element(:rename_orig_contains_field) {b.text_field(:id => 'originalField_originalSubFieldContains_add_control')}
59
+ element(:rename_new_tag_field) {b.text_field(:id => 'renameField_renamedTag_add_control')}
60
+ element(:rename_new_ind_1_field) {b.text_field(:id => 'renameField_renamedIndicator1_add_control')}
61
+ element(:rename_new_ind_2_field) {b.text_field(:id => 'renameField_renamedIndicator2_add_control')}
62
+ element(:rename_new_subfield_field) {b.text_field(:id => 'renameField_renamedSubField_add_control')}
63
+ element(:rename_new_contains_field) {b.text_field(:id => 'renameField_renamedSubFieldContains_add_control')}
64
+ element(:add_rename_field_button) {b.button(:id => 'OLEBatchProcessProfileBo-MaintenanceView-renameFieldSection_add')}
65
+ end
66
+
67
+ def wait_for_elements
68
+ super
69
+ end
70
+
71
+ def set_functions
72
+ super
73
+ end
74
+
75
+ def set_lines
76
+ set_line(:filter_line,OLE_QA::Framework::OLELS::Export_Filter_Line)
77
+ set_line(:data_mapping_line, OLE_QA::Framework::OLELS::Batch_Data_Mapping_Line)
78
+ set_line(:delete_field_line, OLE_QA::Framework::OLELS::Batch_Delete_Field_Line)
79
+ set_line(:rename_field_line, OLE_QA::Framework::OLELS::Batch_Rename_Field_Line)
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,136 @@
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 Batch Import Process Profile Page in the OLE Library System
17
+ class Batch_Import_Profile < OLE_QA::Framework::OLELS::Batch_Profile
18
+ def set_elements
19
+ super
20
+ # Toggle Elements
21
+ element(:match_point_toggle) {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-bibMatchPointSection_toggle')}
22
+ element(:bib_overlay_toggle) {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-bibAddOverlaySection_toggle')}
23
+ element(:instance_overlay_toggle) {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-instanceAddOverlaySection_toggle')}
24
+ element(:bib_status_toggle) {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-bibStatusSection_toggle')}
25
+ element(:staff_only_toggle) {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-staffOnlySection_toggle')}
26
+ element(:bib_changes_toggle) {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-changesToImport_toggle')}
27
+ element(:defaults_toggle) {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-profileConstantsSection_toggle')}
28
+ element(:data_mapping_toggle) {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-dataMappingSection_toggle')}
29
+ element(:protected_fields_toggle) {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-protectedFieldSection_toggle')}
30
+ element(:delete_field_toggle) {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-deleteFieldSection_toggle')}
31
+ element(:rename_field_toggle) {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-renameFieldSection_toggle')}
32
+ # Bib Match Point Elements
33
+ element(:new_match_point_field) {b.text_field(:id => 'bibMatchPoint-oleBibMatchPoint_add_control')}
34
+ element(:add_match_point_button) {b.button(:id => 'addProfileConstant_add')}
35
+ # Bib Overlay/Add Elements
36
+ element(:match_and_none) {b.radio(:id => 'bibAddOverlaySectionMatch-bibOverlayOrAddOrNone_control_0')}
37
+ element(:match_and_overlay) {b.radio(:id => 'bibAddOverlaySectionMatch-bibOverlayOrAddOrNone_control_1')}
38
+ element(:match_and_add) {b.radio(:id => 'bibAddOverlaySectionMatch-bibOverlayOrAddOrNone_control_2')}
39
+ # Instance Overlay/Add Elements
40
+ element(:instance_delete_and_add) {b.radio(:id => 'bibAddOverlaySectionMatch-instanceOverlayOrAddOrNone_control_0')}
41
+ element(:instance_keep_and_add) {b.radio(:id => 'bibAddOverlaySectionMatch-instanceOverlayOrAddOrNone_control_1')}
42
+ element(:instance_keep_and_no_add) {b.radio(:id => 'bibAddOverlaySectionMatch-instanceOverlayOrAddOrNone_control_2')}
43
+ element(:new_bib_no_instance) {b.radio(:id => 'bibAddOverlaySectionNoMatch-instanceNoMatch_control_0')}
44
+ element(:new_bib_new_instance) {b.radio(:id => 'bibAddOverlaySectionNoMatch-instanceNoMatch_control_1')}
45
+ # Bib Status Elements
46
+ element(:bib_status_selector) {b.select_list(:id => 'bibStatus-newBibStaus_control')}
47
+ element(:overlay_bib_status_yes) {b.radio(:id => 'bibStatus-noChangeOrSet_control_0')}
48
+ element(:overlay_bib_status_no) {b.radio(:id => 'bibStatus-noChangeOrSet_control_1')}
49
+ # Staff-Only Options
50
+ element(:staff_only_new_bib) {b.checkbox(:id => 'bibSetStaffOnly-bibStaffOnly_control')}
51
+ element(:staff_only_new_instance) {b.checkbox(:id => 'instanceSetStaffOnly-instanceStaffOnly_control')}
52
+ element(:staff_only_new_item) {b.checkbox(:id => 'itemSetStaffOnly-itemStaffOnly_control')}
53
+ # Changes to Imported Record
54
+ element(:bib_delete_001) {b.radio(:id => 'changesToImport-dontChange001_control_0')}
55
+ element(:bib_set_001_to_035) {b.radio(:id => 'changesToImport-dontChange001_control_1')}
56
+ # Constant and Default Values Elements
57
+ element(:new_data_type_selector) {b.select_list(:id => 'profileConstants_dataType_add_control')}
58
+ element(:new_field_name_selector) {b.select_list(:id => 'constant-datatype-remaining_add_control')}
59
+ element(:new_field_name_field) {b.text_field(:id => 'profileConstants_attributeName1_add_control')}
60
+ element(:new_field_value_field) {b.text_field(:id => 'profileConstants_attributeValue_add_control')}
61
+ element(:new_constant_option) {b.radio(:id => 'profileConstants_defaultValue_add_control_0')}
62
+ element(:new_default_option) {b.radio(:id => 'profileConstants_defaultValue_add_control_1')}
63
+ element(:add_default_button) {b.button(:id => 'OLEBatchProcessProfileBo-MaintenanceView-profileConstantsSection_add')}
64
+ # New Filter Line Elements
65
+ element(:filter_field_name_selector) {b.select_list(:id => 'filterCriteria_filterFieldName_select_add_control')}
66
+ element(:filter_field_name_field) {b.text_field(:id => 'filterCriteria_filterFieldName_text_add_control')}
67
+ element(:filter_field_value_field) {b.text_field(:id => 'filterCriteria_filterFieldValue_add_control')}
68
+ element(:filter_field_range_from) {b.text_field(:id => 'filterCriteria_filterRangeFrom_add_control')}
69
+ element(:filter_field_range_to) {b.text_field(:id => 'filterCriteria_filterRangeTo_add_control')}
70
+ element(:add_filter_line_button) {b.button(:id => 'addFilterMapping_add')}
71
+ # New Data Mapping Line Elements
72
+ # See note on {OLE_QA::Framework::OLELS::Batch_Data_Mapping_Line#set_elements} for an explanation of hard-coded line ID values.
73
+ element(:add_data_mapping_line_button) {b.button(:id => 'OLEBatchProcessProfileBo-MaintenanceView-dataMappingSection_add')}
74
+ element(:data_type_selector) {b.select_list(:id => 'batchExportDataTypeField_line0_add_control')}
75
+ element(:source_field_selector) {b.select_list(:id => 'remaining-sourcefield_line0_add_control')}
76
+ element(:source_field_name_readonly) {b.text_field(:id => 'dataMappingOptions_sourceField1_line0_add_control')}
77
+ element(:source_field_value_field) {b.text_field(:id => 'dataMappingOptions_sourceFieldValue_line0_add_control')}
78
+ element(:destination_data_type_selector) {b.select_list(:id => 'batchExportDataType-destinationfield_line0_add_control')}
79
+ element(:destination_field_selector) {b.select_list(:id => 'remaining-destinationField_line0_add_control')}
80
+ element(:destination_field_field) {b.text_field(:id => 'dataMappingOptions_destinationField1_line0_add_control')}
81
+ element(:destination_field_value_field) {b.text_field(:id => 'dataMappingOptions_destinationFieldValue_line0_add_control')}
82
+ element(:priority_field) {b.text_field(:id => 'dataMappingOptions_priority_line0_add_control')}
83
+ element(:add_data_mapping_rule_button) {b.button(:id => 'addDataMapping_line0_add')}
84
+ # Globally Protected Fields Checkboxes
85
+ element(:gpf_ignore_650) {b.checkbox(:id => 'batchGloballyProtectedFields_ignoreValue_line4_control')}
86
+ element(:gpf_ignore_790) {b.checkbox(:id => 'batchGloballyProtectedFields_ignoreValue_line0_control')}
87
+ element(:gpf_ignore_791) {b.checkbox(:id => 'batchGloballyProtectedFields_ignoreValue_line1_control')}
88
+ element(:gpf_ignore_792) {b.checkbox(:id => 'batchGloballyProtectedFields_ignoreValue_line2_control')}
89
+ element(:gpf_ignore_793) {b.checkbox(:id => 'batchGloballyProtectedFields_ignoreValue_line3_control')}
90
+ # Profile Protected Fields - New Line Elements
91
+ element(:protected_tag_field) {b.text_field(:id => 'profileProtectedFields_tag_add_control')}
92
+ element(:protected_ind_1_field) {b.text_field(:id => 'profileProtectedFields_firstIndicator_add_control')}
93
+ element(:protected_ind_2_field) {b.text_field(:id => 'profileProtectedFields_secondIndicator_add_control')}
94
+ element(:protected_subfield_field) {b.text_field(:id => 'profileProtectedFields_secondIndicator_add_control')}
95
+ element(:protected_subfield_match_field) {b.text_field(:id => 'profileProtectedFields_subFieldContains_add_control')}
96
+ element(:add_button) {b.button(:id => 'OLEBatchProcessProfile-profileProtectedFields_add')}
97
+ # Field Deletion Elements
98
+ element(:delete_name_field) {b.text_field(:id => 'deleteField_tag_add_control')}
99
+ element(:delete_ind_1_field) {b.text_field(:id => 'deleteField_indicator1_add_control')}
100
+ element(:delete_ind_2_field) {b.text_field(:id => 'deleteField_indicator2_add_control')}
101
+ element(:delete_subfield_field) {b.text_field(:id => 'deleteField_subField_add_control')}
102
+ element(:delete_subfield_contains_field) {b.text_field(:id => 'deleteField_subFieldContains_add_control')}
103
+ element(:add_delete_line_button) {b.button(:id => 'OLEBatchProcessProfileBo-MaintenanceView-deleteFieldSection_add')}
104
+ # Field Renaming Elements
105
+ element(:rename_orig_tag_field) {b.text_field(:id => 'originalField_originalTag_add_control')}
106
+ element(:rename_orig_ind_1_field) {b.text_field(:id => 'originalField_originalIndicator1_add_control')}
107
+ element(:rename_orig_ind_2_field) {b.text_field(:id => 'originalField_originalIndicator2_add_control')}
108
+ element(:rename_orig_subfield_field) {b.text_field(:id => 'originalField_originalSubField_add_control')}
109
+ element(:rename_orig_contains_field) {b.text_field(:id => 'originalField_originalSubFieldContains_add_control')}
110
+ element(:rename_new_tag_field) {b.text_field(:id => 'renameField_renamedTag_add_control')}
111
+ element(:rename_new_ind_1_field) {b.text_field(:id => 'renameField_renamedIndicator1_add_control')}
112
+ element(:rename_new_ind_2_field) {b.text_field(:id => 'renameField_renamedIndicator2_add_control')}
113
+ element(:rename_new_subfield_field) {b.text_field(:id => 'renameField_renamedSubField_add_control')}
114
+ element(:rename_new_contains_field) {b.text_field(:id => 'renameField_renamedSubFieldContains_add_control')}
115
+ element(:add_rename_field_button) {b.button(:id => 'OLEBatchProcessProfileBo-MaintenanceView-renameFieldSection_add')}
116
+ end
117
+
118
+ def wait_for_elements
119
+ super
120
+ end
121
+
122
+ def set_functions
123
+ super
124
+ end
125
+
126
+ def set_lines
127
+ set_line(:match_point_line, OLE_QA::Framework::OLELS::Import_Match_Line)
128
+ set_line(:defaults_line, OLE_QA::Framework::OLELS::Import_Defaults_Line)
129
+ set_line(:protected_fields_line, OLE_QA::Framework::OLELS::Import_PF_Line)
130
+ set_line(:data_mapping_line, OLE_QA::Framework::OLELS::Batch_Data_Mapping_Line)
131
+ set_line(:delete_field_line, OLE_QA::Framework::OLELS::Batch_Delete_Field_Line)
132
+ set_line(:rename_field_line, OLE_QA::Framework::OLELS::Batch_Rename_Field_Line)
133
+ end
134
+ end
135
+
136
+ end