Module: HeaderBar
- Includes:
- PageObject
- Included in:
- CalendarFrame, Comments, Discussions, Files, Gadget, GoogleMaps, GradebookFrame, LTI, Library, MessagesFrame, Participants, PollsFrame, PostEmFrame, RSS, Remote, ResearchIntro, SingleUserFrame, SiteStatisticsFrame
- Defined in:
- lib/sakai-oae-test-api/toolbars_and_menus.rb
Overview
This is the Header that appears in the Worlds context, So it appears for Courses, Groups, and Research
Instance Method Summary collapse
-
#add_content ⇒ Object
Clicks the Permissions button in the page header (below the Header bar, though), clicks “Add Content”, then waits for the Add Content stuff to load, then includes the AddContentContainer module in the object’s Class.
-
#categories ⇒ Object
Clicks the Permissions button in the page’s header (distinct from the black header bar, mind you), clicks “Categories”, waits for the Categories Pop Up to load, then includes the AddRemoveCategories module in the Class of the object calling the method.
-
#change_picture ⇒ Object
Clicks the down arrow next to the Avatar picture in the Page Header (not the Header bar), clicks the option to change the picture, then includes the ChangePicturePopup in the Class of the object calling the method.
-
#join_group ⇒ Object
Clicks the “Join group” button.
-
#join_requests ⇒ Object
Clicks the “Join requests” item in the settings menu.
-
#manage_participants ⇒ Object
Clicks the Permissions button in the page’s header (distinct from the black header bar, mind you), clicks “Manage participants”, waits for the Contacts and Memberships stuff to load, then includes the ManageParticipants module in the Class of the object calling the method.
-
#message ⇒ Object
Clicks the Message button in the page header (not the Header bar, but just below that), waits for the Message Pop Up dialog to load, and then includes the SendMessagePopUp module in the currently instantiated Class Object.
-
#page_title ⇒ Object
Returns the text contents of the page title div.
-
#request_to_join_group ⇒ Object
Clicks the “Request to join group” button.
-
#settings ⇒ Object
Clicks the Permissions button in the page’s header (distinct from the black header bar, mind you), clicks “Settings”, waits for the Settings stuff to load, then includes the SettingsPopUp module in the Class of the object calling the method.
Methods included from PageObject
#method_missing, #name_li, #name_link
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class PageObject
Instance Method Details
#add_content ⇒ Object
Clicks the Permissions button in the page header (below the Header bar, though), clicks “Add Content”, then waits for the Add Content stuff to load, then includes the AddContentContainer module in the object’s Class.
262 263 264 265 266 267 |
# File 'lib/sakai-oae-test-api/toolbars_and_menus.rb', line 262 def add_content self.(:id=>"entity_group_permissions").click self.(:text=>"Add content").click self.wait_until { self.text.include? "Collected items" } self.class.class_eval { include AddContentContainer } end |
#categories ⇒ Object
Clicks the Permissions button in the page’s header (distinct from the black header bar, mind you), clicks “Categories”, waits for the Categories Pop Up to load, then includes the AddRemoveCategories module in the Class of the object calling the method.
307 308 309 310 311 312 |
# File 'lib/sakai-oae-test-api/toolbars_and_menus.rb', line 307 def categories self.(:id=>"entity_group_permissions").click self.(:text=>"Categories").click self.wait_until { self.text.include? "Assign a category" } self.class.class_eval { include AddRemoveCategories } end |
#change_picture ⇒ Object
Clicks the down arrow next to the Avatar picture in the Page Header (not the Header bar), clicks the option to change the picture, then includes the ChangePicturePopup in the Class of the object calling the method.
318 319 320 321 322 |
# File 'lib/sakai-oae-test-api/toolbars_and_menus.rb', line 318 def change_picture self.div(:class=>"entity_profile_picture_down_arrow").fire_event("onclick") self.link(:id=>"changepic_container_trigger").click self.class.class_eval { include ChangePicturePopup } end |
#join_group ⇒ Object
Clicks the “Join group” button.
237 238 239 240 |
# File 'lib/sakai-oae-test-api/toolbars_and_menus.rb', line 237 def join_group self. self.wait_until { notification_element.exists? } end |
#join_requests ⇒ Object
Clicks the “Join requests” item in the settings menu.
282 283 284 285 286 287 |
# File 'lib/sakai-oae-test-api/toolbars_and_menus.rb', line 282 def join_requests self.(:id=>"entity_group_permissions").click self.(:id=>"ew_group_join_requests_link").click self.wait_until { self.text.include? "Pending requests to join" } self.class.class_eval { include PendingRequestsPopUp } end |
#manage_participants ⇒ Object
Clicks the Permissions button in the page’s header (distinct from the black header bar, mind you), clicks “Manage participants”, waits for the Contacts and Memberships stuff to load, then includes the ManageParticipants module in the Class of the object calling the method.
274 275 276 277 278 279 |
# File 'lib/sakai-oae-test-api/toolbars_and_menus.rb', line 274 def manage_participants self.(:id=>"entity_group_permissions").click self.(:text=>"Manage participants").click self.wait_until { self.text.include? "My contacts and memberships" } self.class.class_eval { include ManageParticipants } end |
#message ⇒ Object
Clicks the Message button in the page header (not the Header bar, but just below that), waits for the Message Pop Up dialog to load, and then includes the SendMessagePopUp module in the currently instantiated Class Object.
252 253 254 255 256 |
# File 'lib/sakai-oae-test-api/toolbars_and_menus.rb', line 252 def self. self.wait_until { self.text.include? "Send Message" } self.class.class_eval { include SendMessagePopUp } end |
#page_title ⇒ Object
Returns the text contents of the page title div
232 233 234 |
# File 'lib/sakai-oae-test-api/toolbars_and_menus.rb', line 232 def page_title self.div(:id=>"s3d-page-container").div(:class=>"s3d-contentpage-title").text end |
#request_to_join_group ⇒ Object
Clicks the “Request to join group” button
243 244 245 246 |
# File 'lib/sakai-oae-test-api/toolbars_and_menus.rb', line 243 def request_to_join_group self. self.wait_until { notification_element.exists? } end |
#settings ⇒ Object
Clicks the Permissions button in the page’s header (distinct from the black header bar, mind you), clicks “Settings”, waits for the Settings stuff to load, then includes the SettingsPopUp module in the Class of the object calling the method.
294 295 296 297 298 299 300 |
# File 'lib/sakai-oae-test-api/toolbars_and_menus.rb', line 294 def settings self.(:id=>"entity_group_permissions").click self.(:text=>"Settings").click sleep 0.4 self.wait_for_ajax self.class.class_eval { include SettingsPopUp } end |