Class: ProposalQuestionsObject

Inherits:
Object
  • Object
show all
Includes:
DataFactory, DateFactory, Foundry, Navigation, StringFactory
Defined in:
lib/kuality-coeus/data_objects/proposal_development/proposal_questions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Navigation

#doc_search, #fill_out, #fill_out_item, #on_document?, #on_page?, #open_document, #window_cleanup

Methods included from Utilities

#get, #make_role, #make_user, #random_percentage, #set, #snake_case

Constructor Details

#initialize(browser, opts = {}) ⇒ ProposalQuestionsObject

Returns a new instance of ProposalQuestionsObject.



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/kuality-coeus/data_objects/proposal_development/proposal_questions.rb', line 11

def initialize(browser, opts={})
  @browser = browser

  # PLEASE NOTE:
  # This is a unique data object class in that
  # it breaks the typical model for radio button
  # methods and their associated class instance variables
  #
  # In general, it's not workable to set up radio button elements
  # to use "Y" and "N" as the instance variables associated with them.
  defaults = {
    agree_to_nih_policy: 'Y',
    policy_review_date:  right_now[:date_w_slashes]
  }

  set_options(defaults.merge(opts))
  requires :document_id
end

Instance Attribute Details

#agree_to_nih_policyObject

Returns the value of attribute agree_to_nih_policy.



9
10
11
# File 'lib/kuality-coeus/data_objects/proposal_development/proposal_questions.rb', line 9

def agree_to_nih_policy
  @agree_to_nih_policy
end

#document_idObject

Returns the value of attribute document_id.



9
10
11
# File 'lib/kuality-coeus/data_objects/proposal_development/proposal_questions.rb', line 9

def document_id
  @document_id
end

#policy_review_dateObject

Returns the value of attribute policy_review_date.



9
10
11
# File 'lib/kuality-coeus/data_objects/proposal_development/proposal_questions.rb', line 9

def policy_review_date
  @policy_review_date
end

Instance Method Details

#createObject



30
31
32
33
34
35
36
37
38
39
# File 'lib/kuality-coeus/data_objects/proposal_development/proposal_questions.rb', line 30

def create
  navigate
  on Questions do |pq|
    pq.show_proposal_questions
    fill_out pq, :agree_to_nih_policy, :policy_review_date
    #pq.agree_to_nih_policy @agree_to_nih_policy
    #pq.policy_review_date.set @policy_review_date
    pq.save
  end
end