Class: MessagesDeletedList
- Defined in:
- lib/sakai-cle-test-api/page_objects/messages.rb
Overview
The page showing the list of deleted 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
- #delete ⇒ Object
-
#header ⇒ Object
Returns a string consisting of the content of the page header–or “breadcrumb”, as it’s called.
-
#messages ⇒ Object
Clicks the “Messages” breadcrumb link to return to the top level of Messages.
- #move ⇒ Object
-
#subjects ⇒ Object
Creates an array consisting of the message subject lines.
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
355 356 357 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 355 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.
375 376 377 378 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 375 def (subject) index=subjects.index(subject) frm.checkbox(:name=>"prefs_pvt_form:pvtmsgs:#{index}:_id122").set end |
#compose_message ⇒ Object
344 345 346 347 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 344 def frm.link(:text=>"Compose Message").click ComposeMessage.new(@browser) end |
#delete ⇒ Object
385 386 387 388 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 385 def delete frm.link(:text=>"Delete").click MessageDeleteConfirmation.new(@browser) end |
#header ⇒ Object
Returns a string consisting of the content of the page header–or “breadcrumb”, as it’s called.
332 333 334 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 332 def header frm.div(:class=>"breadCrumb specialLink").text end |
#messages ⇒ Object
Clicks the “Messages” breadcrumb link to return to the top level of Messages. Then instantiates the Messages class.
339 340 341 342 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 339 def frm.link(:text=>"Messages").click Messages.new(@browser) end |
#move ⇒ Object
380 381 382 383 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 380 def move frm.link(:text, "Move").click MoveMessageTo.new(@browser) end |
#subjects ⇒ Object
Creates an array consisting of the message subject lines.
361 362 363 364 365 366 367 368 |
# File 'lib/sakai-cle-test-api/page_objects/messages.rb', line 361 def subjects titles = [] = frm.table(:id=>"prefs_pvt_form:pvtmsgs") 1.upto(.rows.size-1) do |x| titles << [x][2].text end return titles end |