Module: AddEditEventMethods

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

Instance Method Summary collapse

Instance Method Details

#add_attachmentsObject



277
278
279
280
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 277

def add_attachments
  frm.button(:value=>"Add Attachments").click
  EventAttach.new(@browser)
end

#add_remove_attachmentsObject



282
283
284
285
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 282

def add_remove_attachments
  frm.button(:value=>"Add/remove attachments").click
  EventAttach.new(@browser)
end

#attachment?(file_name) ⇒ Boolean

Returns true if the page has a link with the specified file name. Use for test case asserts.

Returns:

  • (Boolean)


289
290
291
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 289

def attachment?(file_name)
  frm.link(:text=>file_name).exist?
end

#custom_field_text(field, text) ⇒ Object

Use this method to enter text into custom fields on the page. The “field” variable is the name of the field, while the “text” is the string you want to put into it.



297
298
299
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 297

def custom_field_text(field, text)
  frm.text_field(:name=>field).set(text)
end

#frequencyObject



272
273
274
275
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 272

def frequency
  frm.button(:name=>"eventSubmit_doEditfrequency").click
  EventFrequency.new(@browser)
end

#message=(text) ⇒ Object



262
263
264
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 262

def message=(text)
  frm.frame(:id, "description___Frame").td(:id, "xEditingArea").frame(:index=>0).send_keys(text)
end

#message_editorObject

The FCKEditor object. Use this method to set up a “wait_until_present” step, since sometimes it takes a long time for this object to load.



268
269
270
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 268

def message_editor
  frm.frame(:id, "description___Frame").td(:id, "xEditingArea").frame(:index=>0)
end

#save_eventObject



257
258
259
260
# File 'lib/kuali-sakai-common-lib/calendar.rb', line 257

def save_event
  frm.button(:value=>"Save Event").click
  Calendar.new(@browser)
end