Class: MyMemberships

Inherits:
Object
  • Object
show all
Includes:
GlobalMethods, HeaderFooterBar, LeftMenuBarYou, ListGroups, ListWidget, PageObject
Defined in:
lib/sakai-oae-test-api/page_classes.rb

Overview

Methods related to the User’s My Memberships page.

Instance Method Summary collapse

Methods included from LeftMenuBarYou

#change_picture, #inbox, #invitations, #my_contacts_count, #my_library_count, #my_messages_lock_icon, #sent, #show_hide_my_messages_tree, #trash, #unread_inbox_count, #unread_invitations_count, #unread_message_count

Methods included from PageObject

#method_missing, #name_li, #name_link

Methods included from ListGroups

#add_group, #check_group, #content_item_count, #group_type, #join_button_for, #message_button, #message_course, #participants_count, #remove_membership, #remove_membership_button, #view_group_participants

Methods included from ListWidget

#last_updated, #results_list

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

#create_oneObject

Clicks the “Create one” link in the quote_bubble div and then returns the CreateGroups class object.



1249
1250
1251
1252
1253
# File 'lib/sakai-oae-test-api/page_classes.rb', line 1249

def create_one
  quote_bubble.link(:text=>"Create one").click
  self.wait_until { self.button(:class=>/create_simple_group/).present? }
  CreateGroups.new @browser
end

#page_titleObject

Returns the text of the Page Title.



1237
1238
1239
# File 'lib/sakai-oae-test-api/page_classes.rb', line 1237

def page_title
  active_div.div(:class=>"s3d-contentpage-title").text
end

#quote_bubbleObject

Returns the div object for the blue quote bubble that appears when the page is empty of memberships.



1243
1244
1245
# File 'lib/sakai-oae-test-api/page_classes.rb', line 1243

def quote_bubble
  active_div.div(:class=>"s3d-no-results-container")
end

#sort_by=(type) ⇒ Object

Sorts the list of memberships according to the specified value



1256
1257
1258
1259
# File 'lib/sakai-oae-test-api/page_classes.rb', line 1256

def sort_by=(type)
  self.sort_by_list=type
  self.wait_for_ajax
end