Class: MyProfileContactInfo

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

Overview

Methods related to the My Profile: Contact Information 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 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

#fill_out_form(hash) ⇒ Object

Takes a hash object and uses it to fill out the fields on the form. The necessary key values in the hash argument are as follows: :institution, :department, :title, :email, :im, :phone, :mobile, :fax, :address, :city, :state, :zip, and :country. Any keys that are different or missing will be ignored.



1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
# File 'lib/sakai-oae-test-api/page_classes.rb', line 1063

def fill_out_form(hash)
  self.email=hash[:email]
  self.fax=hash[:fax]
  self.institution=hash[:institution]
  self.department=hash[:department]
  self.title_role=hash[:title]
  self.instant_messaging=hash[:im]
  self.phone=hash[:phone]
  self.mobile=hash[:mobile]
  self.address=hash[:address]
  self.city=hash[:city]
  self.state=hash[:state]
  self.postal_code=hash[:zip]
  self.country=hash[:country]
end

#updateObject

Clicks the “Update” button and waits for any Ajax calls to complete.



1052
1053
1054
1055
# File 'lib/sakai-oae-test-api/page_classes.rb', line 1052

def update
  self.form(:id=>"displayprofilesection_form_contact").button(:text=>"Update").click
  self.wait_for_ajax(2)
end