Class: OLE_QA::Framework::OLELS::Instance_Editor

Inherits:
Editor show all
Defined in:
lib/olels/pages/instance_editor.rb

Overview

The OLE Library System MARC Instance Record Editor Screen

Instance Attribute Summary

Attributes inherited from Page

#url

Attributes inherited from Common_Object

#elements, #functions, #ole

Instance Method Summary collapse

Methods inherited from Editor

#create_line, #initialize, #remove_line, #set_functions

Methods inherited from Page

#initialize, #open, #set_functions, #wait_for_element, #wait_for_page_to_load

Methods inherited from Common_Object

#initialize, #set_functions

Methods included from Helpers

#browser, #load_yml, #set_element, #set_function

Constructor Details

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

Instance Method Details

#create_access_info_line(which = 1) ⇒ Object Also known as: add_access_info_line



61
62
63
# File 'lib/olels/pages/instance_editor.rb', line 61

def create_access_info_line(which = 1)
  create_line("access_info_line_#{which}","Access_Info_Line",which)
end

#create_holdings_note(which = 1) ⇒ Object Also known as: add_holdings_note



66
67
68
# File 'lib/olels/pages/instance_editor.rb', line 66

def create_holdings_note(which = 1)
  create_line("holdings_note_#{which}","Holdings_Note",which)
end

#create_ownership_extent_line(which = 1) ⇒ Object Also known as: add_ownership_extent_line



56
57
58
# File 'lib/olels/pages/instance_editor.rb', line 56

def create_ownership_extent_line(which = 1)
  create_line("ownership_extent_line_#{which}","Ownership_Extent_Line",which)
end

#remove_access_info_line(which = 1) ⇒ Object Also known as: delete_access_info_line



76
77
78
# File 'lib/olels/pages/instance_editor.rb', line 76

def remove_access_info_line(which = 1)
  remove_line("access_info_line_#{which}")
end

#remove_holdings_note(which = 1) ⇒ Object Also known as: delete_holdings_note



81
82
83
# File 'lib/olels/pages/instance_editor.rb', line 81

def remove_holdings_note(which = 1)
  remove_line("holdings_note_#{which}")
end

#remove_ownership_extent_line(which = 1) ⇒ Object Also known as: delete_ownership_extent_line



71
72
73
# File 'lib/olels/pages/instance_editor.rb', line 71

def remove_ownership_extent_line(which = 1)
  remove_line("ownership_extent_line_#{which}")
end

#set_elementsObject

Set OLELS Instance Editor page elements.



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
# File 'lib/olels/pages/instance_editor.rb', line 19

def set_elements
  super
  element(:location_toggle)                       {b.a(:id => "OleLocationInformationSection_toggle")}
  element(:location_field)                        {b.text_field(:id => "OleHoldingLocation_control")}
  element(:call_number_toggle)                    {b.a(:id => "OleCallNumberInformation_toggle")}
  element(:prefix_field)                          {b.text_field(:id => "OleHoldingCallNumberPrefix_control")}
  element(:call_number_field)                     {b.text_field(:id => "OleHoldingCallNumber_control")}
  element(:shelving_order_field)                  {b.text_field(:id => "OleHoldingShelvingOrder_control")}
  element(:call_number_type_selector)             {b.select_list(:id => "OleHoldingShelvingScheme_control")}
  element(:call_number_browse_button)             {b.button(:id => "callNumberHoldingsBrowseLink")}
  element(:ownership_extent_toggle)               {b.a(:id => "OleExtentOfOwnershipSection_toggle")}
  element(:extended_information_toggle)           {b.a(:id => "OleExtendedInformationSection_toggle")}
  element(:receipt_status_selector)               {b.select_list(:id => "OleReceiptStatusField_control")}
  element(:holding_notes_toggle)                  {b.a(:id => "OleHoldingNotes_toggle")}
  element(:holdings_notes_toggle)                 {b.a(:id => "OleHoldingNotes_toggle")}
  # Read-Only Elements (non-iterative fields not requiring input)
  element(:readonly_edit_button)                  {b.button(:text => /Edit/)}
  element(:readonly_location)                     {b.span(:id => 'OleHoldingLocation_control')}
  element(:readonly_prefix)                       {b.span(:id => 'OleHoldingCallNumberPrefix_control')}
  element(:readonly_call_number)                  {b.span(:id => 'OleHoldingCallNumber_control')}
  element(:readonly_call_number_type)             {b.span(:id => 'OleHoldingShelvingScheme_control')}
  element(:readonly_shelving_order)               {b.span(:id => 'OleHoldingShelvingOrder_control')}
  element(:readonly_created_by)                   {b.span(:id => 'createdByHolding_control')}
  element(:readonly_created_date)                 {b.span(:id => 'createdDateHolding_control')}
end

#set_linesObject



50
51
52
53
54
# File 'lib/olels/pages/instance_editor.rb', line 50

def set_lines
  create_ownership_extent_line(1)
  create_access_info_line(1)
  create_holdings_note(1)
end

#wait_for_elementsObject

Wait for location field to appear when opening page.



46
47
48
# File 'lib/olels/pages/instance_editor.rb', line 46

def wait_for_elements
  super
end