hiptest-publisher 1.25.0 → 1.26.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b32532cf24c1b4eb89a73d461326d4bb8b4479537006fa992791e80c0b44670
4
- data.tar.gz: d8b5967b9aae9c867d5f1f04612e5ca9d90d4993408acbcec5b5cda54da20412
3
+ metadata.gz: 4255f1bc2da9ddc98113a1cdc7e1527bfb27376a7992db39090e5e1c44dead73
4
+ data.tar.gz: f50a772f45a9d434aafd73170d65c42e4ef30e17416fb27047c58d993d225f70
5
5
  SHA512:
6
- metadata.gz: a5ecc59f31485f0eff1125bad4d50d015a1fd3f208264d886337108c8cd1f67c753d6dbc6886b2bd9404c31f41414b3860b42f3831114ab22b3559eb61f8ace2
7
- data.tar.gz: ebefba4c226511ad9dcfa0486881ee753c8cbb2060df3ac1196e91c6db3e7331d413a41274542b5374392d168638657d8b99f20601cb2c5ad44b85067e404aa9
6
+ metadata.gz: 0434b1fbd9c0802eb0fecc4bece04e03ee7854cde0ef52ea540029185910e5b5d99be86456241be7acf6c0d988d3a14bc5ce1933f72f3509ed72196de23bfa43
7
+ data.tar.gz: c2512bbf421eb7a1b206749fd3f9c5ae602a7dc403962dc90764636c0cb9bd0752ed671d62fa2fb9207e2aeafbb6db04120f69e30e0d45ed50c832960d37c5e2
@@ -17,7 +17,25 @@ naming_convention = 'camelize_lower'
17
17
  call_prefix = 'actionwords'
18
18
  renderer_addons = 'GherkinAddon'
19
19
 
20
+ [step_definitions_library]
21
+ node_name = libraries
22
+ template_dirs = cucumber/typescript, javascript, common
23
+ named_filename = 'steps_%s.ts'
24
+ naming_convention = 'camelize_lower'
25
+ call_prefix = 'actionwords'
26
+ renderer_addons = 'GherkinAddon'
27
+
20
28
  [actionwords]
21
29
  template_dirs = typescript, javascript, common
22
30
  filename = 'actionwords.ts'
23
31
  naming_convention = 'camelize_lower'
32
+
33
+
34
+ [library]
35
+ template_dirs = typescript, javascript, common
36
+ filename = 'actionword_library.ts'
37
+
38
+ [libraries]
39
+ template_dirs = typescript, javascript, common
40
+ named_filename = '%s_library.ts'
41
+ filename_convention = 'underscore'
@@ -0,0 +1,12 @@
1
+ import { After, Before, Given, When, Then, TableDefinition } from "cucumber";
2
+ import { ActionwordLibrary } from "./actionword_library";
3
+
4
+ let libraryActionWord : ActionwordLibrary
5
+ Before(async () => {
6
+ libraryActionWord = new ActionwordLibrary();
7
+ });
8
+
9
+ {{> after_hook}}
10
+
11
+ {{#each rendered_children.library_actionwords}}{{{this}}}
12
+ {{/each}}
@@ -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
+ libraryActionWord.getDefaultLibrary().{{{camelize_lower rendered_children.name}}}({{#if has_parameters?}}{{#join raw_parameter_names ', '}}{{{underscore this}}}{{/join}}{{/if}});
4
+ {{/indent}}
5
+ {{/curly}});{{/if}}
@@ -1,2 +1,2 @@
1
1
  {{#if has_annotation? }}{{#comment '//'}}{{{ rendered_children.gherkin_text }}}{{/comment}}
2
- {{/if}}this.{{#if context.call_prefix}}{{{ context.call_prefix }}}.{{/if}}{{{ camelize_lower rendered_children.actionword }}}({{{ join rendered_children.all_arguments ', '}}});
2
+ {{/if}}this.{{#if context.call_prefix}}{{{ context.call_prefix }}}.{{/if}}{{#if is_shared?}}get{{{camelize rendered_children.library_name}}}Library().{{/if}}{{{ camelize_lower rendered_children.actionword }}}({{{ join rendered_children.all_arguments ', '}}});
@@ -1,6 +1,7 @@
1
1
  import { TableDefinition } from "cucumber";
2
+ {{#if uses_library?}}import { ActionwordLibrary } from "./actionword_library";{{/if}}
2
3
 
3
- export class ActionWords {{#curly}}{{#indent}}
4
+ export class ActionWords{{#if uses_library?}} extends ActionwordLibrary{{/if}} {{#curly}}{{#indent}}
4
5
  {{#each rendered_children.actionwords}}{{{this}}}
5
6
  {{/each}}{{/indent}}
6
7
  {{/curly}}
@@ -0,0 +1,9 @@
1
+ {{#each library_names}}import { {{camelize this}}Library } from "./{{downcase this}}_library"
2
+ {{/each}}
3
+
4
+ export class ActionwordLibrary {{#curly}}{{#indent}}{{#each library_names}}
5
+ get{{camelize this}}Library() {{#curly}}{{#indent}}
6
+ return new {{camelize this}}Library(){{/indent}}
7
+ {{/curly}}
8
+ {{/each}}{{/indent}}
9
+ {{/curly}}
@@ -0,0 +1,18 @@
1
+ import { assert } from "chai";
2
+ import { TableDefinition } from "cucumber";
3
+
4
+ export class {{capitalize rendered_children.name}}Library {{#curly}}
5
+ {{#indent}}private static instance: {{capitalize rendered_children.name}}Library;
6
+
7
+ static getInstance() {{#curly}}
8
+ {{#indent}}if (!{{capitalize rendered_children.name}}Library.instance){{#curly}}
9
+ {{#indent}}{{capitalize rendered_children.name}}Library.instance = new {{capitalize rendered_children.name}}Library();{{/indent}}
10
+ {{/curly}}
11
+ {{/indent}}
12
+ {{#indent}}return {{capitalize rendered_children.name}}Library.instance;{{/indent}}
13
+ {{/curly}}
14
+
15
+ {{#each rendered_children.library_actionwords}}{{{this}}}
16
+ {{/each}}
17
+ {{/indent}}
18
+ {{/curly}}
@@ -0,0 +1 @@
1
+ {{> item_as_function}}
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: 1.25.0
4
+ version: 1.26.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - HipTest R&D
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-31 00:00:00.000000000 Z
11
+ date: 2019-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -392,6 +392,8 @@ files:
392
392
  - lib/templates/cucumber/typescript/_before_hook.hbs
393
393
  - lib/templates/cucumber/typescript/actionword.hbs
394
394
  - lib/templates/cucumber/typescript/actionwords.hbs
395
+ - lib/templates/cucumber/typescript/library.hbs
396
+ - lib/templates/cucumber/typescript/libraryactionword.hbs
395
397
  - lib/templates/gherkin/_call.hbs
396
398
  - lib/templates/gherkin/_gherkin_text.hbs
397
399
  - lib/templates/gherkin/_scenario.hbs
@@ -692,6 +694,9 @@ files:
692
694
  - lib/templates/typescript/_item_as_function.hbs
693
695
  - lib/templates/typescript/actionword.hbs
694
696
  - lib/templates/typescript/actionwords.hbs
697
+ - lib/templates/typescript/libraries.hbs
698
+ - lib/templates/typescript/library.hbs
699
+ - lib/templates/typescript/libraryactionword.hbs
695
700
  - lib/templates/typescript/parameter.hbs
696
701
  homepage: https://hiptest.com
697
702
  licenses: