hiptest-publisher 1.31.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +310 -0
  3. data/LICENSE +1 -2
  4. data/README.md +39 -22
  5. data/bin/hiptest-publisher +16 -8
  6. data/config/locales/en.yml +17 -14
  7. data/lib/config/cucumber-typescript.conf +41 -41
  8. data/lib/config/cucumber_legacy-groovy.conf +40 -0
  9. data/lib/config/cucumber_legacy-java.conf +24 -0
  10. data/lib/config/cucumber_legacy-typescript.conf +41 -0
  11. data/lib/hiptest-publisher.rb +5 -7
  12. data/lib/hiptest-publisher/client.rb +61 -10
  13. data/lib/hiptest-publisher/formatters/console_formatter.rb +41 -11
  14. data/lib/hiptest-publisher/formatters/reporter.rb +14 -0
  15. data/lib/hiptest-publisher/handlebars_helper.rb +1 -1
  16. data/lib/hiptest-publisher/options_parser.rb +46 -9
  17. data/lib/hiptest-publisher/renderer.rb +5 -1
  18. data/lib/hiptest-publisher/renderer_addons/gherkin_addon.rb +21 -0
  19. data/lib/templates/common/_gherkin_typed_pattern.hbs +1 -0
  20. data/lib/templates/cucumber/groovy/step-definitions/actionword.hbs +1 -1
  21. data/lib/templates/cucumber/groovy/step-definitions/actionwords.hbs +3 -2
  22. data/lib/templates/cucumber/groovy/step-definitions/library.hbs +3 -2
  23. data/lib/templates/cucumber/groovy/step-definitions/libraryactionword.hbs +1 -1
  24. data/lib/templates/cucumber/java/actionword.hbs +1 -1
  25. data/lib/templates/cucumber/java/actionwords.hbs +2 -2
  26. data/lib/templates/cucumber/typescript/actionword.hbs +1 -1
  27. data/lib/templates/cucumber/typescript/libraryactionword.hbs +1 -1
  28. data/lib/templates/cucumber_legacy/groovy/step-definitions/actionword.hbs +5 -0
  29. data/lib/templates/cucumber_legacy/groovy/step-definitions/actionwords.hbs +10 -0
  30. data/lib/templates/cucumber_legacy/groovy/step-definitions/library.hbs +10 -0
  31. data/lib/templates/cucumber_legacy/groovy/step-definitions/libraryactionword.hbs +5 -0
  32. data/lib/templates/cucumber_legacy/java/actionword.hbs +6 -0
  33. data/lib/templates/cucumber_legacy/java/actionwords.hbs +12 -0
  34. data/lib/templates/cucumber_legacy/typescript/actionword.hbs +5 -0
  35. data/lib/templates/cucumber_legacy/typescript/libraryactionword.hbs +5 -0
  36. data/lib/templates/gherkin/scenarios.hbs +1 -1
  37. data/lib/templates/groovy/_scenario.hbs +1 -1
  38. metadata +64 -41
@@ -5,26 +5,35 @@ require 'hiptest-publisher/utils'
5
5
  class ConsoleFormatter
6
6
  attr_reader :verbose
7
7
 
8
- def initialize(verbose)
8
+ def initialize(verbose, color: nil)
9
9
  @verbose = verbose
10
+ @color = color.nil? ? tty? : color
10
11
  @immediate_verbose = true
11
12
  @verbose_messages = []
12
13
  end
13
14
 
14
15
  def dump_error(error, message = nil)
15
16
  return unless verbose
16
- puts message.blue if message
17
+ puts colorize(message, :blue) if message
17
18
  line = "-" * 80
18
- puts line.yellow
19
- puts "#{error.class.name}: #{error.message}".red
20
- puts "#{error.backtrace.map {|l| " #{l}\n"}.join}".yellow
21
- puts line.yellow
19
+ puts colorize(line, :yellow)
20
+ puts colorize("#{error.class.name}: #{error.message}", :red)
21
+ puts colorize("#{error.backtrace.map {|l| " #{l}\n"}.join}", :yellow)
22
+ puts colorize(line, :yellow)
23
+ end
24
+
25
+ def show_error(message)
26
+ STDOUT.print colorize(message, :yellow)
27
+ end
28
+
29
+ def show_failure(message)
30
+ STDOUT.print(colorize(message, :red))
22
31
  end
23
32
 
24
33
  def show_options(options, message = nil)
25
34
  return unless verbose
26
35
  message ||= I18n.t(:verbose_header, version: hiptest_publisher_version)
27
- puts message.yellow
36
+ puts colorize(message, :yellow)
28
37
  options.each { |k, v| puts " - #{k}: #{v.inspect}" }
29
38
  end
30
39
 
@@ -42,18 +51,19 @@ class ConsoleFormatter
42
51
  output = STDOUT
43
52
 
44
53
  if status == :success
45
- status_icon = "v".green
54
+ status_icon = colorize("v", :green)
46
55
  elsif status == :warning
47
- status_icon = "?".yellow
56
+ status_icon = colorize("?", :yellow)
48
57
  elsif status == :failure
49
- status_icon = "x".red
58
+ status_icon = colorize("x", :red)
50
59
  output = STDERR
51
60
  end
52
61
  if status
53
62
  @immediate_verbose = true
54
63
  cursor_offset = ""
55
64
  else
56
- return unless $stdout.tty?
65
+ return unless tty?
66
+ return if IO.console.nil?
57
67
  rows, columns = IO.console.winsize
58
68
  return if columns == 0
59
69
  @immediate_verbose = false
@@ -68,4 +78,24 @@ class ConsoleFormatter
68
78
  @verbose_messages.clear
69
79
  end
70
80
  end
81
+
82
+ def ask(question)
83
+ return unless tty?
84
+ STDOUT.print "[#{colorize('?', :yellow)}] #{question}"
85
+ return $stdin.gets.chomp.downcase.strip
86
+ end
87
+
88
+ def colored?
89
+ @color
90
+ end
91
+
92
+ private
93
+
94
+ def tty?
95
+ $stdout.tty?
96
+ end
97
+
98
+ def colorize(txt, color)
99
+ colored? ? txt.send(color) : txt
100
+ end
71
101
  end
@@ -11,6 +11,14 @@ class Reporter
11
11
  notify(:dump_error, error, message)
12
12
  end
13
13
 
14
+ def show_error(message)
15
+ notify(:show_error, message)
16
+ end
17
+
18
+ def show_failure(message)
19
+ notify(:show_failure, message)
20
+ end
21
+
14
22
  def show_options(options, message = nil)
15
23
  notify(:show_options, options, message)
16
24
  end
@@ -48,6 +56,12 @@ class Reporter
48
56
  end
49
57
  nil
50
58
  end
59
+
60
+ def ask(question)
61
+ askable_listener = @listeners.find { |l| l.respond_to?(:ask) }
62
+ return nil if askable_listener.nil?
63
+ return askable_listener.ask(question)
64
+ end
51
65
  end
52
66
 
53
67
  class NullReporter
@@ -88,7 +88,7 @@ module Hiptest
88
88
  end
89
89
 
90
90
  def hh_join_gherkin_dataset(context, items, block, else_block = nil)
91
- items.map! {|item| item.gsub(/\|/, "\\|")}
91
+ items.map! { |item| item.gsub(/\|/, "\\|").gsub("\n", "\\n") }
92
92
 
93
93
  hh_join(context, items, ' | ', block, else_block)
94
94
  end
@@ -114,6 +114,10 @@ class CliOptions < OpenStruct
114
114
  option_present?(test_run_name)
115
115
  end
116
116
 
117
+ def test_run?
118
+ test_run_id? || test_run_name?
119
+ end
120
+
117
121
  def language_framework
118
122
  if framework.empty?
119
123
  language
@@ -132,10 +136,15 @@ class CliOptions < OpenStruct
132
136
  "--#{key.to_s.gsub('_', '-')}=#{self[key]}"
133
137
  end.compact
134
138
 
135
- return "hiptest-publisher #{args.join(' ')}".strip
139
+ "hiptest-publisher #{args.join(' ')}".strip
140
+ end
141
+
142
+ def uids_not_set_yet?
143
+ !__cli_args.include?(:uids) && !__config_args.include?(:uids)
136
144
  end
137
145
 
138
146
  def normalize!(reporter = nil)
147
+ self.uids = true if test_run? && uids_not_set_yet?
139
148
  self.no_uids = !uids # silent normalization
140
149
  modified_options = self.clone
141
150
  if actionwords_only
@@ -194,6 +203,7 @@ class OptionsParser
194
203
  {
195
204
  'Ruby' => ['Rspec', 'MiniTest'],
196
205
  'Cucumber' => ['Ruby', 'Java', 'Javascript', 'Groovy', 'TypeScript'],
206
+ 'Cucumber_Legacy' => ['Java', 'Groovy', 'TypeScript'],
197
207
  'Java' => ['JUnit', 'Test NG', 'Espresso'],
198
208
  'Python' => ['Unittest'],
199
209
  'Robot Framework' => [''],
@@ -205,7 +215,8 @@ class OptionsParser
205
215
  'Behave' => [''],
206
216
  'Behat' => [''],
207
217
  'Groovy' => ['Spock'],
208
- 'JBehave' => ['']
218
+ 'JBehave' => [''],
219
+ 'Swift' => ['XCTest']
209
220
  }
210
221
  end
211
222
 
@@ -218,6 +229,7 @@ class OptionsParser
218
229
  Option.new(nil, 'filename-pattern=PATTERN', nil, String, I18n.t('options.filename_pattern'), :filename_pattern),
219
230
  Option.new('c', 'config-file=PATH', nil, String, I18n.t('options.config'), :config),
220
231
  Option.new(nil, 'overriden-templates=PATH', '', String, I18n.t('options.overriden_templates'), :overriden_templates),
232
+ Option.new(nil, 'overriden-language-configs=PATH', '', String, I18n.t('options.overriden_language_configs'), :overriden_language_configs),
221
233
  Option.new(nil, 'test-run-id=ID', '', String, I18n.t('options.test_run_id'), :test_run_id),
222
234
  Option.new(nil, 'test-run-name=NAME', '', String, I18n.t('options.test_run_name'), :test_run_name),
223
235
  Option.new(nil, 'only=CATEGORIES', nil, String, I18n.t('options.only'), :only),
@@ -240,14 +252,14 @@ class OptionsParser
240
252
  Option.new(nil, 'empty-folders', false, nil, I18n.t('options.empty_folders'), :empty_folders),
241
253
  Option.new(nil, 'split-scenarios', false, nil, I18n.t('options.split_scenarios'), :split_scenarios),
242
254
  Option.new(nil, 'leafless-export', false, nil, I18n.t('options.leafless_export'), :leafless_export),
243
- Option.new('s', 'site=SITE', 'https://app.hiptest.com', String, I18n.t('options.site'), :site),
255
+ Option.new('s', 'site=SITE', 'https://studio.cucumber.io', String, I18n.t('options.site'), :site),
244
256
  Option.new(nil, 'http-proxy=PROXY_URL', nil, String, I18n.t('options.http_proxy'), :http_proxy),
245
257
  Option.new('p', 'push=FILE.TAP', '', String, I18n.t('options.push'), :push),
246
258
  Option.new(nil, 'global-failure-on-missing-reports', false, nil, I18n.t('options.global_failure_on_missing_reports'), :global_failure_on_missing_reports),
247
259
  Option.new(nil, 'push-format=tap', 'tap', String, I18n.t('options.push_format'), :push_format),
248
260
  Option.new(nil, 'execution-environment=NAME', '', String, I18n.t('options.execution_environment'), :execution_environment),
249
261
  Option.new(nil, 'sort=[id,order,alpha]', 'order', String, I18n.t('options.sort'), :sort),
250
- Option.new(nil, '[no-]uids', true, nil, I18n.t('options.uids'), :uids),
262
+ Option.new(nil, '[no-]uids', false, nil, I18n.t('options.uids'), :uids),
251
263
  Option.new(nil, '[no-]parent-folder-tags', true, nil, I18n.t('options.parent_folder_tags'), :parent_folder_tags),
252
264
  Option.new(nil, 'parameter-delimiter=DELIMITER', '"', EmptiableString, I18n.t('options.parameter_delimiter'), :parameter_delimiter),
253
265
  Option.new(nil, 'with-dataset-names', false, nil, I18n.t('options.with_dataset_names'), :with_dataset_names),
@@ -263,12 +275,20 @@ class OptionsParser
263
275
  Option.new(nil, 'meta=META', '', String, I18n.t('options.meta'), :meta),
264
276
  Option.new(nil, 'check-version', false, nil, I18n.t('options.check_version'), :check_version),
265
277
  Option.new(nil, 'force', false, nil, I18n.t('options.force_overwrite'), :force_overwrite),
266
- Option.new('v', 'verbose', false, nil, I18n.t('options.verbose'), :verbose)
278
+ Option.new(nil, '[no-]color', nil, nil, I18n.t('options.color'), :color),
279
+ Option.new('v', 'verbose', false, nil, I18n.t('options.verbose'), :verbose),
280
+ Option.new(nil, 'indentation=INDENTATION', nil, EmptiableString, I18n.t('options.indentation'), :indent)
267
281
  ]
268
282
  end
269
283
 
270
284
  def self.default_cache_directory
271
- File.join(Dir.home, '.hiptest-publisher', 'cache')
285
+ home_dir = begin
286
+ Dir.home
287
+ rescue
288
+ '.'
289
+ end
290
+
291
+ File.join(home_dir, '.hiptest-publisher', 'cache')
272
292
  end
273
293
 
274
294
  def self.parse(args, reporter)
@@ -294,7 +314,7 @@ class OptionsParser
294
314
 
295
315
  args << "--help" if args.empty?
296
316
  opt_parser.parse!(args)
297
- reporter.add_listener(ConsoleFormatter.new(options.verbose))
317
+ reporter.add_listener(ConsoleFormatter.new(options.verbose, color: options.color))
298
318
  FileConfigParser.update_options(options, reporter)
299
319
 
300
320
  reporter.show_options(options.marshal_dump)
@@ -364,6 +384,7 @@ class NodeRenderingContext
364
384
 
365
385
  def renderer_addons
366
386
  addons = @properties.renderer_addons || ""
387
+
367
388
  addons.split.map do |addon_name|
368
389
  Hiptest.const_get(addon_name)
369
390
  end
@@ -371,11 +392,12 @@ class NodeRenderingContext
371
392
  end
372
393
 
373
394
  class TemplateFinder
374
- attr_reader :template_dirs, :overriden_templates, :forced_templates, :fallback_template
395
+ attr_reader :template_dirs, :overriden_templates, :overriden_language_configs, :forced_templates, :fallback_template
375
396
 
376
397
  def initialize(
377
398
  template_dirs: nil,
378
399
  overriden_templates: nil,
400
+ overriden_language_configs: nil,
379
401
  indentation: ' ',
380
402
  forced_templates: nil,
381
403
  fallback_template: nil,
@@ -555,6 +577,7 @@ class LanguageGroupConfig
555
577
  end
556
578
 
557
579
  def indentation
580
+ return @user_params[:indent] unless @user_params[:indent].nil?
558
581
  @language_group_params[:indentation] || ' '
559
582
  end
560
583
 
@@ -676,7 +699,21 @@ class LanguageConfigParser
676
699
  else
677
700
  "#{cli_options.language}-#{cli_options.framework}.conf"
678
701
  end
679
- config_path = File.expand_path("#{hiptest_publisher_path}/lib/config/#{config_name.downcase}")
702
+ config_path = "/lib/config/#{config_name.downcase}"
703
+ config_prefix = if !cli_options.overriden_language_configs.to_s.empty?
704
+ # If the user has specified a overiden language config path, check it first. If the config
705
+ # exists there, return that, otherwise fall back to the default setup and look for a config there.
706
+ expanded = File.expand_path("#{cli_options.overriden_language_configs}/#{config_name.downcase}")
707
+
708
+ # If the file exists in the path the user specified, set the config path to blank so we will be
709
+ # looking in the exact path that the user requested.
710
+ if File.file?(expanded)
711
+ config_path = ''
712
+ expanded
713
+ end
714
+ end
715
+
716
+ config_path = File.expand_path("#{config_prefix || hiptest_publisher_path}#{config_path}")
680
717
 
681
718
  if !File.file?(config_path)
682
719
  if cli_options.framework.to_s.empty?
@@ -27,7 +27,11 @@ module Hiptest
27
27
  if node.is_a? Hiptest::Nodes::Node
28
28
  @rendered_children = {}
29
29
 
30
- node.children.each {|name, child| @rendered_children[name] = @rendered[child]}
30
+ node.children.each do |name, child|
31
+ @rendered_children[name] = @rendered[child]
32
+
33
+ @rendered_children[name].uniq! if name == :actionwords && @rendered_children[name].is_a?(Array)
34
+ end
31
35
  @rendered[node] = render_node(node, super(node))
32
36
  elsif node.is_a? Array
33
37
  @rendered[node] = node.map {|item| @rendered[item]}
@@ -14,6 +14,14 @@ module Hiptest
14
14
  super(call)
15
15
  end
16
16
 
17
+ def walk_actionword(aw)
18
+ parameters = aw.children[:parameters]
19
+ aw.chunks = replace_parameter_value_with_type(aw.chunks, parameters)
20
+ aw.extra_inlined_parameters = replace_parameter_value_with_type(aw.extra_inlined_parameters, parameters)
21
+
22
+ super(aw)
23
+ end
24
+
17
25
  def walk_folder(folder)
18
26
  @rendered_children[:ancestor_tags] = ancestor_tags(folder)
19
27
 
@@ -34,5 +42,18 @@ module Hiptest
34
42
  ancestor_tags = folder.ancestors.map { |f| f.children[:tags] }.flatten.uniq
35
43
  ancestor_tags.map { |t| Hiptest::Renderer.render(t, @context) }
36
44
  end
45
+
46
+ def replace_parameter_value_with_type(collection, parameters)
47
+ collection.map do |obj|
48
+ if obj[:is_parameter]
49
+ parameter = parameters.find { |parameter| parameter.children[:name] == obj[:name] }
50
+ obj[:typed_value] = parameter ? "{#{parameter.type.downcase}}" : "{}"
51
+ else
52
+ obj[:typed_value] = obj[:value]
53
+ end
54
+
55
+ obj
56
+ end
57
+ end
37
58
  end
38
59
  end
@@ -0,0 +1 @@
1
+ {{#strip}}{{#each chunks as |treated_chunk|}}{{treated_chunk.typed_value}}{{/each}}{{#each extra_inlined_parameters as |param|}} {{param.typed_value}}{{/each}}{{/strip}}
@@ -1,4 +1,4 @@
1
- {{#if rendered_children.gherkin_annotation }}{{{ rendered_children.gherkin_annotation }}}(~"^{{#escape_backslashes_and_double_quotes}}{{> gherkin_pattern}}{{/escape_backslashes_and_double_quotes}}\$") { {{{ join rendered_children.parameters_ordered_by_pattern ', '}}} ->{{#indent}}
1
+ {{#if rendered_children.gherkin_annotation }}{{{ rendered_children.gherkin_annotation }}}("{{#escape_backslashes_and_double_quotes}}{{> gherkin_typed_pattern}}{{/escape_backslashes_and_double_quotes}}") { {{{ join rendered_children.parameters_ordered_by_pattern ', '}}} ->{{#indent}}
2
2
  {{{ context.call_prefix }}}.{{{camelize_lower uniq_name}}}({{#if has_parameters?}}{{#join raw_parameter_names ', ' as |param|}}{{{camelize_lower param}}}{{/join}}{{/if}})
3
3
  {{/indent}}
4
4
  }
@@ -1,8 +1,9 @@
1
1
  package {{{ context.package }}}
2
2
 
3
- import cucumber.api.DataTable
3
+ import io.cucumber.datatable.DataTable
4
+ import io.cucumber.groovy.EN
4
5
 
5
- this.metaClass.mixin(cucumber.api.groovy.EN)
6
+ this.metaClass.mixin(EN)
6
7
 
7
8
  Actionwords {{{ context.call_prefix }}} = new Actionwords()
8
9
 
@@ -1,8 +1,9 @@
1
1
  package {{{ context.package }}}
2
2
 
3
- import cucumber.api.DataTable
3
+ import io.cucumber.datatable.DataTable
4
+ import io.cucumber.groovy.EN
4
5
 
5
- this.metaClass.mixin(cucumber.api.groovy.EN)
6
+ this.metaClass.mixin(EN)
6
7
 
7
8
  Actionwords {{{ context.call_prefix }}} = new Actionwords()
8
9
 
@@ -1,4 +1,4 @@
1
- {{#if rendered_children.gherkin_annotation }}{{{ rendered_children.gherkin_annotation }}}(~"^{{#escape_backslashes_and_double_quotes}}{{> gherkin_pattern}}{{/escape_backslashes_and_double_quotes}}\$") { {{{ join rendered_children.parameters_ordered_by_pattern ', '}}} ->{{#indent}}
1
+ {{#if rendered_children.gherkin_annotation }}{{{ rendered_children.gherkin_annotation }}}("{{#escape_backslashes_and_double_quotes}}{{> gherkin_typed_pattern}}{{/escape_backslashes_and_double_quotes}}") { {{{ join rendered_children.parameters_ordered_by_pattern ', '}}} ->{{#indent}}
2
2
  {{{ context.call_prefix }}}.get{{{camelize library_name}}}Library().{{{camelize_lower uniq_name}}}({{#if has_parameters?}}{{#join raw_parameter_names ', ' as |param|}}{{{camelize_lower param}}}{{/join}}{{/if}})
3
3
  {{/indent}}
4
4
  }
@@ -1,4 +1,4 @@
1
- {{#if rendered_children.gherkin_annotation }}@{{{ rendered_children.gherkin_annotation }}}("{{#escape_backslashes_and_double_quotes}}{{> gherkin_pattern}}{{/escape_backslashes_and_double_quotes}}")
1
+ {{#if rendered_children.gherkin_annotation }}@{{{ rendered_children.gherkin_annotation }}}("{{#escape_backslashes_and_double_quotes}}{{> gherkin_typed_pattern}}{{/escape_backslashes_and_double_quotes}}")
2
2
  public void {{{camelize_lower rendered_children.name}}}({{{ join rendered_children.parameters_ordered_by_pattern ', '}}}) {{#curly}}{{#indent}}
3
3
  {{{ context.call_prefix }}}.{{{camelize_lower rendered_children.name}}}({{#if has_parameters?}}{{#join raw_parameter_names ', ' as |param|}}{{{camelize_lower param}}}{{/join}}{{/if}});
4
4
  {{/indent}}
@@ -1,7 +1,7 @@
1
1
  package {{{ context.package }}};
2
2
 
3
- import cucumber.api.DataTable;
4
- import cucumber.api.java.en.*;
3
+ import io.cucumber.datatable.DataTable;
4
+ import io.cucumber.java.en.*;
5
5
 
6
6
  public class StepDefinitions {{#curly}}{{#indent}}
7
7
  public Actionwords {{{ context.call_prefix }}} = new Actionwords();
@@ -1,5 +1,5 @@
1
1
  {{#if rendered_children.gherkin_annotation }}
2
- {{{ rendered_children.gherkin_annotation }}}(/{{> gherkin_pattern}}/, async ({{#if rendered_children.parameters}}{{{ join rendered_children.parameters_ordered_by_pattern ', '}}}{{/if}}) => {{#curly}}{{#indent}}
2
+ {{{ rendered_children.gherkin_annotation }}}('{{> gherkin_typed_pattern}}', async ({{#if rendered_children.parameters}}{{{ join rendered_children.parameters_ordered_by_pattern ', '}}}{{/if}}) => {{#curly}}{{#indent}}
3
3
  actionWords.{{{camelize_lower rendered_children.name}}}({{#if has_parameters?}}{{#join raw_parameter_names ', ' as |param|}}{{{underscore param}}}{{/join}}{{/if}});
4
4
  {{/indent}}
5
5
  {{/curly}});{{/if}}
@@ -1,5 +1,5 @@
1
1
  {{#if rendered_children.gherkin_annotation}}
2
- {{{ rendered_children.gherkin_annotation }}}(/{{> gherkin_pattern}}/, async ({{#if rendered_children.parameters}}{{{ join rendered_children.parameters_ordered_by_pattern ', '}}}{{/if}}) => {{#curly}}{{#indent}}
2
+ {{{ rendered_children.gherkin_annotation }}}('{{> gherkin_typed_pattern}}', async ({{#if rendered_children.parameters}}{{{ join rendered_children.parameters_ordered_by_pattern ', '}}}{{/if}}) => {{#curly}}{{#indent}}
3
3
  libraryActionWord.getDefaultLibrary().{{{camelize_lower rendered_children.name}}}({{#if has_parameters?}}{{#join raw_parameter_names ', ' as |param|}}{{{underscore param}}}{{/join}}{{/if}});
4
4
  {{/indent}}
5
5
  {{/curly}});{{/if}}
@@ -0,0 +1,5 @@
1
+ {{#if rendered_children.gherkin_annotation }}{{{ rendered_children.gherkin_annotation }}}(~"^{{#escape_backslashes_and_double_quotes}}{{> gherkin_pattern}}{{/escape_backslashes_and_double_quotes}}\$") { {{{ join rendered_children.parameters_ordered_by_pattern ', '}}} ->{{#indent}}
2
+ {{{ context.call_prefix }}}.{{{camelize_lower uniq_name}}}({{#if has_parameters?}}{{#join raw_parameter_names ', ' as |param|}}{{{camelize_lower param}}}{{/join}}{{/if}})
3
+ {{/indent}}
4
+ }
5
+ {{/if}}
@@ -0,0 +1,10 @@
1
+ package {{{ context.package }}}
2
+
3
+ import cucumber.api.DataTable
4
+
5
+ this.metaClass.mixin(cucumber.api.groovy.EN)
6
+
7
+ Actionwords {{{ context.call_prefix }}} = new Actionwords()
8
+
9
+ {{#each rendered_children.actionwords as |actionword|}}{{{actionword}}}
10
+ {{/each}}
@@ -0,0 +1,10 @@
1
+ package {{{ context.package }}}
2
+
3
+ import cucumber.api.DataTable
4
+
5
+ this.metaClass.mixin(cucumber.api.groovy.EN)
6
+
7
+ Actionwords {{{ context.call_prefix }}} = new Actionwords()
8
+
9
+ {{#each rendered_children.library_actionwords as |actionword|}}{{{actionword}}}
10
+ {{/each}}
@@ -0,0 +1,5 @@
1
+ {{#if rendered_children.gherkin_annotation }}{{{ rendered_children.gherkin_annotation }}}(~"^{{#escape_backslashes_and_double_quotes}}{{> gherkin_pattern}}{{/escape_backslashes_and_double_quotes}}\$") { {{{ join rendered_children.parameters_ordered_by_pattern ', '}}} ->{{#indent}}
2
+ {{{ context.call_prefix }}}.get{{{camelize library_name}}}Library().{{{camelize_lower uniq_name}}}({{#if has_parameters?}}{{#join raw_parameter_names ', ' as |param|}}{{{camelize_lower param}}}{{/join}}{{/if}})
3
+ {{/indent}}
4
+ }
5
+ {{/if}}