hiptest-publisher 2.4.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +310 -0
- data/LICENSE +1 -2
- data/README.md +26 -21
- data/bin/hiptest-publisher +11 -7
- data/config/locales/en.yml +14 -13
- data/lib/config/cucumber-typescript.conf +41 -41
- data/lib/config/cucumber_legacy-groovy.conf +40 -0
- data/lib/config/cucumber_legacy-java.conf +24 -0
- data/lib/config/{cucumber_expressions-typescript.conf → cucumber_legacy-typescript.conf} +41 -41
- data/lib/hiptest-publisher/formatters/console_formatter.rb +1 -0
- data/lib/hiptest-publisher/handlebars_helper.rb +1 -1
- data/lib/hiptest-publisher/options_parser.rb +22 -5
- data/lib/hiptest-publisher/renderer.rb +5 -1
- data/lib/templates/cucumber/groovy/step-definitions/actionword.hbs +1 -1
- data/lib/templates/cucumber/groovy/step-definitions/actionwords.hbs +3 -2
- data/lib/templates/cucumber/groovy/step-definitions/library.hbs +3 -2
- data/lib/templates/cucumber/groovy/step-definitions/libraryactionword.hbs +1 -1
- data/lib/templates/cucumber/java/actionword.hbs +1 -1
- data/lib/templates/cucumber/java/actionwords.hbs +2 -2
- data/lib/templates/cucumber/typescript/actionword.hbs +1 -1
- data/lib/templates/cucumber/typescript/libraryactionword.hbs +1 -1
- data/lib/templates/cucumber_legacy/groovy/step-definitions/actionword.hbs +5 -0
- data/lib/templates/cucumber_legacy/groovy/step-definitions/actionwords.hbs +10 -0
- data/lib/templates/cucumber_legacy/groovy/step-definitions/library.hbs +10 -0
- data/lib/templates/cucumber_legacy/groovy/step-definitions/libraryactionword.hbs +5 -0
- data/lib/templates/cucumber_legacy/java/actionword.hbs +6 -0
- data/lib/templates/cucumber_legacy/java/actionwords.hbs +12 -0
- data/lib/templates/cucumber_legacy/typescript/actionword.hbs +5 -0
- data/lib/templates/{cucumber_expressions → cucumber_legacy}/typescript/libraryactionword.hbs +1 -1
- data/lib/templates/gherkin/scenarios.hbs +1 -1
- metadata +38 -14
- data/lib/templates/cucumber_expressions/typescript/actionword.hbs +0 -5
@@ -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
|
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]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
{{#if rendered_children.gherkin_annotation }}{{{ rendered_children.gherkin_annotation }}}(
|
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.
|
3
|
+
import io.cucumber.datatable.DataTable
|
4
|
+
import io.cucumber.groovy.EN
|
4
5
|
|
5
|
-
this.metaClass.mixin(
|
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.
|
3
|
+
import io.cucumber.datatable.DataTable
|
4
|
+
import io.cucumber.groovy.EN
|
4
5
|
|
5
|
-
this.metaClass.mixin(
|
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 }}}(
|
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}}{{>
|
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.
|
4
|
-
import cucumber.
|
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 }}}(
|
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 }}}(
|
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}}
|
data/lib/templates/{cucumber_expressions → cucumber_legacy}/typescript/libraryactionword.hbs
RENAMED
@@ -1,5 +1,5 @@
|
|
1
1
|
{{#if rendered_children.gherkin_annotation}}
|
2
|
-
{{{ 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
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}}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hiptest-publisher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
autorequire:
|
7
|
+
- CucumberStudio R&D
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -236,16 +236,32 @@ dependencies:
|
|
236
236
|
- - "~>"
|
237
237
|
- !ruby/object:Gem::Version
|
238
238
|
version: 0.1.1
|
239
|
+
- !ruby/object:Gem::Dependency
|
240
|
+
name: actionview
|
241
|
+
requirement: !ruby/object:Gem::Requirement
|
242
|
+
requirements:
|
243
|
+
- - "~>"
|
244
|
+
- !ruby/object:Gem::Version
|
245
|
+
version: '5.2'
|
246
|
+
type: :development
|
247
|
+
prerelease: false
|
248
|
+
version_requirements: !ruby/object:Gem::Requirement
|
249
|
+
requirements:
|
250
|
+
- - "~>"
|
251
|
+
- !ruby/object:Gem::Version
|
252
|
+
version: '5.2'
|
239
253
|
description: Provides a command-line tool that generates Java, Python or Ruby code
|
240
254
|
to run the tests.
|
241
|
-
email:
|
255
|
+
email: studio@cucumber.io
|
242
256
|
executables:
|
243
257
|
- hiptest-publisher
|
244
258
|
extensions: []
|
245
259
|
extra_rdoc_files:
|
260
|
+
- CHANGELOG.md
|
246
261
|
- LICENSE
|
247
262
|
- README.md
|
248
263
|
files:
|
264
|
+
- CHANGELOG.md
|
249
265
|
- LICENSE
|
250
266
|
- README.md
|
251
267
|
- bin/hiptest-publisher
|
@@ -259,7 +275,9 @@ files:
|
|
259
275
|
- lib/config/cucumber-javascript.conf
|
260
276
|
- lib/config/cucumber-ruby.conf
|
261
277
|
- lib/config/cucumber-typescript.conf
|
262
|
-
- lib/config/
|
278
|
+
- lib/config/cucumber_legacy-groovy.conf
|
279
|
+
- lib/config/cucumber_legacy-java.conf
|
280
|
+
- lib/config/cucumber_legacy-typescript.conf
|
263
281
|
- lib/config/groovy-spock.conf
|
264
282
|
- lib/config/java-espresso.conf
|
265
283
|
- lib/config/java-junit.conf
|
@@ -393,8 +411,14 @@ files:
|
|
393
411
|
- lib/templates/cucumber/typescript/actionwords.hbs
|
394
412
|
- lib/templates/cucumber/typescript/library.hbs
|
395
413
|
- lib/templates/cucumber/typescript/libraryactionword.hbs
|
396
|
-
- lib/templates/
|
397
|
-
- lib/templates/
|
414
|
+
- lib/templates/cucumber_legacy/groovy/step-definitions/actionword.hbs
|
415
|
+
- lib/templates/cucumber_legacy/groovy/step-definitions/actionwords.hbs
|
416
|
+
- lib/templates/cucumber_legacy/groovy/step-definitions/library.hbs
|
417
|
+
- lib/templates/cucumber_legacy/groovy/step-definitions/libraryactionword.hbs
|
418
|
+
- lib/templates/cucumber_legacy/java/actionword.hbs
|
419
|
+
- lib/templates/cucumber_legacy/java/actionwords.hbs
|
420
|
+
- lib/templates/cucumber_legacy/typescript/actionword.hbs
|
421
|
+
- lib/templates/cucumber_legacy/typescript/libraryactionword.hbs
|
398
422
|
- lib/templates/gherkin/_call.hbs
|
399
423
|
- lib/templates/gherkin/_gherkin_text.hbs
|
400
424
|
- lib/templates/gherkin/_scenario.hbs
|
@@ -733,11 +757,11 @@ files:
|
|
733
757
|
- lib/templates/typescript/library.hbs
|
734
758
|
- lib/templates/typescript/libraryactionword.hbs
|
735
759
|
- lib/templates/typescript/parameter.hbs
|
736
|
-
homepage: https://
|
760
|
+
homepage: https://cucumber.io
|
737
761
|
licenses:
|
738
|
-
-
|
762
|
+
- MIT
|
739
763
|
metadata: {}
|
740
|
-
post_install_message:
|
764
|
+
post_install_message:
|
741
765
|
rdoc_options: []
|
742
766
|
require_paths:
|
743
767
|
- lib
|
@@ -752,9 +776,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
752
776
|
- !ruby/object:Gem::Version
|
753
777
|
version: '0'
|
754
778
|
requirements: []
|
755
|
-
rubyforge_project:
|
779
|
+
rubyforge_project:
|
756
780
|
rubygems_version: 2.7.6.2
|
757
|
-
signing_key:
|
781
|
+
signing_key:
|
758
782
|
specification_version: 4
|
759
|
-
summary: Export your tests from
|
783
|
+
summary: Export your tests from CucumberStudio into executable tests.
|
760
784
|
test_files: []
|
@@ -1,5 +0,0 @@
|
|
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}}
|
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}}
|