class OLE_QA::Framework::OLELS::Batch_File_List

A File List screen for a Batch Export in the OLE Library System

Public Class Methods

new(ole_session) click to toggle source

Uses Batch Job Details page link.

Calls superclass method OLE_QA::Framework::Page::new
# File lib/olels/pages/batch_file_list.rb, line 19
def initialize(ole_session)
  url = ole_session.url + 'portal.do?channelTitle=Batch Process Job Details&channelUrl='
  url += ole_session.url + 'ole-kr-krad/oleBatchProcessJobController?viewId=OLEBatchProcessJobDetailsView&methodToCall=jobDocHandler&command=initiate&documentClass=org.kuali.ole.batch.bo.OLEBatchProcessJobDetailsBo'
  super(ole_session, url)
end

Public Instance Methods

set_elements() click to toggle source
Calls superclass method OLE_QA::Framework::Page#set_elements
# File lib/olels/pages/batch_file_list.rb, line 25
def set_elements
  super
  element(:title)                               {b.span(:class => 'uif-headerText-span')}
  element(:entries_selector)                    {b.label(:text => /^Show/,:text => /entries$/).select_list(:index => 0)}
  element(:entries_text)                        {b.div(:class => 'dataTables_info',:text => /Showing \d+ to \d+ of \d+ entries/)}
  element(:next_button)                         {b.a(:class => 'paginate_active',:class => 'next')}
  element(:previous_button)                     {b.a(:class => 'paginate_active',:class => 'previous')}
  element(:first_button)                        {b.a(:class => 'paginate_active',:class => 'first')}
  element(:last_button)                         {b.a(:class => 'paginate_active',:class => 'last')}
end
set_functions() click to toggle source
Calls superclass method OLE_QA::Framework::Page#set_functions
# File lib/olels/pages/batch_file_list.rb, line 36
def set_functions
  super
  # Return the link to a file by searching for the given string or regular expression in the filename.
  function(:link_by_filename)                   {|which| b.div(:class => 'uif-linkField',:id => /fileList_line\d+/,:text => which).a}
  # Return whether the link to a file with the given text or regular expression is present.
  function(:link_by_filename?)                  {|which| link_by_filename(which).present?}
  # Return how many total entries exist for this staging area directory.
  #   e.g. Y in 'Showing 1 to X of Y entries'
  function(:total_entries)                      { entries_text.present? ? entries_list.text.match(/\d+(?= entries)/)[0] : 0}
end
wait_for_elements() click to toggle source
# File lib/olels/pages/batch_file_list.rb, line 47
def wait_for_elements
  super
  @wait_on << :title
  @wait_on << :entries_text
  @wait_on << :next_button << :previous_button
end