Module: ContentPermissionsPopUp
- Includes:
- PageObject
- Defined in:
- lib/sakai-oae-test-api/pop_up_dialogs.rb
Overview
Objects in the Pop Up dialog for setting viewing permissions for Content
Instance Method Summary collapse
-
#save_and_close ⇒ Object
Clicks the “Save and close” button then waits for all ajax calls to finish.
-
#share ⇒ Object
Clicks the “Share” button and waits for the ajax calls to finish.
-
#share_with=(name) ⇒ Object
Enters the specified name in the “Who can edit it or who is it associated with?” search field.
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
#save_and_close ⇒ Object
Clicks the “Save and close” button then waits for all ajax calls to finish
622 623 624 625 |
# File 'lib/sakai-oae-test-api/pop_up_dialogs.rb', line 622 def save_and_close self.wait_for_ajax end |
#share ⇒ Object
Clicks the “Share” button and waits for the ajax calls to finish.
628 629 630 631 632 |
# File 'lib/sakai-oae-test-api/pop_up_dialogs.rb', line 628 def share self.(:id=>"contentpermissions_members_autosuggest_sharebutton").flash self.(:id=>"contentpermissions_members_autosuggest_sharebutton").click self.wait_for_ajax end |
#share_with=(name) ⇒ Object
Enters the specified name in the “Who can edit it or who is it associated with?” search field. Then clicks on the first item in the search results menu–which means that this method assumes the search will be successful and the first item listed is the desired item to select.
612 613 614 615 616 617 618 |
# File 'lib/sakai-oae-test-api/pop_up_dialogs.rb', line 612 def share_with=(name) self.text_field(:id=>/contentpermissionscontainer\d+/).set name sleep 0.6 self.wait_for_ajax self.div(:class=>"as-results").li(:id=>"as-result-item-0").fire_event "onclick" self.wait_for_ajax end |