Class: AddEditEvent

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

Instance Method Summary collapse

Methods included from FCKEditor

#enter_source_text, #entity_picker, #get_source_text, #select_all, #source, #source_field

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

#add_attachmentsObject



266
267
268
269
# File 'lib/sakai-cle-test-api/page_objects/calendar.rb', line 266

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

#add_remove_attachmentsObject



271
272
273
274
# File 'lib/sakai-cle-test-api/page_objects/calendar.rb', line 271

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)


278
279
280
# File 'lib/sakai-cle-test-api/page_objects/calendar.rb', line 278

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.



286
287
288
# File 'lib/sakai-cle-test-api/page_objects/calendar.rb', line 286

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

#frequencyObject



261
262
263
264
# File 'lib/sakai-cle-test-api/page_objects/calendar.rb', line 261

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

#message=(text) ⇒ Object



253
254
255
# File 'lib/sakai-cle-test-api/page_objects/calendar.rb', line 253

def message=(text)
  message_editor.send_keys(text)
end