Class: CreateGroups

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

Overview

Methods related to the page where a new Course/Group/Project is set up.

Instance Method Summary collapse

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

Dynamic Method Handling

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

Instance Method Details

#add_more_peopleObject

Clicks the ‘Add more people’ button and waits for the Manage Participants dialog to appear. Includes the ManageParticipants module in the class.



370
371
372
373
374
# File 'lib/sakai-oae-test-api/page_classes.rb', line 370

def add_more_people
  self.button(:text, "Add more people").click
  self.wait_for_ajax(2)
  self.class.class_eval { include ManageParticipants }
end

#add_peopleObject

Clicks the ‘Add people’ button and waits for the Manage Participants dialog to appear. Includes the ManageParticipants module in the class.



361
362
363
364
365
# File 'lib/sakai-oae-test-api/page_classes.rb', line 361

def add_people
  self.button(:text, "Add people").click
  self.wait_for_ajax(2)
  self.class.class_eval { include ManageParticipants }
end

#create_basic_courseObject Also known as: create_simple_group, create_group, create_research_support_group

Clicks the ‘Create’ button for the Course or Group, etc., then waits until the Course Library page loads. Once that happens, returns the Library class object.



388
389
390
391
392
393
394
395
# File 'lib/sakai-oae-test-api/page_classes.rb', line 388

def create_basic_course
  create_thing
  unless url_error_element.visible?
    self.wait_until(45) { self.text.include? "Add content" }
    self.button(:id=>"group_create_new_area", :class=>"s3d-button s3d-header-button s3d-popout-button").wait_until_present
    Library.new @browser
  end
end

#create_research_projectObject

Clicks the ‘Create’ button then waits until the Research Intro page loads. Once that happens, returns the ResearchIntro class object.



402
403
404
405
406
407
408
# File 'lib/sakai-oae-test-api/page_classes.rb', line 402

def create_research_project
  create_thing
  unless url_error_element.visible?
    self.button(:id=>"group_create_new_area", :class=>"s3d-button s3d-header-button s3d-popout-button").wait_until_present
    ResearchIntro.new @browser
  end
end

#list_categoriesObject

Clicks the ‘List categories’ button, waits for the Categories dialog to appear, and then includes the AddRemoveCategories module in the class.



379
380
381
382
383
# File 'lib/sakai-oae-test-api/page_classes.rb', line 379

def list_categories
  self.button(:text=>"List categories").click
  self.wait_for_ajax(2)
  self.class.class_eval { include AddRemoveCategories }
end