hiptest-publisher 2.3.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -2
  3. data/README.md +28 -21
  4. data/bin/hiptest-publisher +11 -7
  5. data/config/locales/en.yml +18 -13
  6. data/lib/config/cucumber-typescript.conf +41 -41
  7. data/lib/config/cucumber_legacy-groovy.conf +40 -0
  8. data/lib/config/cucumber_legacy-java.conf +24 -0
  9. data/lib/config/{cucumber_expressions-typescript.conf → cucumber_legacy-typescript.conf} +41 -41
  10. data/lib/hiptest-publisher/cli_options_checker.rb +7 -0
  11. data/lib/hiptest-publisher/client.rb +76 -14
  12. data/lib/hiptest-publisher/formatters/console_formatter.rb +1 -0
  13. data/lib/hiptest-publisher/handlebars_helper.rb +1 -1
  14. data/lib/hiptest-publisher/options_parser.rb +27 -6
  15. data/lib/hiptest-publisher/renderer.rb +5 -1
  16. data/lib/hiptest-publisher.rb +1 -1
  17. data/lib/templates/cucumber/groovy/step-definitions/actionword.hbs +1 -1
  18. data/lib/templates/cucumber/groovy/step-definitions/actionwords.hbs +3 -2
  19. data/lib/templates/cucumber/groovy/step-definitions/library.hbs +3 -2
  20. data/lib/templates/cucumber/groovy/step-definitions/libraryactionword.hbs +1 -1
  21. data/lib/templates/cucumber/java/actionword.hbs +1 -1
  22. data/lib/templates/cucumber/java/actionwords.hbs +2 -2
  23. data/lib/templates/cucumber/typescript/actionword.hbs +1 -1
  24. data/lib/templates/cucumber/typescript/libraryactionword.hbs +1 -1
  25. data/lib/templates/cucumber_legacy/groovy/step-definitions/actionword.hbs +5 -0
  26. data/lib/templates/cucumber_legacy/groovy/step-definitions/actionwords.hbs +10 -0
  27. data/lib/templates/cucumber_legacy/groovy/step-definitions/library.hbs +10 -0
  28. data/lib/templates/cucumber_legacy/groovy/step-definitions/libraryactionword.hbs +5 -0
  29. data/lib/templates/cucumber_legacy/java/actionword.hbs +6 -0
  30. data/lib/templates/cucumber_legacy/java/actionwords.hbs +12 -0
  31. data/lib/templates/cucumber_legacy/typescript/actionword.hbs +5 -0
  32. data/lib/templates/{cucumber_expressions → cucumber_legacy}/typescript/libraryactionword.hbs +1 -1
  33. data/lib/templates/gherkin/scenarios.hbs +1 -1
  34. metadata +57 -38
  35. data/CHANGELOG.md +0 -286
  36. data/lib/templates/cucumber_expressions/typescript/actionword.hbs +0 -5
@@ -21,6 +21,9 @@ module Hiptest
21
21
  end
22
22
  end
23
23
 
24
+ class AsyncExportUnavailable < StandardError
25
+ end
26
+
24
27
  class MaximumRedirectionReachedError < StandardError
25
28
  end
26
29
 
@@ -28,15 +31,17 @@ module Hiptest
28
31
 
29
32
  class Client
30
33
  attr_reader :cli_options
34
+ attr_writer :async_options
31
35
 
32
36
  def initialize(cli_options, reporter = nil)
33
37
  @cli_options = cli_options
34
38
  @reporter = reporter || NullReporter.new
39
+ @async_options = { max_attempts: 200, sleep_time_between_attemps: 5 }
35
40
  end
36
41
 
37
42
  def url
38
43
  if cli_options.push?
39
- "#{cli_options.site}/import_test_results/#{cli_options.token}/#{cli_options.push_format}#{execution_environment_query_parameter}"
44
+ "#{cli_options.site}/import_test_results/#{cli_options.token}/#{cli_options.push_format}#{push_query_parameters}"
40
45
  elsif test_run_id
41
46
  "#{base_publication_path}/test_run/#{test_run_id}#{test_run_export_filter}"
42
47
  else
@@ -86,7 +91,7 @@ module Hiptest
86
91
  return "?filter_status=#{value}"
87
92
  end
88
93
 
89
- def fetch_project_export
94
+ def fetch_project
90
95
  cached = export_cache.cache_for(url)
91
96
 
92
97
  unless cached.nil?
@@ -95,17 +100,18 @@ module Hiptest
95
100
  end
96
101
  end
97
102
 
98
- @reporter.with_status_message I18n.t(:fetching_data) do
99
- response = send_get_request(url)
100
- if response.code_type == Net::HTTPNotFound
101
- raise ClientError, I18n.t('errors.project_not_found')
102
- end
103
-
104
- content = response.body
105
- export_cache.cache(url, content)
103
+ content = @reporter.with_status_message I18n.t(:fetching_data) do
104
+ break fetch_project_export if use_synchronous_fetch?
106
105
 
107
- return content
106
+ begin
107
+ fetch_project_export_asynchronously
108
+ rescue AsyncExportUnavailable
109
+ fetch_project_export
110
+ end
108
111
  end
112
+
113
+ export_cache.cache(url, content)
114
+ content
109
115
  end
110
116
 
111
117
  def available_test_runs
@@ -136,6 +142,50 @@ module Hiptest
136
142
 
137
143
  private
138
144
 
145
+ def use_synchronous_fetch?
146
+ cli_options.push? || cli_options.leafless_export || test_run_id
147
+ end
148
+
149
+ def fetch_project_export
150
+ response = send_get_request(url)
151
+ if response.code_type == Net::HTTPNotFound
152
+ raise ClientError, I18n.t('errors.project_not_found')
153
+ end
154
+
155
+ response.body
156
+ end
157
+
158
+ def fetch_project_export_asynchronously
159
+ publication_export_id = fetch_asynchronous_publication_export_id
160
+ url = "#{base_publication_path}/async_project/#{publication_export_id}"
161
+ response = nil
162
+
163
+ # the server should respond with a timeout after 15 minutes
164
+ # it is about 180 attempts with a sleep time of 5 seconds between each requests
165
+ sleep_time_between_attemps = @async_options[:sleep_time_between_attemps]
166
+ max_attempts = @async_options[:max_attempts]
167
+
168
+ loop do
169
+ response = send_get_request(url)
170
+
171
+ break unless response.code_type == Net::HTTPAccepted
172
+ break if 0 >= (max_attempts -= 1)
173
+
174
+ sleep(sleep_time_between_attemps)
175
+ end
176
+
177
+ response.body
178
+ end
179
+
180
+ def fetch_asynchronous_publication_export_id
181
+ url = "#{base_publication_path}/async_project#{project_export_filters}"
182
+ response = send_post_request(url)
183
+
184
+ raise AsyncExportUnavailable if response.code_type == Net::HTTPNotFound
185
+
186
+ JSON.parse(response.body)['publication_export_id']
187
+ end
188
+
139
189
  def export_cache
140
190
  @export_cache ||= ExportCache.new(
141
191
  @cli_options.cache_dir,
@@ -243,6 +293,7 @@ module Hiptest
243
293
  response = http.request(request)
244
294
 
245
295
  raise RedirectionError.new("Got redirected", response['location']) if response.is_a?(Net::HTTPRedirection)
296
+
246
297
  response
247
298
  end
248
299
  end
@@ -255,10 +306,21 @@ module Hiptest
255
306
  ).find_proxy
256
307
  end
257
308
 
258
- def execution_environment_query_parameter
259
- return "?execution_environment=#{cli_options.execution_environment}" unless cli_options.execution_environment.strip.empty?
309
+ def push_query_parameters
310
+ parameters = {}
311
+ unless cli_options.execution_environment.strip.empty?
312
+ parameters['execution_environment'] = cli_options.execution_environment
313
+ end
314
+
315
+ unless cli_options.build_id.strip.empty?
316
+ parameters['build_id'] = cli_options.build_id
317
+ end
318
+
319
+ unless cli_options.build_name.strip.empty?
320
+ parameters['build_name'] = cli_options.build_name
321
+ end
260
322
 
261
- ""
323
+ parameters.empty? ? "" : "?#{parameters.map {|key, value| "#{key}=#{URI.escape(value)}"}.join("&")}"
262
324
  end
263
325
  end
264
326
  end
@@ -63,6 +63,7 @@ class ConsoleFormatter
63
63
  cursor_offset = ""
64
64
  else
65
65
  return unless tty?
66
+ return if IO.console.nil?
66
67
  rows, columns = IO.console.winsize
67
68
  return if columns == 0
68
69
  @immediate_verbose = false
@@ -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
@@ -203,14 +203,14 @@ class OptionsParser
203
203
  {
204
204
  'Ruby' => ['Rspec', 'MiniTest'],
205
205
  'Cucumber' => ['Ruby', 'Java', 'Javascript', 'Groovy', 'TypeScript'],
206
- 'Cucumber_Expressions' => ['TypeScript'],
206
+ 'Cucumber_Legacy' => ['Java', 'Groovy', 'TypeScript'],
207
207
  'Java' => ['JUnit', 'Test NG', 'Espresso'],
208
208
  'Python' => ['Unittest'],
209
209
  'Robot Framework' => [''],
210
210
  'Selenium IDE' => [''],
211
211
  'Javascript' => ['qUnit', 'Jasmine', 'Mocha', 'Protractor', 'CodeceptJS'],
212
212
  'CSharp' => ['NUnit'],
213
- 'PHP' => ['PHPUnit', 'UnitTest'],
213
+ 'PHP' => ['PHPUnit'],
214
214
  'SpecFlow' => [''],
215
215
  'Behave' => [''],
216
216
  'Behat' => [''],
@@ -229,6 +229,7 @@ class OptionsParser
229
229
  Option.new(nil, 'filename-pattern=PATTERN', nil, String, I18n.t('options.filename_pattern'), :filename_pattern),
230
230
  Option.new('c', 'config-file=PATH', nil, String, I18n.t('options.config'), :config),
231
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),
232
233
  Option.new(nil, 'test-run-id=ID', '', String, I18n.t('options.test_run_id'), :test_run_id),
233
234
  Option.new(nil, 'test-run-name=NAME', '', String, I18n.t('options.test_run_name'), :test_run_name),
234
235
  Option.new(nil, 'only=CATEGORIES', nil, String, I18n.t('options.only'), :only),
@@ -251,12 +252,14 @@ class OptionsParser
251
252
  Option.new(nil, 'empty-folders', false, nil, I18n.t('options.empty_folders'), :empty_folders),
252
253
  Option.new(nil, 'split-scenarios', false, nil, I18n.t('options.split_scenarios'), :split_scenarios),
253
254
  Option.new(nil, 'leafless-export', false, nil, I18n.t('options.leafless_export'), :leafless_export),
254
- 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),
255
256
  Option.new(nil, 'http-proxy=PROXY_URL', nil, String, I18n.t('options.http_proxy'), :http_proxy),
256
257
  Option.new('p', 'push=FILE.TAP', '', String, I18n.t('options.push'), :push),
257
258
  Option.new(nil, 'global-failure-on-missing-reports', false, nil, I18n.t('options.global_failure_on_missing_reports'), :global_failure_on_missing_reports),
258
259
  Option.new(nil, 'push-format=tap', 'tap', String, I18n.t('options.push_format'), :push_format),
259
260
  Option.new(nil, 'execution-environment=NAME', '', String, I18n.t('options.execution_environment'), :execution_environment),
261
+ Option.new(nil, 'build-id=ID', '', String, I18n.t('options.build_id'), :build_id),
262
+ Option.new(nil, 'build-name=NAME', '', String, I18n.t('options.build_name'), :build_name),
260
263
  Option.new(nil, 'sort=[id,order,alpha]', 'order', String, I18n.t('options.sort'), :sort),
261
264
  Option.new(nil, '[no-]uids', false, nil, I18n.t('options.uids'), :uids),
262
265
  Option.new(nil, '[no-]parent-folder-tags', true, nil, I18n.t('options.parent_folder_tags'), :parent_folder_tags),
@@ -275,7 +278,8 @@ class OptionsParser
275
278
  Option.new(nil, 'check-version', false, nil, I18n.t('options.check_version'), :check_version),
276
279
  Option.new(nil, 'force', false, nil, I18n.t('options.force_overwrite'), :force_overwrite),
277
280
  Option.new(nil, '[no-]color', nil, nil, I18n.t('options.color'), :color),
278
- Option.new('v', 'verbose', false, nil, I18n.t('options.verbose'), :verbose)
281
+ Option.new('v', 'verbose', false, nil, I18n.t('options.verbose'), :verbose),
282
+ Option.new(nil, 'indentation=INDENTATION', nil, EmptiableString, I18n.t('options.indentation'), :indent)
279
283
  ]
280
284
  end
281
285
 
@@ -382,6 +386,7 @@ class NodeRenderingContext
382
386
 
383
387
  def renderer_addons
384
388
  addons = @properties.renderer_addons || ""
389
+
385
390
  addons.split.map do |addon_name|
386
391
  Hiptest.const_get(addon_name)
387
392
  end
@@ -389,11 +394,12 @@ class NodeRenderingContext
389
394
  end
390
395
 
391
396
  class TemplateFinder
392
- attr_reader :template_dirs, :overriden_templates, :forced_templates, :fallback_template
397
+ attr_reader :template_dirs, :overriden_templates, :overriden_language_configs, :forced_templates, :fallback_template
393
398
 
394
399
  def initialize(
395
400
  template_dirs: nil,
396
401
  overriden_templates: nil,
402
+ overriden_language_configs: nil,
397
403
  indentation: ' ',
398
404
  forced_templates: nil,
399
405
  fallback_template: nil,
@@ -573,6 +579,7 @@ class LanguageGroupConfig
573
579
  end
574
580
 
575
581
  def indentation
582
+ return @user_params[:indent] unless @user_params[:indent].nil?
576
583
  @language_group_params[:indentation] || ' '
577
584
  end
578
585
 
@@ -694,7 +701,21 @@ class LanguageConfigParser
694
701
  else
695
702
  "#{cli_options.language}-#{cli_options.framework}.conf"
696
703
  end
697
- config_path = File.expand_path("#{hiptest_publisher_path}/lib/config/#{config_name.downcase}")
704
+ config_path = "/lib/config/#{config_name.downcase}"
705
+ config_prefix = if !cli_options.overriden_language_configs.to_s.empty?
706
+ # If the user has specified a overiden language config path, check it first. If the config
707
+ # exists there, return that, otherwise fall back to the default setup and look for a config there.
708
+ expanded = File.expand_path("#{cli_options.overriden_language_configs}/#{config_name.downcase}")
709
+
710
+ # If the file exists in the path the user specified, set the config path to blank so we will be
711
+ # looking in the exact path that the user requested.
712
+ if File.file?(expanded)
713
+ config_path = ''
714
+ expanded
715
+ end
716
+ end
717
+
718
+ config_path = File.expand_path("#{config_prefix || hiptest_publisher_path}#{config_path}")
698
719
 
699
720
  if !File.file?(config_path)
700
721
  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]}
@@ -83,7 +83,7 @@ module Hiptest
83
83
  end
84
84
 
85
85
  def fetch_xml_file
86
- @client.fetch_project_export
86
+ @client.fetch_project
87
87
  rescue ClientError => err
88
88
  # This should not be an error that needs reporting to an exception monitoring app
89
89
  reporter.show_error(err.message)
@@ -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}}
@@ -0,0 +1,6 @@
1
+ {{#if rendered_children.gherkin_annotation }}@{{{ rendered_children.gherkin_annotation }}}("{{#escape_backslashes_and_double_quotes}}{{> gherkin_pattern}}{{/escape_backslashes_and_double_quotes}}")
2
+ public void {{{camelize_lower rendered_children.name}}}({{{ join rendered_children.parameters_ordered_by_pattern ', '}}}) {{#curly}}{{#indent}}
3
+ {{{ context.call_prefix }}}.{{{camelize_lower rendered_children.name}}}({{#if has_parameters?}}{{#join raw_parameter_names ', ' as |param|}}{{{camelize_lower param}}}{{/join}}{{/if}});
4
+ {{/indent}}
5
+ {{/curly}}
6
+ {{/if}}
@@ -0,0 +1,12 @@
1
+ package {{{ context.package }}};
2
+
3
+ import cucumber.api.DataTable;
4
+ import cucumber.api.java.en.*;
5
+
6
+ public class StepDefinitions {{#curly}}{{#indent}}
7
+ public Actionwords {{{ context.call_prefix }}} = new Actionwords();
8
+
9
+ {{#each rendered_children.actionwords as |actionword|}}{{{actionword}}}
10
+ {{/each}}
11
+ {{/indent}}
12
+ {{/curly}}
@@ -0,0 +1,5 @@
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}}
3
+ actionWords.{{{camelize_lower rendered_children.name}}}({{#if has_parameters?}}{{#join raw_parameter_names ', ' as |param|}}{{{underscore param}}}{{/join}}{{/if}});
4
+ {{/indent}}
5
+ {{/curly}});{{/if}}
@@ -1,5 +1,5 @@
1
1
  {{#if rendered_children.gherkin_annotation}}
2
- {{{ rendered_children.gherkin_annotation }}}('{{> gherkin_typed_pattern}}', async ({{#if rendered_children.parameters}}{{{ join rendered_children.parameters_ordered_by_pattern ', '}}}{{/if}}) => {{#curly}}{{#indent}}
2
+ {{{ rendered_children.gherkin_annotation }}}(/{{> gherkin_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}}
@@ -1,3 +1,3 @@
1
1
  # To export your project to Gherkin correctly, you can add the option
2
2
  # --with-folders when calling hiptest-publisher. It will keep the
3
- # HipTest folders hierarchy of your project.
3
+ # folders hierarchy of your CucumberStudio Test Management project.