Class: JForums

Inherits:
JForumsBase show all
Defined in:
lib/sambal-cle/page_objects/jforums.rb

Overview

The topmost page in Discussion Forums

Instance Method Summary collapse

Methods inherited from JForumsBase

forums_page_elements

Methods inherited from BasePage

basic_page_elements, button, damballa, frame_element, link

Instance Method Details

#forum_listObject

Returns an array containing the names of the Forums listed on the page.



36
37
38
39
40
41
42
43
44
# File 'lib/sambal-cle/page_objects/jforums.rb', line 36

def forum_list
  list = frm.table(:class=>"forumline").links.map do |link|
    if link.href =~ /forums\/show\//
      link.text
    end
  end
  list.compact!
  return list
end

#topic_count(forum_name) ⇒ Object

Returns the displayed count of topics for the specified Forum.



48
49
50
# File 'lib/sambal-cle/page_objects/jforums.rb', line 48

def topic_count(forum_name)
  frm.table(:class=>"forumline").row(:text=>/#{Regexp.escape(forum_name)}/)[2].text
end