Class: CustomDataObject

Inherits:
Object
  • Object
show all
Includes:
DataFactory, Foundry, Navigation, StringFactory
Defined in:
lib/kuality-coeus/data_objects/proposal_development/custom_data.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 = {}) ⇒ CustomDataObject

Returns a new instance of CustomDataObject.



10
11
12
13
14
15
16
17
18
19
# File 'lib/kuality-coeus/data_objects/proposal_development/custom_data.rb', line 10

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

  defaults = {
      graduate_student_count: rand(50).to_s,
      billing_element:        random_alphanums(40)
  }
  set_options(defaults.merge(opts))
  requires :document_id, :doc_type
end

Instance Attribute Details

#billing_elementObject

Returns the value of attribute billing_element.



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

def billing_element
  @billing_element
end

#doc_typeObject

Returns the value of attribute doc_type.



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

def doc_type
  @doc_type
end

#document_idObject

Returns the value of attribute document_id.



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

def document_id
  @document_id
end

#graduate_student_countObject

Returns the value of attribute graduate_student_count.



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

def graduate_student_count
  @graduate_student_count
end

Instance Method Details

#createObject



21
22
23
24
25
26
27
28
# File 'lib/kuality-coeus/data_objects/proposal_development/custom_data.rb', line 21

def create
  navigate
  on PDCustomData do |create|
    create.expand_all
    fill_out create, :graduate_student_count, :billing_element
    create.save
  end
end