Class: OLE_QA::Framework::OLELS::Batch_Import_Profile

Inherits:
Batch_Profile show all
Defined in:
lib/olels/pages/batch_import_profile.rb

Overview

A Batch Import Process Profile Page in the OLE Library System

Instance Attribute Summary

Attributes inherited from Page

#lines, #url, #wait_on

Attributes inherited from Common_Object

#elements, #functions, #ole

Instance Method Summary collapse

Methods inherited from Batch_Profile

#initialize

Methods inherited from Page

#initialize, #lookup, #lookup_url, #open, #set_line, #wait_for_element, #wait_for_page_to_load

Methods inherited from Common_Object

#initialize

Methods included from Helpers

#browser, #load_yml, #set_element, #set_function

Constructor Details

This class inherits a constructor from OLE_QA::Framework::OLELS::Batch_Profile

Instance Method Details

#set_elementsObject



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/olels/pages/batch_import_profile.rb', line 18

def set_elements
  super
  # Toggle Elements
  element(:match_point_toggle)                      {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-bibMatchPointSection_toggle')}
  element(:bib_overlay_toggle)                      {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-bibAddOverlaySection_toggle')}
  element(:instance_overlay_toggle)                 {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-instanceAddOverlaySection_toggle')}
  element(:bib_status_toggle)                       {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-bibStatusSection_toggle')}
  element(:staff_only_toggle)                       {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-staffOnlySection_toggle')}
  element(:bib_changes_toggle)                      {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-changesToImport_toggle')}
  element(:defaults_toggle)                         {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-profileConstantsSection_toggle')}
  element(:data_mapping_toggle)                     {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-dataMappingSection_toggle')}
  element(:protected_fields_toggle)                 {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-protectedFieldSection_toggle')}
  element(:delete_field_toggle)                     {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-deleteFieldSection_toggle')}
  element(:rename_field_toggle)                     {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-renameFieldSection_toggle')}
  # Bib Match Point Elements
  element(:new_match_point_field)                   {b.text_field(:id => 'bibMatchPoint-oleBibMatchPoint_add_control')}
  element(:add_match_point_button)                  {b.button(:id => 'addProfileConstant_add')}
  # Bib Overlay/Add Elements
  element(:match_and_none)                          {b.radio(:id => 'bibAddOverlaySectionMatch-bibOverlayOrAddOrNone_control_0')}
  element(:match_and_overlay)                       {b.radio(:id => 'bibAddOverlaySectionMatch-bibOverlayOrAddOrNone_control_1')}
  element(:match_and_add)                           {b.radio(:id => 'bibAddOverlaySectionMatch-bibOverlayOrAddOrNone_control_2')}
  # Instance Overlay/Add Elements
  element(:instance_delete_and_add)                 {b.radio(:id => 'bibAddOverlaySectionMatch-instanceOverlayOrAddOrNone_control_0')}
  element(:instance_keep_and_add)                   {b.radio(:id => 'bibAddOverlaySectionMatch-instanceOverlayOrAddOrNone_control_1')}
  element(:instance_keep_and_no_add)                {b.radio(:id => 'bibAddOverlaySectionMatch-instanceOverlayOrAddOrNone_control_2')}
  element(:new_bib_no_instance)                     {b.radio(:id => 'bibAddOverlaySectionNoMatch-instanceNoMatch_control_0')}
  element(:new_bib_new_instance)                    {b.radio(:id => 'bibAddOverlaySectionNoMatch-instanceNoMatch_control_1')}
  # Bib Status Elements
  element(:bib_status_selector)                     {b.select_list(:id => 'bibStatus-newBibStaus_control')}
  element(:overlay_bib_status_yes)                  {b.radio(:id => 'bibStatus-noChangeOrSet_control_0')}
  element(:overlay_bib_status_no)                   {b.radio(:id => 'bibStatus-noChangeOrSet_control_1')}
  # Staff-Only Options
  element(:staff_only_new_bib)                      {b.checkbox(:id => 'bibSetStaffOnly-bibStaffOnly_control')}
  element(:staff_only_new_instance)                 {b.checkbox(:id => 'instanceSetStaffOnly-instanceStaffOnly_control')}
  element(:staff_only_new_item)                     {b.checkbox(:id => 'itemSetStaffOnly-itemStaffOnly_control')}
  # Changes to Imported Record
  element(:bib_delete_001)                          {b.radio(:id => 'changesToImport-dontChange001_control_0')}
  element(:bib_set_001_to_035)                      {b.radio(:id => 'changesToImport-dontChange001_control_1')}
  # Constant and Default Values Elements
  element(:new_data_type_selector)                  {b.select_list(:id => 'profileConstants_dataType_add_control')}
  element(:new_field_name_selector)                 {b.select_list(:id => 'constant-datatype-remaining_add_control')}
  element(:new_field_name_field)                    {b.text_field(:id => 'profileConstants_attributeName1_add_control')}
  element(:new_field_value_field)                   {b.text_field(:id => 'profileConstants_attributeValue_add_control')}
  element(:new_constant_option)                     {b.radio(:id => 'profileConstants_defaultValue_add_control_0')}
  element(:new_default_option)                      {b.radio(:id => 'profileConstants_defaultValue_add_control_1')}
  element(:add_default_button)                      {b.button(:id => 'OLEBatchProcessProfileBo-MaintenanceView-profileConstantsSection_add')}
  # New Filter Line Elements
  element(:filter_field_name_selector)              {b.select_list(:id => 'filterCriteria_filterFieldName_select_add_control')}
  element(:filter_field_name_field)                 {b.text_field(:id => 'filterCriteria_filterFieldName_text_add_control')}
  element(:filter_field_value_field)                {b.text_field(:id => 'filterCriteria_filterFieldValue_add_control')}
  element(:filter_field_range_from)                 {b.text_field(:id => 'filterCriteria_filterRangeFrom_add_control')}
  element(:filter_field_range_to)                   {b.text_field(:id => 'filterCriteria_filterRangeTo_add_control')}
  element(:add_filter_line_button)                  {b.button(:id => 'addFilterMapping_add')}
  # New Data Mapping Line Elements
  # See note on {OLE_QA::Framework::OLELS::Batch_Data_Mapping_Line#set_elements} for an explanation of hard-coded line ID values.
  element(:add_data_mapping_line_button)            {b.button(:id => 'OLEBatchProcessProfileBo-MaintenanceView-dataMappingSection_add')}
  element(:data_type_selector)                      {b.select_list(:id => 'batchExportDataTypeField_line0_add_control')}
  element(:source_field_selector)                   {b.select_list(:id => 'remaining-sourcefield_line0_add_control')}
  element(:source_field_name_readonly)              {b.text_field(:id => 'dataMappingOptions_sourceField1_line0_add_control')}
  element(:source_field_value_field)                {b.text_field(:id => 'dataMappingOptions_sourceFieldValue_line0_add_control')}
  element(:destination_data_type_selector)          {b.select_list(:id => 'batchExportDataType-destinationfield_line0_add_control')}
  element(:destination_field_selector)              {b.select_list(:id => 'remaining-destinationField_line0_add_control')}
  element(:destination_field_field)                 {b.text_field(:id => 'dataMappingOptions_destinationField1_line0_add_control')}
  element(:destination_field_value_field)           {b.text_field(:id => 'dataMappingOptions_destinationFieldValue_line0_add_control')}
  element(:priority_field)                          {b.text_field(:id => 'dataMappingOptions_priority_line0_add_control')}
  element(:add_data_mapping_rule_button)            {b.button(:id => 'addDataMapping_line0_add')}
  # Globally Protected Fields Checkboxes
  element(:gpf_ignore_650)                          {b.checkbox(:id => 'batchGloballyProtectedFields_ignoreValue_line4_control')}
  element(:gpf_ignore_790)                          {b.checkbox(:id => 'batchGloballyProtectedFields_ignoreValue_line0_control')}
  element(:gpf_ignore_791)                          {b.checkbox(:id => 'batchGloballyProtectedFields_ignoreValue_line1_control')}
  element(:gpf_ignore_792)                          {b.checkbox(:id => 'batchGloballyProtectedFields_ignoreValue_line2_control')}
  element(:gpf_ignore_793)                          {b.checkbox(:id => 'batchGloballyProtectedFields_ignoreValue_line3_control')}
  # Profile Protected Fields - New Line Elements
  element(:protected_tag_field)                     {b.text_field(:id => 'profileProtectedFields_tag_add_control')}
  element(:protected_ind_1_field)                   {b.text_field(:id => 'profileProtectedFields_firstIndicator_add_control')}
  element(:protected_ind_2_field)                   {b.text_field(:id => 'profileProtectedFields_secondIndicator_add_control')}
  element(:protected_subfield_field)                {b.text_field(:id => 'profileProtectedFields_secondIndicator_add_control')}
  element(:protected_subfield_match_field)          {b.text_field(:id => 'profileProtectedFields_subFieldContains_add_control')}
  element(:add_button)                              {b.button(:id => 'OLEBatchProcessProfile-profileProtectedFields_add')}
  # Field Deletion Elements
  element(:delete_name_field)                       {b.text_field(:id => 'deleteField_tag_add_control')}
  element(:delete_ind_1_field)                      {b.text_field(:id => 'deleteField_indicator1_add_control')}
  element(:delete_ind_2_field)                      {b.text_field(:id => 'deleteField_indicator2_add_control')}
  element(:delete_subfield_field)                   {b.text_field(:id => 'deleteField_subField_add_control')}
  element(:delete_subfield_contains_field)          {b.text_field(:id => 'deleteField_subFieldContains_add_control')}
  element(:add_delete_line_button)                  {b.button(:id => 'OLEBatchProcessProfileBo-MaintenanceView-deleteFieldSection_add')}
  # Field Renaming Elements
  element(:rename_orig_tag_field)                   {b.text_field(:id => 'originalField_originalTag_add_control')}
  element(:rename_orig_ind_1_field)                 {b.text_field(:id => 'originalField_originalIndicator1_add_control')}
  element(:rename_orig_ind_2_field)                 {b.text_field(:id => 'originalField_originalIndicator2_add_control')}
  element(:rename_orig_subfield_field)              {b.text_field(:id => 'originalField_originalSubField_add_control')}
  element(:rename_orig_contains_field)              {b.text_field(:id => 'originalField_originalSubFieldContains_add_control')}
  element(:rename_new_tag_field)                    {b.text_field(:id => 'renameField_renamedTag_add_control')}
  element(:rename_new_ind_1_field)                  {b.text_field(:id => 'renameField_renamedIndicator1_add_control')}
  element(:rename_new_ind_2_field)                  {b.text_field(:id => 'renameField_renamedIndicator2_add_control')}
  element(:rename_new_subfield_field)               {b.text_field(:id => 'renameField_renamedSubField_add_control')}
  element(:rename_new_contains_field)               {b.text_field(:id => 'renameField_renamedSubFieldContains_add_control')}
  element(:add_rename_field_button)                 {b.button(:id => 'OLEBatchProcessProfileBo-MaintenanceView-renameFieldSection_add')}

  # Matching, Add, and Overlay Section
  element(:match_section_toggle)                    {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-matchingAddOverlaySection_toggle')}
  element(:match_section_toggled?)                  {b.div(:id => 'OLEBatchProcessProfileBo-MaintenanceView-matchingAddOverlaySection_disclosureContent').present?}
  # - Do not perform matching
  element(:bib_no_match)                            {b.radio(:id => 'matchingAddOverlaySection-bibNotMatch_control_0')}
  element(:bib_no_match_add)                        {b.radio(:id => 'matchingAddOverlaySection-bibNotMatch-addBibs_control_0')}
  # - Perform matching
  element(:bib_do_match)                            {b.radio(:id => 'matchingAddOverlaySection-bibMatch_control_0')}
  # - - If bib does not match
  element(:bib_discard_unmatchd)                    {b.radio(:id => 'matchingAddOverlaySection-bibNotMatched-discardBib_control_0')}
  element(:bib_add_unmatched)                       {b.radio(:id => 'matchingAddOverlaySection-bibNotMatched-discardBib_control_1')}
  # - - If bib does match
  element(:bib_add_matched)                         {b.radio(:id => 'matchingAddOverlaySection-bibMatched-discardBib_control_0')}
  element(:bib_process_matched)                     {b.radio(:id => 'matchingAddOverlaySection-bibMatched-discardBib_control_1')}
  # - - - Process bib
  element(:bib_discard_matched)                     {b.radio(:id => 'matchingAddOverlaySection-bibMatched-discardOrUpdate_control_0')}
  element(:bib_overlay_matched)                     {b.radio(:id => 'matchingAddOverlaySection-bibMatched-discardOrUpdate_control_1')}
  # - - - - Overlay Bib Status
  element(:bib_overlay_status_selector)             {b.select_list(:id => 'bibAddOverlaySectionBibStatus-batchProcessBibStatus_add_control')}
  element(:bib_overlay_status_add_button)           {b.button(:id => 'bibAddOverlaySection-bibStatus_add')}
  # Process Holdings
  element(:match_holdings_toggle)                   {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-holdingsAndItemProcessOverlaySection_toggle')}
  element(:match_holdings_toggled?)                 {b.div(:id => 'OLEBatchProcessProfileBo-MaintenanceView-holdingsAndItemProcessOverlaySection_disclosureContent').present?}
  # - Do not perform matching
  element(:holdings_no_match)                       {b.radio(:id => 'matchingAddOverlaySection-notPerformHoldingMatched_control_0')}
  element(:holdings_discard_all)                    {b.radio(:id => 'matchingAddOverlaySection-notPerformHoldingMatched-processHoldingAndItem_control_0')}
  element(:holdings_drop_and_add)                   {b.radio(:id => 'matchingAddOverlaySection-notPerformHoldingMatched-processHoldingAndItem_control_1')}
  element(:holdings_keep_all)                       {b.radio(:id => 'matchingAddOverlaySection-notPerformHoldingMatched-processHoldingAndItem_control_2')}
  # - Perform matching
  element(:holdings_do_match)                       {b.radio(:id => 'matchingAddOverlaySection-performHoldingMatched_control_0')}
  # - - If incoming holdings do not match
  element(:holdings_discard_unmatched)              {b.radio(:id => 'matchingAddOverlaySection-incomingHoldingNotMatched_control_0')}
  element(:holdings_add_unmatched)                  {b.radio(:id => 'matchingAddOverlaySection-incomingHoldingNotMatched-addHolding_control_0')}
  element(:holdings_add_unmatched_items)            {b.checkbox(:id => 'matchingAddOverlaySection-incomingHoldingNotMatched-addItem_control')}
  # - - If incoming holdings do match
  element(:holdings_add_matched)                    {b.radio(:id => 'matchingAddOverlaySection-incomingHoldingNotMatched-addItem_control')}
  element(:holdings_add_matched_items)              {b.checkbox(:id => 'matchingAddOverlaySection-incomingHoldingNotMatched-addItsItem_control')}
  element(:holdings_process_matched)                {b.radio(:id => 'matchingAddOverlaySection-incomingHoldingMatched_control_0')}
  # - - - Process holdings matches
  element(:holdings_discard_matched)                {b.radio(:id => 'matchingAddOverlaySection-incomingHoldingMatched-processHolding_control_0')}
  element(:holdings_overlay_matched)                {b.radio(:id => 'matchingAddOverlaySection-incomingHoldingMatched-processHolding_control_1')}
  # Process Items
  element(:match_item_toggle)                       {b.a(:id => 'OLEBatchProcessProfileBo-MaintenanceView-itemProcessOverlaySection_toggle')}
  element(:match_item_toggled?)                     {b.div(:id => 'OLEBatchProcessProfileBo-MaintenanceView-itemProcessOverlaySection_disclosureContent').present?}
  # - Do not perform matching
  element(:item_no_match)                           {b.radio(:id => 'matchingAddOverlaySection-incomingHoldingNotMatched-notMatchProcessItem_control_0')}
  element(:item_discard_all)                        {b.radio(:id => 'matchingAddOverlaySection-incomingHoldingNotMatched-discardDeleteKeepItem_control_0')}
  element(:item_drop_extant)                        {b.radio(:id => 'matchingAddOverlaySection-incomingHoldingNotMatched-discardDeleteKeepItem_control_1')}
  element(:item_keep_all)                           {b.radio(:id => 'matchingAddOverlaySection-incomingHoldingNotMatched-discardDeleteKeepItem_control_2')}
  # - Perform matching
  element(:item_do_match)                           {b.radio(:id => 'matchingAddOverlaySection-incomingHoldingMatched-matchProcessItem_control_0')}
  # - - If incoming items do not match
  element(:item_drop_unmatched)                     {b.radio(:id => 'matchingAddOverlaySection-incomingItemNotMatched-ProcessItem_control_0')}
  element(:item_add_unmatched)                      {b.radio(:id => 'matchingAddOverlaySection-incomingItemNotMatched-ProcessItem_control_1')}
  # - - If incoming items do match
  element(:item_add_matched)                        {b.radio(:id => 'matchingAddOverlaySection-incomingItemMatched-ProcessItem_control_0')}
  element(:item_overlay_matched)                    {b.radio(:id => 'matchingAddOverlaySection-incomingItemMatched-ProcessItem_control_1')}
end

#set_functionsObject



180
181
182
# File 'lib/olels/pages/batch_import_profile.rb', line 180

def set_functions
  super
end

#set_linesObject



184
185
186
187
188
189
190
191
# File 'lib/olels/pages/batch_import_profile.rb', line 184

def set_lines
  set_line(:match_point_line,       OLE_QA::Framework::OLELS::Import_Match_Line)
  set_line(:defaults_line,          OLE_QA::Framework::OLELS::Import_Defaults_Line)
  set_line(:protected_fields_line,  OLE_QA::Framework::OLELS::Import_PF_Line)
  set_line(:data_mapping_line,      OLE_QA::Framework::OLELS::Batch_Data_Mapping_Line)
  set_line(:delete_field_line,      OLE_QA::Framework::OLELS::Batch_Delete_Field_Line)
  set_line(:rename_field_line,      OLE_QA::Framework::OLELS::Batch_Rename_Field_Line)
end

#wait_for_elementsObject



176
177
178
# File 'lib/olels/pages/batch_import_profile.rb', line 176

def wait_for_elements
  super
end