class Hiptest::Nodes::Project

Public Class Methods

new(name, description = '', test_plan = TestPlan.new, scenarios = Scenarios.new, actionwords = Actionwords.new, tests = Tests.new, libraries = Libraries.new) click to toggle source
Calls superclass method
# File lib/hiptest-publisher/nodes.rb, line 570
def initialize(name, description = '', test_plan = TestPlan.new, scenarios = Scenarios.new, actionwords = Actionwords.new, tests = Tests.new, libraries = Libraries.new)
  super()
  test_plan.parent = self if test_plan.respond_to?(:parent=)
  scenarios.parent = self
  tests.parent = self

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

Public Instance Methods

assign_scenarios_to_folders() click to toggle source
# File lib/hiptest-publisher/nodes.rb, line 591
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
has_libraries?() click to toggle source
# File lib/hiptest-publisher/nodes.rb, line 587
def has_libraries?
  !children[:libraries].children[:libraries].empty?
end