Module: HeaderBar

Overview

This is the Header that appears in the Worlds context, So it appears for Courses, Groups, and Research

Instance Method Summary collapse

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_contentObject

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.button(:id=>"entity_group_permissions").click
  self.button(:text=>"Add content").click
  self.wait_until { self.text.include? "Collected items" }
  self.class.class_eval { include AddContentContainer }
end

#categoriesObject

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.button(:id=>"entity_group_permissions").click
  self.button(:text=>"Categories").click
  self.wait_until { self.text.include? "Assign a category" }
  self.class.class_eval { include AddRemoveCategories }
end

#change_pictureObject

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_groupObject

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.join_group_button
  self.wait_until { notification_element.exists? }
end

#join_requestsObject

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.button(:id=>"entity_group_permissions").click
  self.button(: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_participantsObject

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.button(:id=>"entity_group_permissions").click
  self.button(:text=>"Manage participants").click
  self.wait_until { self.text.include? "My contacts and memberships" }
  self.class.class_eval { include ManageParticipants }
end

#messageObject

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 message
  self.message_button
  self.wait_until { self.text.include? "Send Message" }
  self.class.class_eval { include SendMessagePopUp }
end

#page_titleObject

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_groupObject

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.request_to_join_group_button
  self.wait_until { notification_element.exists? }
end

#settingsObject

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.button(:id=>"entity_group_permissions").click
  self.button(:text=>"Settings").click
  sleep 0.4
  self.wait_for_ajax
  self.class.class_eval { include SettingsPopUp }
end