Class: SiteEditor

Inherits:
SiteSetupBase show all
Defined in:
lib/sakai-cle-test-api/page_objects/site_setup.rb

Overview

The topmost “Site Editor” page, found in SITE MANAGEMENT or else Site Setup after you have selected to Edit a particular site.

Instance Method Summary collapse

Methods inherited from SiteSetupBase

menu_elements

Methods inherited from BasePage

basic_page_elements, frame_element

Methods inherited from PageMaker

element, expected_element, expected_title, #initialize, #method_missing, page_url

Constructor Details

This class inherits a constructor from PageMaker

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class PageMaker

Instance Method Details

#return_buttonObject



127
128
129
# File 'lib/sakai-cle-test-api/page_objects/site_setup.rb', line 127

def return_button
  frm.button(:name=>"back")
end

#return_to_sites_listObject



131
132
133
# File 'lib/sakai-cle-test-api/page_objects/site_setup.rb', line 131

def return_to_sites_list
  return_button.click
end

#set_role(participant, role) ⇒ Object

Sets the specified role for the specified participant.

Because the participant is selected using a regular expression, the “participant” string can be anything that will suffice as a unique match–i.e., last name, first name, or user id, or any combination, as long as it will match a part of the string that appears in the desired row.



118
119
120
# File 'lib/sakai-cle-test-api/page_objects/site_setup.rb', line 118

def set_role(participant, role)
  frm.table(:class=>/listHier lines/).row(:text=>/#{Regexp.escape(participant)}/).select(:id=>/role/).select(role)
end

#update_participantsObject



122
123
124
125
# File 'lib/sakai-cle-test-api/page_objects/site_setup.rb', line 122

def update_participants
  frm.button(:value=>"Update Participants").click
  SiteEditor.new(@browser)
end