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 +4 -4
- data/lib/config/javascript-protractor.conf +1 -1
- data/lib/hiptest-publisher/nodes.rb +15 -0
- data/lib/hiptest-publisher/xml_parser.rb +2 -0
- data/lib/templates/robotframework/folder.hbs +3 -3
- data/lib/templates/robotframework/scenarios.hbs +6 -4
- data/lib/templates/robotframework/single_scenario.hbs +2 -3
- data/lib/templates/robotframework/single_test.hbs +2 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 557ac265f72b34acfdb249d8dc9b19b62e95ad94
|
4
|
+
data.tar.gz: 22832b872d9d72f0cd6614079dd41b308507cc46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e29f1545e47dcffaa22e963cbc61ff7206df9b6c4067aa7f3d572a4919c4509d865143d6cbe5012276ac5f1760722dc89878ced9e37bcfecf6792ebb839c1ad9
|
7
|
+
data.tar.gz: de62becd1694f97347c3cab7068000a881a24f41db810267c2df025657ddba475f4b4d3447429f289078b9333399f38cbb74639eb8b544bf621233a1d86fa605
|
@@ -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
|
7
|
-
{{/if}}
|
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
|
10
|
-
{{join this.
|
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.
|
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
|
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
|
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
|
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
|
|