Module: EditQuestionPoolMethods

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

Overview

The Page that appears when editing an existing question pool

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.page_elements(identifier) ⇒ Object

Encapsulates all the PageObject code into a module method that can be called from the necessary class.



886
887
888
889
890
891
892
893
894
895
896
897
898
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 886

def self.page_elements(identifier)
  in_frame(identifier) do |frame|
    text_field(:pool_name, :id=>"editform:namefield", :frame=>frame)
    text_field(:department_group, :id=>"editform:orgfield", :frame=>frame)
    text_area(:description, :id=>"editform:descfield", :frame=>frame)
    text_field(:objectives, :id=>"editform:objfield", :frame=>frame)
    text_field(:keywords, :id=>"editform:keyfield", :frame=>frame)
    button(:update, :id=>"editform:Update", :frame=>frame)
    button(:save, :id=>"questionpool:submit", :frame=>frame)
    button(:cancel, :id=>"questionpool:_id11", :frame=>frame)

  end
end

Instance Method Details

#add_questionObject

Clicks the Add Question link, then instantiates the SelectQuestionType class.



871
872
873
874
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 871

def add_question
  frm.link(:id=>"editform:addQlink").click
  SelectQuestionType.new(@browser)
end

#question_poolsObject

Clicks the Question Pools link, then instantiates the QuestionPoolsList class.



878
879
880
881
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 878

def question_pools
  frm.link(:text=>"Question Pools").click
  QuestionPoolsList.new(@browser)
end