Module: AssignmentsPreviewMethods
- Includes:
- PageObject
- Defined in:
- lib/kuali-sakai-common-lib/assignments.rb
Overview
Page that appears when you click to preview an Assignment
Class Method Summary collapse
Instance Method Summary collapse
-
#assignment_instructions ⇒ Object
Grabs the Assignment Instructions text.
- #back_to_list ⇒ Object
-
#cancel ⇒ Object
Clicks the Cancel button and instantiates the AssignmentsList Class.
-
#header ⇒ Object
Returns the text content of the page header.
-
#instructor_comments ⇒ Object
Grabs the instructor comments text.
-
#item_summary ⇒ Object
Returns a hash object containing the contents of the Item Summary table.
-
#post ⇒ Object
Clicks the Post button, then instantiates the AssignmentsList page class.
Class Method Details
.page_elements(identifier) ⇒ Object
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 427 def self.page_elements(identifier) in_frame(identifier) do |frame| hidden_field(:assignment_id, :name=>"assignmentId", :frame=>frame) link(:assignment_list, :text=>"Assignment List", :frame=>frame) link(:permissions, :text=>"Permissions", :frame=>frame) link(:options, :text=>"Options", :frame=>frame) link(:hide_assignment, :href=>/doHide_preview_assignment_assignment/, :frame=>frame) link(:show_assignment, :href=>/doShow_preview_assignment_assignment/, :frame=>frame) link(:hide_student_view, :href=>/doHide_preview_assignment_student_view/, :frame=>frame) link(:show_student_view, :href=>/doShow_preview_assignment_student_view/, :frame=>frame) (:edit, :name=>"revise", :frame=>frame) (:save_draft, :name=>"save", :frame=>frame) (:done, :name=>"done", :frame=>frame) end end |
Instance Method Details
#assignment_instructions ⇒ Object
Grabs the Assignment Instructions text.
398 399 400 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 398 def assignment_instructions frm.div(:class=>"textPanel").text end |
#back_to_list ⇒ Object
408 409 410 411 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 408 def back_to_list frm.(:value=>"Back to list").click AssignmentsList.new(@browser) end |
#cancel ⇒ Object
Clicks the Cancel button and instantiates the AssignmentsList Class.
422 423 424 425 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 422 def cancel frm.(:value=>"Cancel").click AssignmentsList.new(@browser) end |
#header ⇒ Object
Returns the text content of the page header
383 384 385 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 383 def header frm.div(:class=>"portletBody").h3.text end |
#instructor_comments ⇒ Object
Grabs the instructor comments text.
403 404 405 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 403 def instructor_comments frm.div(:class=>"portletBody").div(:class=>"textPanel", :index=>2).text end |
#item_summary ⇒ Object
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.
389 390 391 392 393 394 395 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 389 def item_summary hash = {} frm.table(:class=>"itemSummary").rows.each do |row| hash.store(row.th.text, row.td.text) end return hash end |
#post ⇒ Object
Clicks the Post button, then instantiates the AssignmentsList page class.
415 416 417 418 |
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 415 def post frm.(:name=>"post").click AssignmentsList.new(@browser) end |