Class: Comments
- Inherits:
-
Object
- Object
- Comments
- Includes:
- DocButtons, GlobalMethods, HeaderBar, HeaderFooterBar, LeftMenuBar, PageObject
- Defined in:
- lib/sakai-oae-test-api/page_classes.rb
Overview
Methods related to the Comments “Area” in a Course/Group.
Instance Method Summary collapse
-
#delete(comment) ⇒ Object
Deletes the specified comment.
-
#edit(comment) ⇒ Object
Clicks the “Edit button” for the specified comment.
-
#edit_comment ⇒ Object
Clicks the “Edit comment” button.
-
#submit_comment ⇒ Object
Clicks the “Submit comment” button.
Methods included from DocButtons
#add_page, #edit_page, #page_revisions
Methods included from PageObject
#method_missing, #name_li, #name_link
Methods included from HeaderBar
#add_content, #categories, #change_picture, #join_group, #join_requests, #manage_participants, #message, #page_title, #request_to_join_group, #settings
Methods included from LeftMenuBar
#add_new_area, #change_title_of, #delete_page, #expand, #menu_available?, #permissions_for_page, #public_pages, #view_profile_of_page
Methods included from HeaderFooterBar
#acknowledgements, #add_collection, #add_content, #browse_footer, #browse_footer_link, #change_language, #change_location, #click_link, #explore_footer, #explore_footer_link, #login, #messages_container, #my_account, #sign_out, #sign_up, #toggle_collector, #user_agreement
Methods included from GlobalMethods
#close_notification, #menu_item, #open_page, #view_person
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class PageObject
Instance Method Details
#delete(comment) ⇒ Object
Deletes the specified comment.
1674 1675 1676 1677 1678 |
# File 'lib/sakai-oae-test-api/page_classes.rb', line 1674 def delete(comment) comment.gsub!("\n", " ") self.div(:text=>comment).parent.(:text=>"Delete").click self.wait_for_ajax(2) #wait_until { self.button(:text=>"Undelete").present? } end |
#edit(comment) ⇒ Object
Clicks the “Edit button” for the specified comment.
1667 1668 1669 1670 1671 |
# File 'lib/sakai-oae-test-api/page_classes.rb', line 1667 def edit(comment) comment.gsub!("\n", " ") self.p(:text=>comment).parent.parent.(:text=>"Edit").click self.wait_for_ajax(2) #wait_until { self.textarea(:title=>"Edit your comment").present? } end |
#edit_comment ⇒ Object
Clicks the “Edit comment” button.
1661 1662 1663 1664 |
# File 'lib/sakai-oae-test-api/page_classes.rb', line 1661 def edit_comment self.(:text=>"Edit comment").click self.wait_for_ajax(2) #wait_until { self.textarea(:title=>"Edit your comment").present? == false } end |
#submit_comment ⇒ Object
Clicks the “Submit comment” button.
1655 1656 1657 1658 |
# File 'lib/sakai-oae-test-api/page_classes.rb', line 1655 def submit_comment self.(:text=>"Submit comment").click self.wait_for_ajax(2) #wait_until { self.text.include? "about 0 seconds ago" } end |