Module: JForumsResources

Overview

This module includes page objects that are common to all pages in the JForums.

Instance Method Summary collapse

Instance Method Details

#discussion_homeObject

Clicks the Discussion Home link, then instantiates the JForums page class.



11
12
13
14
# File 'lib/sakai-cle-test-api/page_objects/jforums.rb', line 11

def discussion_home
  frm.link(:id=>"backtosite").click
  JForums.new(@browser)
end

#manageObject

Clicks the Manage link on the Main Menu, then instantiates the ManageDiscussions page class.



53
54
55
56
# File 'lib/sakai-cle-test-api/page_objects/jforums.rb', line 53

def manage
  frm.link(:id=>"adminpanel", :text=>"Manage").click
  ManageDiscussions.new(@browser)
end

#member_listingObject

Clicks the Member Listing link in the Main Menu, then instantiates the DiscussionMemberListing page class.



39
40
41
42
# File 'lib/sakai-cle-test-api/page_objects/jforums.rb', line 39

def member_listing
  frm.link(:text=>"Member Listing", :id=>"latest", :class=>"mainmenu").click
  DiscussionMemberListing.new(@browser)
end

#my_bookmarksObject

Clicks the My Bookmarks link in the Main Menu, then instantiates the MyBookmarks page class.



25
26
27
28
# File 'lib/sakai-cle-test-api/page_objects/jforums.rb', line 25

def my_bookmarks
  frm.link(:class=>"mainmenu", :text=>"My Bookmarks").click
  MyBookmarks.new(@browser)
end

#my_profileObject

Clicks the My Profile link in the Main Menu, then instantiates the DiscussionsMyProfile page class.



32
33
34
35
# File 'lib/sakai-cle-test-api/page_objects/jforums.rb', line 32

def my_profile
  frm.link(:id=>"myprofile").click
  DiscussionsMyProfile.new(@browser)
end

#private_messagesObject

Clicks the Private Messages link in the Main Menu, then instantiates the PrivateMessages page class.



46
47
48
49
# File 'lib/sakai-cle-test-api/page_objects/jforums.rb', line 46

def private_messages
  frm.link(:id=>"privatemessages", :class=>"mainmenu").click
  PrivateMessages.new(@browser)
end

#searchObject

Clicks the Search button in the Main Menu, then instantiates the DiscussionSearch page class.



18
19
20
21
# File 'lib/sakai-cle-test-api/page_objects/jforums.rb', line 18

def search
  frm.link(:id=>"search", :class=>"mainmenu").click
  DiscussionSearch.new(@browser)
end