Module: AssignmentsPreviewMethods

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

Overview

Page that appears when you click to preview an Assignment

Instance Method Summary collapse

Instance Method Details

#assignment_instructionsObject

Grabs the Assignment Instructions text.



395
396
397
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 395

def assignment_instructions
  frm.div(:class=>"textPanel").text
end

#back_to_listObject



405
406
407
408
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 405

def back_to_list
  frm.button(:value=>"Back to list").click
  AssignmentsList.new(@browser)
end

#cancelObject

Clicks the Cancel button and instantiates the AssignmentsList Class.



419
420
421
422
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 419

def cancel
  frm.button(:value=>"Cancel").click
  AssignmentsList.new(@browser)
end

#headerObject

Returns the text content of the page header



380
381
382
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 380

def header
  frm.div(:class=>"portletBody").h3.text
end

#instructor_commentsObject

Grabs the instructor comments text.



400
401
402
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 400

def instructor_comments
  frm.div(:class=>"portletBody").div(:class=>"textPanel", :index=>2).text
end

#item_summaryObject

Returns a hash object containing the contents of the Item Summary table. The hash’s Key is the header column and the value is the content column.



386
387
388
389
390
391
392
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 386

def item_summary
  hash = {}
  frm.table(:class=>"itemSummary").rows.each do |row|
    hash.store(row.th.text, row.td.text)
  end
  return hash
end

#postObject

Clicks the Post button, then instantiates the AssignmentsList page class.



412
413
414
415
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 412

def post
  frm.button(:name=>"post").click
  AssignmentsList.new(@browser)
end