Class: AddEditAnnouncements

Inherits:
BasePage
  • Object
show all
Includes:
FCKEditor
Defined in:
lib/sambal-cle/page_objects/announcements.rb

Overview

The page where an announcement is created or edited.

Instance Method Summary collapse

Methods included from FCKEditor

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

Methods inherited from BasePage

basic_page_elements, frame_element

Instance Method Details

#body=(text) ⇒ Object

Sends the specified text block to the rich text editor

Parameters:

  • text (String)

    the text that you want to add to the editor.



131
132
133
# File 'lib/sambal-cle/page_objects/announcements.rb', line 131

def body=(text)
  editor.td(:id, "xEditingArea").frame(:index=>0).send_keys(text)
end

#check_group(group_name) ⇒ Object

Clicks the checkbox for the specified group name when you’ve set the announcement access to display to groups.

Parameters:

  • group_name (String)

    the name of the group in the table that you intend to select.



142
143
144
# File 'lib/sambal-cle/page_objects/announcements.rb', line 142

def check_group(group_name)
  frm.table(:id=>"groupTable").row(:text=>/#{Regexp.escape(group_name)}/).checkbox(:name=>"selectedGroups").set
end