turnip_formatter 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/Rakefile +13 -1
- data/lib/rspec/core/formatters/turnip_formatter/for_rspec2.rb +8 -13
- data/lib/rspec/core/formatters/turnip_formatter/for_rspec3.rb +8 -13
- data/lib/rspec/core/formatters/turnip_formatter.rb +6 -21
- data/lib/turnip_formatter/ext/turnip/rspec.rb +19 -77
- data/lib/turnip_formatter/printer/runtime_error.rb +7 -9
- data/lib/turnip_formatter/printer.rb +4 -4
- data/lib/turnip_formatter/scenario/base.rb +1 -5
- data/lib/turnip_formatter/scenario/failure.rb +24 -14
- data/lib/turnip_formatter/scenario/pending.rb +22 -16
- data/lib/turnip_formatter/step.rb +12 -6
- data/lib/turnip_formatter/step_template/base.rb +5 -1
- data/lib/turnip_formatter/step_template/exception.rb +14 -29
- data/lib/turnip_formatter/step_template/exception.slim +10 -0
- data/lib/turnip_formatter/step_template/source.rb +13 -11
- data/lib/turnip_formatter/template/exception.slim +8 -0
- data/lib/turnip_formatter/template/index.slim +86 -0
- data/lib/turnip_formatter/template/runtime_exception.slim +13 -0
- data/lib/turnip_formatter/template/scenario.slim +15 -0
- data/lib/turnip_formatter/template/step.slim +6 -0
- data/lib/turnip_formatter/template/step_multiline.slim +1 -0
- data/lib/turnip_formatter/template/step_outline.slim +6 -0
- data/lib/turnip_formatter/template/tab_feature_statistics.slim +18 -0
- data/lib/turnip_formatter/template/tab_speed_statistics.slim +16 -0
- data/lib/turnip_formatter/template/tab_tag_statistics.slim +18 -0
- data/lib/turnip_formatter/template/turnip_formatter.css +1 -0
- data/lib/turnip_formatter/template.rb +20 -35
- data/lib/turnip_formatter/version.rb +1 -1
- data/spec/support/example_helper.rb +16 -17
- data/spec/support/step_helper.rb +1 -1
- data/spec/turnip_formatter/printer/tab_speed_statistics_spec.rb +1 -1
- data/spec/turnip_formatter/scenario/failure_spec.rb +28 -1
- data/spec/turnip_formatter/scenario/pending_spec.rb +24 -1
- data/spec/turnip_formatter/step_template/exception_spec.rb +2 -2
- data/spec/turnip_formatter/template_spec.rb +114 -2
- data/turnip_formatter.gemspec +4 -5
- metadata +42 -54
- data/lib/turnip_formatter/template/exception.haml +0 -8
- data/lib/turnip_formatter/template/index.haml +0 -88
- data/lib/turnip_formatter/template/runtime_exception.haml +0 -13
- data/lib/turnip_formatter/template/scenario.haml +0 -14
- data/lib/turnip_formatter/template/step.haml +0 -6
- data/lib/turnip_formatter/template/step_multiline.haml +0 -1
- data/lib/turnip_formatter/template/step_outline.haml +0 -6
- data/lib/turnip_formatter/template/tab_feature_statistics.haml +0 -18
- data/lib/turnip_formatter/template/tab_speed_statistics.haml +0 -16
- data/lib/turnip_formatter/template/tab_tag_statistics.haml +0 -18
@@ -0,0 +1,86 @@
|
|
1
|
+
doctype 5
|
2
|
+
html
|
3
|
+
head
|
4
|
+
meta charset=("UTF-8")
|
5
|
+
title= TurnipFormatter::Template.project_name + ' report'
|
6
|
+
|
7
|
+
== TurnipFormatter::Template.render_stylesheet_links
|
8
|
+
style== TurnipFormatter::Template.render_stylesheet_codes
|
9
|
+
|
10
|
+
script src="http://code.jquery.com/jquery-1.11.0.min.js"
|
11
|
+
script src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"
|
12
|
+
script src="http://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.17.0/jquery.tablesorter.min.js"
|
13
|
+
|
14
|
+
== TurnipFormatter::Template.render_javascript_links
|
15
|
+
script== TurnipFormatter::Template.render_javascript_codes
|
16
|
+
|
17
|
+
body
|
18
|
+
header#report
|
19
|
+
.container
|
20
|
+
.page-header
|
21
|
+
h1 = "#{TurnipFormatter::Template.project_name} Report"
|
22
|
+
|
23
|
+
section#status_display_switch
|
24
|
+
label for="passed_check"
|
25
|
+
input#passed_check type="checkbox"
|
26
|
+
| Passed
|
27
|
+
label for="failed_check"
|
28
|
+
input#failed_check type="checkbox" checked="checked"
|
29
|
+
| Failed
|
30
|
+
label for="pending_check"
|
31
|
+
input#pending_check type="checkbox"
|
32
|
+
| Pending
|
33
|
+
|
34
|
+
section.result
|
35
|
+
p = "#{scenarios.size} Scenario (#{failed_count} failed #{pending_count} pending)."
|
36
|
+
p = "Finished in #{total_time.to_s} sec"
|
37
|
+
|
38
|
+
#main.container role="main"
|
39
|
+
ul#statistics class="nav nav-tabs"
|
40
|
+
li.active
|
41
|
+
a data-toggle="tab" href="#steps-statistics"
|
42
|
+
| Steps
|
43
|
+
li
|
44
|
+
a data-toggle="tab" href="#speed-statistics"
|
45
|
+
| Speed Statistics
|
46
|
+
li
|
47
|
+
a data-toggle="tab" href="#feature-statistics"
|
48
|
+
| Feature Statistics
|
49
|
+
li
|
50
|
+
a data-toggle="tab" href="#tag-statistics"
|
51
|
+
| Tag Statistics
|
52
|
+
|
53
|
+
.tab-content
|
54
|
+
#steps-statistics class="tab-pane active"
|
55
|
+
.checkbox
|
56
|
+
label
|
57
|
+
input#scenario_display_check type="checkbox" checked="checked"
|
58
|
+
| Folding
|
59
|
+
#scenarios.panel-group
|
60
|
+
- scenarios.each do |s|
|
61
|
+
== ::TurnipFormatter::Printer::Scenario.print_out(s)
|
62
|
+
|
63
|
+
#feature-statistics.tab-pane
|
64
|
+
h4 The results for the feature:
|
65
|
+
== TurnipFormatter::Printer::TabFeatureStatistics.print_out(scenarios)
|
66
|
+
|
67
|
+
#tag-statistics.tab-pane
|
68
|
+
h4 The results for the tab:
|
69
|
+
== TurnipFormatter::Printer::TabTagStatistics.print_out(scenarios)
|
70
|
+
|
71
|
+
#speed-statistics.tab-pane
|
72
|
+
h4 Ranking of running time of each <strong>successfully</strong> scenario:
|
73
|
+
== TurnipFormatter::Printer::TabSpeedStatistics.print_out(scenarios)
|
74
|
+
|
75
|
+
footer
|
76
|
+
p
|
77
|
+
| Generated by
|
78
|
+
a href="https://rubygems.org/gems/turnip_formatter"
|
79
|
+
= "turnip_formatter #{TurnipFormatter::VERSION}"
|
80
|
+
p
|
81
|
+
| Powered by
|
82
|
+
a href="http://jquery.com/"
|
83
|
+
| jQuery 1.11.0
|
84
|
+
| and
|
85
|
+
a href="http://mottie.github.io/tablesorter/"
|
86
|
+
| tablesorter 2.17.0
|
@@ -0,0 +1,13 @@
|
|
1
|
+
section.exception
|
2
|
+
h1 TurnipFormatter RuntimeError
|
3
|
+
dl
|
4
|
+
== runtime_exception
|
5
|
+
|
6
|
+
dt Example Full Description
|
7
|
+
dd= example.metadata[:full_description]
|
8
|
+
|
9
|
+
== example_exception
|
10
|
+
|
11
|
+
- if example.pending
|
12
|
+
dt Example Pending description
|
13
|
+
dd= example.metadata[:description]
|
@@ -0,0 +1,15 @@
|
|
1
|
+
section class="scenario #{scenario.status}" id=scenario.id
|
2
|
+
div.scenario-title
|
3
|
+
span.permalink
|
4
|
+
a href="##{scenario.id}"
|
5
|
+
| ¶
|
6
|
+
span data-toggle="collapse" data-target="##{scenario.id}_body"
|
7
|
+
= "Scenario: #{scenario.name} Feature #{scenario.feature_info} at #{scenario.run_time} sec"
|
8
|
+
div class="panel-collapse collapse" id="#{scenario.id}_body"
|
9
|
+
div.panel-body
|
10
|
+
ul.tags
|
11
|
+
- scenario.tags.each do |tag|
|
12
|
+
li = "@#{tag}"
|
13
|
+
div.steps
|
14
|
+
- scenario.steps.each do |step|
|
15
|
+
== TurnipFormatter::Printer::Step.print_out(step)
|
@@ -0,0 +1 @@
|
|
1
|
+
pre.multiline= lines
|
@@ -0,0 +1,18 @@
|
|
1
|
+
table
|
2
|
+
thead
|
3
|
+
tr
|
4
|
+
th Feature
|
5
|
+
th Scenarios
|
6
|
+
th passed
|
7
|
+
th failed
|
8
|
+
th pending
|
9
|
+
th status
|
10
|
+
tbody
|
11
|
+
- analysis_results.each do |info|
|
12
|
+
tr
|
13
|
+
td= info.name
|
14
|
+
td= info.scenario_count
|
15
|
+
td= info.passed_count
|
16
|
+
td= info.failed_count
|
17
|
+
td= info.pending_count
|
18
|
+
td class=info.status = info.status
|
@@ -0,0 +1,18 @@
|
|
1
|
+
table
|
2
|
+
thead
|
3
|
+
tr
|
4
|
+
th Tag
|
5
|
+
th Scenarios
|
6
|
+
th passed
|
7
|
+
th failed
|
8
|
+
th pending
|
9
|
+
th status
|
10
|
+
tbody
|
11
|
+
- analysis_results.each do |info|
|
12
|
+
tr
|
13
|
+
td= info.name
|
14
|
+
td= info.scenario_count
|
15
|
+
td= info.passed_count
|
16
|
+
td= info.failed_count
|
17
|
+
td= info.pending_count
|
18
|
+
td class=info.status = info.status
|