Class: PortfolioTemplates

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

Instance Method Summary collapse

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

#addObject

Clicks the Add link and instantiates the AddPortfolioTemplate class.



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

def add
  frm.link(:text=>"Add").click
  AddPortfolioTemplate.new(@browser)
end

#copy(templatename) ⇒ Object

Clicks the “Copy” link for the specified Template.



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

def copy(templatename)
  frm.table(:class=>"listHier lines nolines").row(:text=>/#{Regexp.escape(templatename)}/).link(:text=>"Copy").click
end

#delete(templatename) ⇒ Object

Clicks the “Delete” link for the specified Template.



28
29
30
# File 'lib/sakai-cle-test-api/page_objects/portfolio_templates.rb', line 28

def delete(templatename)
  frm.table(:class=>"listHier lines nolines").row(:text=>/#{Regexp.escape(templatename)}/).link(:text=>"Delete").click
end

#edit(templatename) ⇒ Object

Clicks the “Edit” link for the specified Template.



23
24
25
# File 'lib/sakai-cle-test-api/page_objects/portfolio_templates.rb', line 23

def edit(templatename)
  frm.table(:class=>"listHier lines nolines").row(:text=>/#{Regexp.escape(templatename)}/).link(:text=>"Edit").click
end

#export(templatename) ⇒ Object

Clicks the “Export” link for the specified Template.



38
39
40
# File 'lib/sakai-cle-test-api/page_objects/portfolio_templates.rb', line 38

def export(templatename)
  frm.table(:class=>"listHier lines nolines").row(:text=>/#{Regexp.escape(templatename)}/).link(:text=>"Export").click
end

#publish(templatename) ⇒ Object

Clicks the “Publish” link for the specified Template.



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

def publish(templatename)
  frm.table(:class=>"listHier lines nolines").row(:text=>/#{Regexp.escape(templatename)}/).link(:text=>"Publish").click
end