Class: Hiptest::Nodes::Project

Inherits:
Node
  • Object
show all
Defined in:
lib/hiptest-publisher/nodes.rb

Instance Attribute Summary

Attributes inherited from Node

#children, #parent

Instance Method Summary collapse

Methods inherited from Node

#direct_children, #find_sub_nodes, #render

Constructor Details

#initialize(name, description = '', test_plan = TestPlan.new, scenarios = Scenarios.new, actionwords = Actionwords.new, tests = Tests.new) ⇒ Project

Returns a new instance of Project.



355
356
357
358
359
360
361
362
363
364
365
366
367
368
# File 'lib/hiptest-publisher/nodes.rb', line 355

def initialize(name, description = '', test_plan = TestPlan.new, scenarios = Scenarios.new, actionwords = Actionwords.new, tests = Tests.new)
  super()
  scenarios.parent = self
  tests.parent = self

  @children = {
    :name => name,
    :description => description,
    :test_plan => test_plan,
    :scenarios => scenarios,
    :actionwords => actionwords,
    :tests => tests
  }
end

Instance Method Details

#assign_scenarios_to_foldersObject



370
371
372
373
374
375
376
377
# File 'lib/hiptest-publisher/nodes.rb', line 370

def assign_scenarios_to_folders
  @children[:scenarios].children[:scenarios].each do |scenario|
    folder = @children[:test_plan].find_folder_by_uid(scenario.folder_uid)
    next if folder.nil?

    folder.children[:scenarios] << scenario
  end
end