hiptest-publisher 0.14.1 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hiptest-publisher/client.rb +1 -1
- data/lib/hiptest-publisher/nodes.rb +5 -5
- data/lib/hiptest-publisher/render_context_maker.rb +2 -0
- data/lib/hiptest-publisher/xml_parser.rb +4 -2
- data/lib/templates/csharp/_item_as_function.hbs +3 -1
- data/lib/templates/java/_item_as_function.hbs +3 -1
- data/lib/templates/javascript/_body.hbs +2 -2
- data/lib/templates/php/_body.hbs +3 -2
- data/lib/templates/python/_body.hbs +3 -2
- data/lib/templates/robotframework/actionword.hbs +3 -1
- data/lib/templates/ruby/_body.hbs +3 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fa206d7302d4eadb03e4e4c722a5e8730e80f08
|
4
|
+
data.tar.gz: ae681731d569f3508a731ff470c1af07b9dfa49c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf6bc619b3dad8e3d28e7ed9ced77a52a359994f314aaa9d2aee1988986f537d639214327f17797d3d306b0d0aab9a07380ef1a39c87689c76815693912ff12d
|
7
|
+
data.tar.gz: 4f69261a13db522e80b7881988a2c8b8d076340158e352756f3523aca0120d7cc6d5357059a3819dbfcc255d93b8db61cf83ce1036c49c856a4ef9fb19b8c64c
|
@@ -84,7 +84,7 @@ module Hiptest
|
|
84
84
|
lines = []
|
85
85
|
lines << ["ID", "Name"]
|
86
86
|
lines << ["--", "----"]
|
87
|
-
lines += test_runs.map { |tr| [tr["id"]
|
87
|
+
lines += test_runs.map { |tr| [tr["id"], tr["name"]] }
|
88
88
|
first_column_width = lines.map { |line| line[0].length }.max
|
89
89
|
lines.map! { |line| " #{line[0].ljust(first_column_width)} #{line[1]}" }
|
90
90
|
lines.join("\n")
|
@@ -259,11 +259,12 @@ module Hiptest
|
|
259
259
|
class Item < Node
|
260
260
|
attr_reader :variables, :non_valued_parameters, :valued_parameters
|
261
261
|
|
262
|
-
def initialize(name, tags = [], parameters = [], body = [])
|
262
|
+
def initialize(name, tags = [], description = '', parameters = [], body = [])
|
263
263
|
super()
|
264
264
|
@children = {
|
265
265
|
:name => name,
|
266
266
|
:tags => tags,
|
267
|
+
:description => description,
|
267
268
|
:parameters => parameters,
|
268
269
|
:body => body
|
269
270
|
}
|
@@ -279,8 +280,8 @@ module Hiptest
|
|
279
280
|
end
|
280
281
|
|
281
282
|
class Actionword < Item
|
282
|
-
def initialize(name, tags = [], parameters = [], body = [], uid = nil)
|
283
|
-
super(name, tags, parameters, body)
|
283
|
+
def initialize(name, tags = [], parameters = [], body = [], uid = nil, description = '')
|
284
|
+
super(name, tags, description, parameters, body)
|
284
285
|
@children[:uid] = uid
|
285
286
|
end
|
286
287
|
|
@@ -293,8 +294,7 @@ module Hiptest
|
|
293
294
|
attr_reader :folder_uid, :order_in_parent
|
294
295
|
|
295
296
|
def initialize(name, description = '', tags = [], parameters = [], body = [], folder_uid = nil, datatable = Datatable.new, order_in_parent = 0)
|
296
|
-
super(name, tags, parameters, body)
|
297
|
-
@children[:description] = description
|
297
|
+
super(name, tags, description, parameters, body)
|
298
298
|
@children[:datatable] = datatable
|
299
299
|
|
300
300
|
@folder_uid = folder_uid
|
@@ -2,6 +2,7 @@ module Hiptest
|
|
2
2
|
module RenderContextMaker
|
3
3
|
def walk_item(item)
|
4
4
|
{
|
5
|
+
:has_description? => !item.children[:description].nil? && !item.children[:description].empty?,
|
5
6
|
:has_parameters? => !item.children[:parameters].empty?,
|
6
7
|
:has_tags? => !item.children[:tags].empty?,
|
7
8
|
:has_step? => has_step?(item),
|
@@ -58,6 +59,7 @@ module Hiptest
|
|
58
59
|
|
59
60
|
def walk_test(test)
|
60
61
|
{
|
62
|
+
:has_description? => !test.children[:description].nil? && !test.children[:description].empty?,
|
61
63
|
:has_parameters? => false,
|
62
64
|
:has_tags? => !test.children[:tags].empty?,
|
63
65
|
:has_step? => has_step?(test),
|
@@ -195,7 +195,8 @@ module Hiptest
|
|
195
195
|
build_tags(actionword),
|
196
196
|
build_parameters(actionword),
|
197
197
|
build_steps(actionword),
|
198
|
-
css_first_content(actionword, '> uid')
|
198
|
+
css_first_content(actionword, '> uid'),
|
199
|
+
css_first_content(actionword, '> description'))
|
199
200
|
end
|
200
201
|
|
201
202
|
def build_actionwordSnapshot(actionword)
|
@@ -204,7 +205,8 @@ module Hiptest
|
|
204
205
|
build_tags(actionword),
|
205
206
|
build_parameters(actionword),
|
206
207
|
build_steps(actionword),
|
207
|
-
css_first_content(actionword, '> actionwordUid')
|
208
|
+
css_first_content(actionword, '> actionwordUid'),
|
209
|
+
css_first_content(actionword, '> description'))
|
208
210
|
end
|
209
211
|
|
210
212
|
def build_scenario(scenario)
|
@@ -1,6 +1,8 @@
|
|
1
1
|
public void {{{ camelize_upper rendered_children.name }}}({{#if has_parameters?}}{{{join rendered_children.parameters ', '}}}{{/if}}) {{#curly}}
|
2
2
|
{{#clear_empty_lines}}
|
3
|
-
{{#indent}}{{#if has_tags?}}
|
3
|
+
{{#indent}}{{#comment '//'}}{{#if has_tags?}}Tags: {{{ join rendered_children.tags ' '}}}
|
4
|
+
{{/if}}{{#if has_description?}}{{rendered_children.description}}
|
5
|
+
{{/if}}{{/comment}}{{/indent}}
|
4
6
|
{{> body}}
|
5
7
|
{{/clear_empty_lines}}
|
6
8
|
{{/curly}}
|
@@ -1,6 +1,8 @@
|
|
1
1
|
public void {{{ camelize_lower rendered_children.name }}}({{#if has_parameters?}}{{{join rendered_children.parameters ', '}}}{{/if}}) {{#curly}}
|
2
2
|
{{#clear_empty_lines}}
|
3
|
-
{{#indent}}{{#if has_tags?}}
|
3
|
+
{{#indent}}{{#comment '//'}}{{#if has_tags?}}Tags: {{{ join rendered_children.tags ' '}}}
|
4
|
+
{{/if}}{{#if has_description?}}{{rendered_children.description}}
|
5
|
+
{{/if}}{{/comment}}{{/indent}}
|
4
6
|
{{> body}}
|
5
7
|
{{/clear_empty_lines}}
|
6
8
|
{{/curly}}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{{#clear_empty_lines}}
|
2
2
|
{{#indent}}
|
3
|
-
{{#comment '//'}}{{{ rendered_children.description }}}
|
4
|
-
{{#if has_tags?}}
|
3
|
+
{{#comment '//'}}{{#if has_description?}}{{{ rendered_children.description }}}
|
4
|
+
{{/if}}{{#if has_tags?}}Tags: {{{ join rendered_children.tags ' '}}}{{/if}}{{/comment}}
|
5
5
|
{{#if declared_variables}}var {{#join declared_variables ', '}}{{{camelize_lower this}}}{{/join}};
|
6
6
|
{{/if}}{{#each rendered_children.body}}{{{this}}}
|
7
7
|
{{/each}}
|
data/lib/templates/php/_body.hbs
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
{{#clear_empty_lines}}
|
2
2
|
{{#indent}}
|
3
|
-
{{#comment '//'}}{{{ rendered_children.description }}}
|
4
|
-
{{#if has_tags?}}
|
3
|
+
{{#comment '//'}}{{#if has_description?}}{{{ rendered_children.description }}}
|
4
|
+
{{/if}}{{#if has_tags?}}Tags: {{{ join rendered_children.tags ' '}}}
|
5
|
+
{{/if}}{{/comment}}
|
5
6
|
{{#each rendered_children.body}}{{{this}}}
|
6
7
|
{{/each}}{{#if has_step?}}
|
7
8
|
throw new Exception('Not implemented');{{/if}}{{/indent}}
|
@@ -1,7 +1,8 @@
|
|
1
1
|
{{#clear_empty_lines}}
|
2
2
|
{{#indent}}
|
3
|
-
{{#comment '#'}}{{{ rendered_children.description }}}
|
4
|
-
{{#if has_tags?}}
|
3
|
+
{{#comment '#'}}{{#if has_description?}}{{{ rendered_children.description }}}
|
4
|
+
{{/if}}{{#if has_tags?}}Tags: {{{ join rendered_children.tags ' '}}}
|
5
|
+
{{/if}}{{/comment}}
|
5
6
|
{{#each rendered_children.body}}{{{this}}}
|
6
7
|
{{/each}}
|
7
8
|
{{#if has_step?}}raise NotImplementedError{{/if}}
|
@@ -1,7 +1,8 @@
|
|
1
1
|
{{#clear_empty_lines}}
|
2
2
|
{{#indent}}
|
3
|
-
{{#comment '#'}}{{{ rendered_children.description }}}
|
4
|
-
{{#if has_tags?}}
|
3
|
+
{{#comment '#'}}{{#if has_description?}}{{{ rendered_children.description }}}
|
4
|
+
{{/if}}{{#if has_tags?}}Tags: {{{ join rendered_children.tags ' '}}}
|
5
|
+
{{/if}}{{/comment}}
|
5
6
|
{{#each rendered_children.body}}{{{this}}}
|
6
7
|
{{/each}}
|
7
8
|
{{#if has_step?}}raise NotImplementedError{{/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: 0.
|
4
|
+
version: 0.15.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: 2016-06-
|
11
|
+
date: 2016-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -602,7 +602,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
602
602
|
version: '0'
|
603
603
|
requirements: []
|
604
604
|
rubyforge_project:
|
605
|
-
rubygems_version: 2.
|
605
|
+
rubygems_version: 2.4.8
|
606
606
|
signing_key:
|
607
607
|
specification_version: 4
|
608
608
|
summary: Export your tests from Hiptest into executable tests.
|