Module: ComposeForumMessageMethods

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

Instance Method Summary collapse

Instance Method Details

#add_attachmentsObject



153
154
155
# File 'lib/kuali-sakai-common-lib/forums.rb', line 153

def add_attachments
  #FIXME
end

#cancelObject



157
158
159
160
161
162
163
164
165
# File 'lib/kuali-sakai-common-lib/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

#editorObject



141
142
143
# File 'lib/kuali-sakai-common-lib/forums.rb', line 141

def editor
  frm.frame(:id, "dfCompose:df_compose_body_inputRichText___Frame").td(:id, "xEditingArea").frame(:index=>0)
end

#message=(text) ⇒ Object



145
146
147
# File 'lib/kuali-sakai-common-lib/forums.rb', line 145

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

#post_messageObject



135
136
137
138
139
# File 'lib/kuali-sakai-common-lib/forums.rb', line 135

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/kuali-sakai-common-lib/forums.rb', line 149

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