Class: ComposeForumMessage

Inherits:
BasePage show all
Includes:
FCKEditor
Defined in:
lib/sakai-cle-test-api/page_objects/forums.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 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



153
154
155
# File 'lib/sakai-cle-test-api/page_objects/forums.rb', line 153

def add_attachments
  #FIXME
end

#cancelObject



157
158
159
160
161
162
163
164
165
# File 'lib/sakai-cle-test-api/page_objects/forums.rb', line 157

def cancel
  frm.button(:value=>"Cancel").click
  # Logic for picking the correct page class
  if frm.link(:text=>"Reply to Thread")
    ViewForumThread.new(@browser)
  elsif frm.link(:text=>"Post New Thread").click
    TopicPage.new(@browser)
  end
end

#message=(text) ⇒ Object



145
146
147
# File 'lib/sakai-cle-test-api/page_objects/forums.rb', line 145

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

#post_messageObject



137
138
139
140
141
# File 'lib/sakai-cle-test-api/page_objects/forums.rb', line 137

def post_message
  frm.button(:text=>"Post Message").click
  # Not sure if we need logic here...
  TopicPage.new(@browser)
end

#reply_textObject



149
150
151
# File 'lib/sakai-cle-test-api/page_objects/forums.rb', line 149

def reply_text
  @browser.frame(:index=>1).div(:class=>"singleMessageReply").text
end