10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/hiptest-publisher/node_modifiers/datatable_fixer.rb', line 10
def walk_scenario(scenario)
return if scenario.children[:datatable].nil?
@argument_names = scenario.children[:parameters].map{|param| param.children[:name]}
scenario.children[:datatable].children[:datasets].map do |dataset|
arguments_mapping = {}
dataset.children[:arguments].map do |arg|
arguments_mapping[arg.children[:name]] = arg
end
dataset.children[:arguments] = @argument_names.map do |arg_name|
if arguments_mapping.has_key?(arg_name)
arguments_mapping[arg_name]
else
Hiptest::Nodes::Argument.new(arg_name, Hiptest::Nodes::StringLiteral.new(''))
end
end
end
end
|