Class: SyllabusEdit

Inherits:
SyllabusBase show all
Defined in:
lib/sakai-cle-test-api/page_objects/syllabus.rb

Overview

This is the page that lists Syllabus sections, allows for moving them up or down in the list, and allows for removing items from the syllabus.

Instance Method Summary collapse

Methods inherited from SyllabusBase

menu_elements

Methods inherited from BasePage

basic_page_elements, frame_element

Methods inherited from PageMaker

element, expected_element, expected_title, #initialize, #method_missing, page_url

Constructor Details

This class inherits a constructor from PageMaker

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class PageMaker

Instance Method Details

#check_title(title) ⇒ Object

Clicks the checkbox for the item with the specified title.



47
48
49
50
# File 'lib/sakai-cle-test-api/page_objects/syllabus.rb', line 47

def check_title(title)
  index=syllabus_titles.index(title)
  frm.checkbox(:index=>index).set
end

#move_title_down(title) ⇒ Object



58
59
60
# File 'lib/sakai-cle-test-api/page_objects/syllabus.rb', line 58

def move_title_down(title)
  #FIXME
end

#move_title_up(title) ⇒ Object



53
54
55
# File 'lib/sakai-cle-test-api/page_objects/syllabus.rb', line 53

def move_title_up(title)
  #FIXME
end

#open_item(title) ⇒ Object

Opens the specified item and instantiates the XXXX Class.



65
66
67
# File 'lib/sakai-cle-test-api/page_objects/syllabus.rb', line 65

def open_item(title)
  frm.link(:text=>title).click
end

#syllabus_titlesObject

Returns an array containing the titles of the syllabus items displayed on the page.



71
72
73
74
75
76
77
78
# File 'lib/sakai-cle-test-api/page_objects/syllabus.rb', line 71

def syllabus_titles
  titles = []
  s_table = frm.table(:class=>"listHier lines nolines")
  1.upto(s_table.rows.size-1) do |x|
    titles << s_table[x][0].text
  end
  return titles
end