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, #wait_for_element, #wait_for_page_to_load

Methods included from Page_Helpers

#login, #logout

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



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

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



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

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



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

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



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

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



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

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



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

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

#set_elements ⇒ Object

Set OLELS Instance Editor page elements.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/olels/pages/instance_editor.rb', line 19

def set_elements
  super
  # Override :message element on Editor base class.
  element(:message)                               {b.span(:id => "workInstanceMessage_span")}
  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")}
end

#set_lines ⇒ Object



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

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

#wait_for_elements ⇒ Object

Wait for location field to appear when opening page.



39
40
41
42
# File 'lib/olels/pages/instance_editor.rb', line 39

def wait_for_elements
  super
  @wait_on << :location_field
end