Class: Hiptest::Nodes::Scenario

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

Instance Attribute Summary collapse

Attributes inherited from Item

#non_valued_parameters, #valued_parameters, #variables

Attributes inherited from Node

#children, #parent

Instance Method Summary collapse

Methods inherited from Item

#add_tags, #declared_variables_names

Methods inherited from Node

#==, #each_direct_children, #each_sub_nodes, #flat_string, #kind, #pretty_print_instance_variables, #project, #render

Constructor Details

#initialize(name, description = '', tags = [], parameters = [], body = [], folder_uid = nil, datatable = Datatable.new, order_in_parent = 0) ⇒ Scenario

Returns a new instance of Scenario.



366
367
368
369
370
371
372
# File 'lib/hiptest-publisher/nodes.rb', line 366

def initialize(name, description = '', tags = [], parameters = [], body = [], folder_uid = nil, datatable = Datatable.new, order_in_parent = 0)
  super(name, tags, description, parameters, body)
  @children[:datatable] = datatable

  @folder_uid = folder_uid
  @order_in_parent = order_in_parent
end

Instance Attribute Details

#folder_uidObject (readonly)

Returns the value of attribute folder_uid.



364
365
366
# File 'lib/hiptest-publisher/nodes.rb', line 364

def folder_uid
  @folder_uid
end

#order_in_parentObject (readonly)

Returns the value of attribute order_in_parent.



364
365
366
# File 'lib/hiptest-publisher/nodes.rb', line 364

def order_in_parent
  @order_in_parent
end

Instance Method Details

#folderObject



378
379
380
# File 'lib/hiptest-publisher/nodes.rb', line 378

def folder
  project && project.children[:test_plan] && project.children[:test_plan].find_folder_by_uid(folder_uid)
end

#set_uid(uid) ⇒ Object



374
375
376
# File 'lib/hiptest-publisher/nodes.rb', line 374

def set_uid(uid)
  @children[:uid] = uid
end