Module: AddEditSyllabusItemMethods

Includes:
PageObject
Defined in:
lib/kuali-sakai-common-lib/syllabus.rb

Instance Method Summary collapse

Instance Method Details

#add_attachmentsObject

Clicks the Add attachments button and instantiates the SyllabusAttach class.



109
110
111
112
# File 'lib/kuali-sakai-common-lib/syllabus.rb', line 109

def add_attachments
  frm.button(:value=>"Add attachments").click
  SyllabusAttach.new(@browser)
end

#content=(text) ⇒ Object

Sends the specified string to the FCKEditor text area on the page.



103
104
105
# File 'lib/kuali-sakai-common-lib/syllabus.rb', line 103

def content=(text)
  editor.send_keys(text)
end

#editorObject

Defines the text area of the FCKEditor that appears on the page for the Syllabus content.



98
99
100
# File 'lib/kuali-sakai-common-lib/syllabus.rb', line 98

def editor
  frm.frame(:id, /_textarea___Frame/).td(:id, "xEditingArea").frame(:index=>0)
end

#files_listObject

Returns an array of the filenames in the attachments table



116
117
118
119
120
121
122
123
124
# File 'lib/kuali-sakai-common-lib/syllabus.rb', line 116

def files_list
  names = []
  frm.table(:class=>"listHier lines nolines").rows.each do |row|
    if row.td(:class=>"item").exist?
      names << row.td(:class=>"item").h4.text
    end
  end
  return names
end

#postObject

Clicks the “Post” button and instantiates the Syllabus Class.



91
92
93
94
# File 'lib/kuali-sakai-common-lib/syllabus.rb', line 91

def post
  frm.button(:value=>"Post").click
  SyllabusEdit.new(@browser)
end

#previewObject

Clicks the preview button and instantiates the SyllabusPreview class



128
129
130
131
# File 'lib/kuali-sakai-common-lib/syllabus.rb', line 128

def preview
  frm.button(:value=>"Preview").click
  SyllabusPreview.new(@browser)
end