hiptest-publisher 0.20.0 → 0.20.1

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
  SHA1:
3
- metadata.gz: 8be16d9ad9975911593e440094b5493c38370870
4
- data.tar.gz: 233ff80ce6528326b565f8cbf799b0fbd7839507
3
+ metadata.gz: 557ac265f72b34acfdb249d8dc9b19b62e95ad94
4
+ data.tar.gz: 22832b872d9d72f0cd6614079dd41b308507cc46
5
5
  SHA512:
6
- metadata.gz: ca2d5fbc8cc85e4dafd7b19e0b8399a686aec32269d460b304037eea9d9868a9879526c2a97958177c335a3a5d58908488f415c204ffd69f42807178cc16b389
7
- data.tar.gz: b56d092ec517cc1e23a0e6df5c7af0d54fb1b42af551225621072a58a5e0cde7c2229bf224ccb2703f760de49c08d3100189ce42afa00ceb2d1f8a6457de1f9e
6
+ metadata.gz: e29f1545e47dcffaa22e963cbc61ff7206df9b6c4067aa7f3d572a4919c4509d865143d6cbe5012276ac5f1760722dc89878ced9e37bcfecf6792ebb839c1ad9
7
+ data.tar.gz: de62becd1694f97347c3cab7068000a881a24f41db810267c2df025657ddba475f4b4d3447429f289078b9333399f38cbb74639eb8b544bf621233a1d86fa605
@@ -1,5 +1,5 @@
1
1
  [_common]
2
- template_dirs = javascript/jasmine, javascript, common
2
+ template_dirs = javascript/mocha, javascript, common
3
3
 
4
4
  [tests]
5
5
  filename = 'project_test.js'
@@ -255,6 +255,10 @@ module Hiptest
255
255
  super()
256
256
  @children = {:key => key, :value => value}
257
257
  end
258
+
259
+ def to_s
260
+ "#{@children[:key]}#{@children[:value].nil? ? '' : ':' + @children[:value]}"
261
+ end
258
262
  end
259
263
 
260
264
  class Parameter < Node
@@ -301,6 +305,17 @@ module Hiptest
301
305
  p_names.include?(v_name) ? nil : v_name
302
306
  end.uniq.compact
303
307
  end
308
+
309
+ def add_tags(tags)
310
+ existing = @children[:tags].map(&:to_s)
311
+
312
+ tags.each do |tag|
313
+ next if existing.include? tag.to_s
314
+
315
+ existing << tag.to_s
316
+ @children[:tags] << tag
317
+ end
318
+ end
304
319
  end
305
320
 
306
321
  class Actionword < Item
@@ -225,6 +225,8 @@ module Hiptest
225
225
  scenario = build_scenario(scs)
226
226
  datasets = scenario.each_sub_nodes(Hiptest::Nodes::Dataset).to_a
227
227
 
228
+ scenario.add_tags(scs.css('testSnapshot').flat_map { |test| build_tags(test)}.compact)
229
+
228
230
  if datasets.empty?
229
231
  scenario.set_uid(css_first_content(scs, 'testSnapshot > uid'))
230
232
  else
@@ -2,9 +2,9 @@
2
2
  Documentation
3
3
  {{#comment '... '}}{{#clear_empty_lines}}
4
4
  {{{ rendered_children.description}}}
5
- {{#if has_tags?}}
6
- Tags: {{{ join rendered_children.tags ' '}}}
7
- {{/if}}{{/clear_empty_lines}}{{/comment}}
5
+ {{/clear_empty_lines}}{{/comment}}{{#if has_tags?}}
6
+ Default Tags {{{ join rendered_children.tags ' '}}}
7
+ {{/if}}
8
8
  Resource keywords.txt
9
9
  {{#unless is_empty?}}
10
10
  Test Setup{{tab}}Run Keywords{{tab}}{{join rendered_children.body "\n... AND \t"}}
@@ -6,17 +6,19 @@ Resource keywords.txt
6
6
  {{#if this.datatable}}{{this.name}}{{#indent}}
7
7
  [Template]{{tab}}{{this.name}} keyword
8
8
  {{this.datatable}}{{/indent}}
9
- {{else}}{{normalize_with_spaces this.name}}{{#if rendered_children.uid}} (uid:{{normalize rendered_children.uid}}){{/if}}{{#indent}}
10
- {{join this.body '\n'}}{{/indent}}
9
+ {{else}}{{normalize_with_spaces this.name}}{{#if this.uid}} (uid:{{normalize this.uid}}){{/if}}{{#indent}}{{#if this.tags}}
10
+ [Tags] {{{ join this.tags ' '}}}
11
+ {{/if}}{{join this.body '\n'}}{{/indent}}
11
12
  {{/if}}{{/each}}
12
13
  *** Keywords ***
13
14
 
14
15
  {{#each rendered_children.splitted_scenarios}}{{#if this.datatable}}{{normalize_with_spaces this.name}} keyword{{#indent}}
15
16
  [Arguments]{{tab}}${{#curly}}__test_name{{/curly}}{{tab}}{{join this.parameters '\t'}}
16
- {{join this.body '\n'}}{{/indent}}
17
+ {{#if this.tags}}[Tags] {{{ join this.tags ' '}}}
18
+ {{/if}}{{join this.body '\n'}}{{/indent}}
17
19
 
18
20
  {{/if}}{{/each}}{{else}}
19
21
  {{#each rendered_children.splitted_scenarios}}
20
- {{normalize_with_spaces this.name}}{{#if rendered_children.uid}} (uid:{{normalize rendered_children.uid}}){{/if}}{{#indent}}
22
+ {{normalize_with_spaces this.name}}{{#if this.uid}} (uid:{{normalize this.uid}}){{/if}}{{#indent}}
21
23
  {{join this.body '\n'}}{{/indent}}
22
24
  {{/each}}{{/if}}
@@ -2,9 +2,8 @@
2
2
  Documentation
3
3
  {{#comment '... '}}{{#clear_empty_lines}}
4
4
  {{{ rendered_children.description}}}
5
- {{#if has_tags?}}
6
- Tags: {{{ join rendered_children.tags ' '}}}
7
- {{/if}}{{/clear_empty_lines}}{{/comment}}
5
+ {{/clear_empty_lines}}{{/comment}}{{#if has_tags?}}
6
+ Default Tags {{{ join rendered_children.tags ' '}}}{{/if}}
8
7
 
9
8
  Resource keywords.txt
10
9
 
@@ -2,9 +2,8 @@
2
2
  Documentation
3
3
  {{#comment '... '}}{{#clear_empty_lines}}
4
4
  {{{ rendered_children.description}}}
5
- {{#if has_tags?}}
6
- Tags: {{{ join rendered_children.tags ' '}}}
7
- {{/if}}{{/clear_empty_lines}}{{/comment}}
5
+ {{/clear_empty_lines}}{{/comment}}{{#if has_tags?}}
6
+ Default Tags {{{ join rendered_children.tags ' '}}}{{/if}}
8
7
 
9
8
  Resource keywords.txt
10
9
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiptest-publisher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.0
4
+ version: 0.20.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiptest R&D