Module: EventDetailMethods

Defined in:
lib/kuali-sakai-common-lib/calendar.rb

Instance Method Summary collapse

Instance Method Details

#back_to_calendarObject



212
213
214
215
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 212

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.



244
245
246
247
248
249
250
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 244

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

#editObject



231
232
233
234
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 231

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

#event_titleObject



227
228
229
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 227

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

#go_to_todayObject

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



207
208
209
210
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 207

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

#last_eventObject



217
218
219
220
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 217

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

#next_eventObject



222
223
224
225
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 222

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

#remove_eventObject



236
237
238
239
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 236

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