Class: FolderList
- Defined in:
- lib/sakai-cle-test-api/page_objects/messages.rb
Overview
Page for the Contents of a Custom Folder for Messages
Instance Method Summary collapse
-
#alert_message_text ⇒ Object
Grabs the text from the message box that appears after doing some action.
-
#check_message(subject) ⇒ Object
Checks the checkbox for the specified message in the list.
- #compose_message ⇒ Object
-
#mark_read ⇒ Object
Clicks the “Mark Read” link, then reinstantiates the class because the page partially refreshes.
-
#messages ⇒ Object
Clicks the Messages link in the Breadcrumb bar at the top of the page, then instantiates the Messages class.
- #move ⇒ Object
-
#open_message(subject) ⇒ Object
Clicks on the specified message subject then instantiates the MessageView class.
-
#subjects ⇒ Object
Creates an array consisting of the message subject lines.
- #unread_messages ⇒ Object
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
#alert_message_text ⇒ Object
Grabs the text from the message box that appears after doing some action.
Use this method to simplify writing Test::Unit asserts
242 243 244 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 242 def frm.span(:class=>"success").text end |
#check_message(subject) ⇒ Object
Checks the checkbox for the specified message in the list.
Will throw an error if the specified subject is not present.
251 252 253 254 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 251 def (subject) index=subjects.index(subject) frm.checkbox(:name=>"prefs_pvt_form:pvtmsgs:#{index}:_id122").set end |
#compose_message ⇒ Object
224 225 226 227 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 224 def frm.link(:text=>"Compose Message").click ComposeMessage.new(@browser) end |
#mark_read ⇒ Object
Clicks the “Mark Read” link, then reinstantiates the class because the page partially refreshes.
268 269 270 271 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 268 def mark_read frm.link(:text=>"Mark Read").click MessagesReceivedList.new(@browser) end |
#messages ⇒ Object
Clicks the Messages link in the Breadcrumb bar at the top of the page, then instantiates the Messages class
260 261 262 263 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 260 def frm.link(:text=>"Messages").click Messages.new(@browser) end |
#move ⇒ Object
288 289 290 291 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 288 def move frm.link(:text, "Move").click MoveMessageTo.new(@browser) end |
#open_message(subject) ⇒ Object
Clicks on the specified message subject then instantiates the MessageView class.
231 232 233 234 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 231 def (subject) frm.link(:text, /#{Regexp.escape(subject)}/).click MessageView.new(@browser) end |
#subjects ⇒ Object
Creates an array consisting of the message subject lines.
275 276 277 278 279 280 281 282 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 275 def subjects titles = [] = frm.table(:id=>"prefs_pvt_form:pvtmsgs") 1.upto(.rows.size-1) do |x| titles << .row(:index=>x).a.title end return titles end |
#unread_messages ⇒ Object
284 285 286 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 284 def # TODO - Write this method end |