Class: AssignmentStudentPreview

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

Overview

Page that appears when a Student User clicks to Preview an assignment that is in progress.

Instance Method Summary collapse

Methods included from AssignmentsMenu

#add_assignment, #assignment_list, #assignments_frame, #grade_report, #options, #permissions, #reorder, #student_view

Methods included from PageObject

#method_missing, #name_li, #name_link

Dynamic Method Handling

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

Instance Method Details

#attachmentsObject

Returns an array of strings. Each element in the array is the name of attached files.



1718
1719
1720
1721
1722
# File 'lib/sakai-oae-test-api/cle_frame_classes.rb', line 1718

def attachments
  names = []
  frm.ul(:class=>"attachList indnt1").links.each { |link| names << link.text }
  return names
end

#save_draftObject

Clicks the Save Draft button, then instantiates the SubmissionConfirmation page class.



1706
1707
1708
1709
# File 'lib/sakai-oae-test-api/cle_frame_classes.rb', line 1706

def save_draft
  frm.button(:value=>"Save Draft").click
  SubmissionConfirmation.new(@browser)
end

#submission_textObject

Returns the contents of the submission box.



1712
1713
1714
# File 'lib/sakai-oae-test-api/cle_frame_classes.rb', line 1712

def submission_text
  frm.div(:class=>"portletBody").div(:class=>/textPanel/).text
end

#submitObject

Clicks the Submit button, then instantiates the SubmissionConfirmation page class.



1698
1699
1700
1701
# File 'lib/sakai-oae-test-api/cle_frame_classes.rb', line 1698

def submit
  frm.button(:value=>"Submit").click
  SubmissionConfirmation.new(@browser)
end