Class: EventDetail

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

Overview

The page that appears when you click on an event in the Calendar

Instance Method Summary collapse

Methods inherited from CalendarBase

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

#back_to_calendarObject



198
199
200
201
# File 'lib/sakai-cle-test-api/page_objects/calendar.rb', line 198

def back_to_calendar
  frm.button(:value=>"Back to Calendar").click
  Calendar.new(@browser)
end

#detailsObject

Returns a hash object containing the contents of the event details table on the page, with each of the header column items as a Key and the associated data column as the corresponding Value.



230
231
232
233
234
235
236
# File 'lib/sakai-cle-test-api/page_objects/calendar.rb', line 230

def details
  details = {}
  frm.table(:class=>"itemSummary").rows.each do |row|
    details.store(row.th.text, row.td.text)
  end
  return details
end

#editObject



217
218
219
220
# File 'lib/sakai-cle-test-api/page_objects/calendar.rb', line 217

def edit
  frm.button(:value=>"Edit").click
  AddEditEvent.new(@browser)
end

#event_titleObject



213
214
215
# File 'lib/sakai-cle-test-api/page_objects/calendar.rb', line 213

def event_title
  frm.div(:class=>"portletBody").h3.text
end

#go_to_todayObject

Clicks the Go to Today button, then instantiates the Calendar class.



193
194
195
196
# File 'lib/sakai-cle-test-api/page_objects/calendar.rb', line 193

def go_to_today
  frm.button(:value=>"Go to Today").click
  Calendar.new(@browser)
end

#last_eventObject



203
204
205
206
# File 'lib/sakai-cle-test-api/page_objects/calendar.rb', line 203

def last_event
  frm().button(:value=>"< Last Event").click
  EventDetail.new(@browser)
end

#next_eventObject



208
209
210
211
# File 'lib/sakai-cle-test-api/page_objects/calendar.rb', line 208

def next_event
  frm().button(:value=>"Next Event >").click
  EventDetail.new(@browser)
end

#remove_eventObject



222
223
224
225
# File 'lib/sakai-cle-test-api/page_objects/calendar.rb', line 222

def remove_event
  frm.button(:value=>"Remove event").click
  DeleteConfirm.new(@browser)
end