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

#declared_variables_names

Methods inherited from Node

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

Constructor Details

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

Returns a new instance of Scenario.



273
274
275
276
277
278
279
# File 'lib/hiptest-publisher/nodes.rb', line 273

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

  @folder_uid = folder_uid
end

Instance Attribute Details

#folder_uidObject (readonly)

Returns the value of attribute folder_uid.



271
272
273
# File 'lib/hiptest-publisher/nodes.rb', line 271

def folder_uid
  @folder_uid
end

Instance Method Details

#folderObject



285
286
287
# File 'lib/hiptest-publisher/nodes.rb', line 285

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

#set_uid(uid) ⇒ Object



281
282
283
# File 'lib/hiptest-publisher/nodes.rb', line 281

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