pretty_face 0.5 → 0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog +6 -0
- data/Guardfile +2 -0
- data/features/feature_pages.feature +1 -2
- data/features/support/_feature_header.erb +1 -1
- data/features/support/_suite_header.erb +1 -1
- data/lib/pretty_face/formatter/html.rb +3 -3
- data/lib/pretty_face/formatter/report.rb +8 -2
- data/lib/pretty_face/formatter/view_helper.rb +1 -1
- data/lib/pretty_face/templates/face.png +0 -0
- data/lib/pretty_face/templates/failed.png +0 -0
- data/lib/pretty_face/templates/feature.erb +99 -81
- data/lib/pretty_face/templates/main.erb +45 -38
- data/lib/pretty_face/templates/passed.png +0 -0
- data/lib/pretty_face/templates/pending.png +0 -0
- data/lib/pretty_face/templates/skipped.png +0 -0
- data/lib/pretty_face/templates/style.css +104 -33
- data/lib/pretty_face/templates/table_failed.png +0 -0
- data/lib/pretty_face/templates/table_passed.png +0 -0
- data/lib/pretty_face/templates/table_pending.png +0 -0
- data/lib/pretty_face/templates/table_skipped.png +0 -0
- data/lib/pretty_face/templates/table_undefined.png +0 -0
- data/lib/pretty_face/templates/undefined.png +0 -0
- data/lib/pretty_face/version.rb +1 -1
- data/spec/lib/html_formatter_spec.rb +10 -10
- metadata +8 -12
- data/features/support/logo.png +0 -0
- data/features/support/pretty_face/blah.txt +0 -0
- data/lib/pretty_face/templates/face.jpg +0 -0
- data/lib/pretty_face/templates/failed.jpg +0 -0
- data/lib/pretty_face/templates/passed.jpg +0 -0
- data/lib/pretty_face/templates/pending.jpg +0 -0
- data/lib/pretty_face/templates/skipped.jpg +0 -0
- data/lib/pretty_face/templates/undefined.jpg +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65c0ae4589d4431415cba0493781ec0b444687c2
|
4
|
+
data.tar.gz: 6e4f60014069b44a7830ffdd5acbba3f74589c66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6a406bd17b5019deb91f2ce8c99ac65babfef5b38e856eb05455c7fe73d54e42f1224ba3ef75a00f9335cdeb67fd972221cda2d3691ee6957db0a293076e324
|
7
|
+
data.tar.gz: 280a0362de86cdcdcbc1a7509cced63c74a45aefb96f6fe79e56fd6d75b249882f0cca5f6d707ba7929452e3ef189bc00db671ccfd63f92f22b14c0f3f46f716
|
data/ChangeLog
CHANGED
data/Guardfile
CHANGED
@@ -13,5 +13,7 @@ guard 'cucumber', :notification => true, :all_after_pass => false, :cli => '--pr
|
|
13
13
|
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
|
14
14
|
watch(%r{^lib/.+\.rb$}) { "features" }
|
15
15
|
watch(%r{^lib/.+\.erb$}) { "features" }
|
16
|
+
watch(%r{^lib/.+\.css$}) { "features" }
|
17
|
+
|
16
18
|
end
|
17
19
|
|
@@ -24,7 +24,7 @@ Feature: pages that show details for features
|
|
24
24
|
|
25
25
|
Scenario: Generating some basic stats from the erb
|
26
26
|
Then the file "results/basic.html" should contain "<th>Executed<"
|
27
|
-
And the file "results/basic.html" should contain "<th>Average
|
27
|
+
And the file "results/basic.html" should contain "<th>Average Duration"
|
28
28
|
And the file "results/basic.html" should contain "Scenarios"
|
29
29
|
And the file "results/basic.html" should contain "Steps"
|
30
30
|
|
@@ -72,7 +72,6 @@ Feature: pages that show details for features
|
|
72
72
|
And the file "results/advanced.html" should contain "RSpec::Expectations::ExpectationNotMetError"
|
73
73
|
And the file "results/failing_background.html" should contain "RSpec::Expectations::ExpectationNotMetError"
|
74
74
|
|
75
|
-
@focus
|
76
75
|
Scenario: It should display error message with a yellow background and red text
|
77
76
|
Then the file "results/basic.html" should contain "RSpec::Expectations::ExpectationNotMetError"
|
78
77
|
And the background of the error message row should be "255, 251, 211"
|
@@ -1,2 +1,2 @@
|
|
1
1
|
<h1>The Code Monkeys</h1>
|
2
|
-
<h2>
|
2
|
+
<h2>Feature Results:</h2>
|
@@ -1,2 +1,2 @@
|
|
1
1
|
<h1>The Code Monkeys</h1>
|
2
|
-
<h2>
|
2
|
+
<h2>Feature Results:</h2>
|
@@ -26,7 +26,7 @@ module PrettyFace
|
|
26
26
|
@options = options
|
27
27
|
@report = Report.new
|
28
28
|
@img_id = 0
|
29
|
-
@logo = 'face.
|
29
|
+
@logo = 'face.png'
|
30
30
|
end
|
31
31
|
|
32
32
|
def embed(src, mime_type, label)
|
@@ -185,10 +185,10 @@ module PrettyFace
|
|
185
185
|
end
|
186
186
|
|
187
187
|
def copy_images
|
188
|
-
copy_directory 'images', %w(failed passed pending undefined skipped), "png"
|
188
|
+
copy_directory 'images', %w(failed passed pending undefined skipped table_failed table_passed table_pending table_undefined table_skipped), "png"
|
189
189
|
logo = logo_file
|
190
190
|
copy_file logo, "#{File.join(File.dirname(@path), 'images')}" if logo
|
191
|
-
copy_directory 'images', ['face'], '
|
191
|
+
copy_directory 'images', ['face'], 'png' unless logo
|
192
192
|
end
|
193
193
|
|
194
194
|
def copy_stylesheets
|
@@ -4,7 +4,7 @@ module PrettyFace
|
|
4
4
|
module Formatting
|
5
5
|
def summary_percent(number, total)
|
6
6
|
percent = (number.to_f / total) * 100
|
7
|
-
"#{number} (#{'%.1f' % percent}%)"
|
7
|
+
"#{number} <span class=\"percentage\">(#{'%.1f' % percent}%)</span>"
|
8
8
|
end
|
9
9
|
|
10
10
|
def formatted_duration(duration)
|
@@ -14,7 +14,13 @@ module PrettyFace
|
|
14
14
|
|
15
15
|
def image_tag_for(status, source=nil)
|
16
16
|
dir = "#{directory_prefix_for(source)}images"
|
17
|
-
"<img src=\"#{dir}/#{status}.png\" alt=\"#{status}\" title=\"#{status}\"
|
17
|
+
"<img src=\"#{dir}/#{status}.png\" alt=\"#{status}\" title=\"#{status}\">"
|
18
|
+
end
|
19
|
+
|
20
|
+
def table_image_for(status, source=nil)
|
21
|
+
dir = "#{directory_prefix_for(source)}images"
|
22
|
+
"<img src=\"#{dir}/table_#{status}.png\" alt=\"#{status}\" title=\"#{status}\">"
|
23
|
+
|
18
24
|
end
|
19
25
|
|
20
26
|
def directory_prefix_for(source=nil)
|
Binary file
|
Binary file
|
@@ -7,105 +7,123 @@
|
|
7
7
|
</head>
|
8
8
|
|
9
9
|
<body>
|
10
|
-
|
11
|
-
<div style="
|
12
|
-
<
|
13
|
-
</div>
|
14
|
-
<div style="float: left;">
|
15
|
-
<a href="<%= feature.parent_filename %>">Back</a>
|
16
|
-
<% if customize %>
|
17
|
-
<%= render "feature_header" %>
|
18
|
-
<% else %>
|
19
|
-
<%= render "page_header", :feature => feature %>
|
20
|
-
<% end %>
|
21
|
-
<span>Feature started: <%= feature.start_time.strftime("%a %B %-d, %Y at %H:%M:%S") %></span>
|
22
|
-
<br />
|
23
|
-
<span>Duration: <%= feature.formatted_duration(feature.duration) %></span>
|
24
|
-
<% if feature.description? %>
|
25
|
-
<pre class="description"><%= feature.description %></pre>
|
26
|
-
<% end %>
|
10
|
+
|
11
|
+
<div style="clear: both; width=100%; background-color:#F6F6F6;">
|
12
|
+
<a href="<%= feature.parent_filename %>" style="color=#0071BC;">< Back</a>
|
27
13
|
</div>
|
28
14
|
|
29
|
-
|
30
|
-
<
|
15
|
+
<div style="float:left; clear:both;">
|
16
|
+
<div class="header_logo">
|
17
|
+
<img src="<%= feature.directory_prefix_for(feature.file) %>images/<%= logo %>" width="200" />
|
18
|
+
</div>
|
19
|
+
<div class="header_description" >
|
20
|
+
<% if customize %>
|
21
|
+
<%= render "feature_header" %>
|
22
|
+
<% else %>
|
23
|
+
<%= render "page_header", :feature => feature %>
|
24
|
+
<% end %>
|
31
25
|
|
32
|
-
|
33
|
-
|
34
|
-
|
26
|
+
<table class="run_stats">
|
27
|
+
<tr>
|
28
|
+
<td>started:</td>
|
29
|
+
<td>duration:</td>
|
30
|
+
</tr>
|
31
|
+
<tr>
|
32
|
+
<td><%= feature.start_time.strftime("%A %B %-d, %Y at %H:%M:%S") %></td>
|
33
|
+
<td><%= feature.formatted_duration(feature.duration) %></td>
|
34
|
+
</tr>
|
35
|
+
</table>
|
36
|
+
<% if feature.description? %>
|
37
|
+
<pre class="description run_stats">Story<br/><%= feature.description %></pre>
|
38
|
+
<% end %>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<div class="summary_body">
|
43
|
+
<table class="StatTable">
|
44
|
+
<tr>
|
45
|
+
<th>Summary</th>
|
35
46
|
<th>Executed</th>
|
36
|
-
<th
|
37
|
-
<th
|
38
|
-
<th
|
39
|
-
<th
|
40
|
-
<th
|
41
|
-
<th>Average
|
47
|
+
<th class="passed"><%= raw(feature.table_image_for('passed', feature.file)) %> Passed</th>
|
48
|
+
<th class="failed"><%= raw(feature.table_image_for('failed', feature.file)) %> Failed</th>
|
49
|
+
<th class="skipped"><%= raw(feature.table_image_for('skipped', feature.file)) %> Skipped</th>
|
50
|
+
<th class="undefined"><%= raw(feature.table_image_for('undefined', feature.file)) %> Undefined</th>
|
51
|
+
<th class="pending" ><%= raw(feature.table_image_for('pending', feature.file)) %> Pending</th>
|
52
|
+
<th>Average Duration</th>
|
42
53
|
</tr>
|
43
|
-
|
44
|
-
|
54
|
+
|
55
|
+
<tr class="summary_row_header">
|
56
|
+
<td>Scenarios</td>
|
45
57
|
<td><%= feature.scenarios.length %></td>
|
46
|
-
<td
|
47
|
-
<td><%= feature.scenario_summary_for :failed %></td>
|
48
|
-
<td><%= feature.scenario_summary_for :skipped %></td>
|
49
|
-
<td><%= feature.scenario_summary_for :undefined %></td>
|
50
|
-
<td><%= feature.scenario_summary_for :pending %></td>
|
58
|
+
<td><%= raw(feature.scenario_summary_for :passed) %></td>
|
59
|
+
<td><%= raw(feature.scenario_summary_for :failed) %></td>
|
60
|
+
<td><%= raw(feature.scenario_summary_for :skipped) %></td>
|
61
|
+
<td><%= raw(feature.scenario_summary_for :undefined) %></td>
|
62
|
+
<td><%= raw(feature.scenario_summary_for :pending) %></td>
|
51
63
|
<td><%= feature.scenario_average_duration %></td>
|
52
64
|
</tr>
|
53
|
-
<tr>
|
54
|
-
<td
|
65
|
+
<tr class="summary_row_header">
|
66
|
+
<td>Steps</td>
|
55
67
|
<td><%= feature.steps.length %></td>
|
56
|
-
<td><%= feature.step_summary_for :passed %></td>
|
57
|
-
<td><%= feature.step_summary_for :failed %></td>
|
58
|
-
<td><%= feature.step_summary_for :skipped %></td>
|
59
|
-
<td><%= feature.step_summary_for :undefined %></td>
|
60
|
-
<td><%= feature.step_summary_for :pending %></td>
|
68
|
+
<td><%= raw(feature.step_summary_for :passed) %></td>
|
69
|
+
<td><%= raw(feature.step_summary_for :failed) %></td>
|
70
|
+
<td><%= raw(feature.step_summary_for :skipped) %></td>
|
71
|
+
<td><%= raw(feature.step_summary_for :undefined) %></td>
|
72
|
+
<td><%= raw(feature.step_summary_for :pending) %></td>
|
61
73
|
<td><%= feature.step_average_duration %></td>
|
62
74
|
</tr>
|
63
|
-
</table>
|
64
|
-
</div>
|
65
75
|
|
66
|
-
|
67
|
-
<% if feature.has_background? %>
|
68
|
-
<br />
|
69
|
-
<h2 class="failures">Background: <%= feature.background_title.name %></h2>
|
70
|
-
<% end %>
|
71
|
-
<table cellspacing="0" cellpadding="7" border="0" width="100%">
|
72
|
-
<% feature.background_steps.each do |step| %>
|
73
|
-
<tr>
|
74
|
-
<td><%= raw(feature.image_tag_for(step.status, feature.file)) %></td>
|
75
|
-
<td>
|
76
|
-
<%= render "step", step: step %>
|
77
|
-
</td>
|
78
|
-
</tr>
|
79
|
-
<% end %>
|
76
|
+
|
80
77
|
</table>
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
78
|
+
</div>
|
79
|
+
|
80
|
+
<div class="feature_background">
|
81
|
+
<div class="scenario_list">
|
82
|
+
<% if feature.has_background? %>
|
83
|
+
<br />
|
84
|
+
<h2 class="scenarios">Background: <%= feature.background_title.name %></h2>
|
85
|
+
<% end %>
|
86
|
+
<table cellspacing="0" cellpadding="7" border="0" width="100%">
|
87
|
+
<% feature.background_steps.each do |step| %>
|
88
|
+
<tr>
|
89
|
+
<td><%= raw(feature.image_tag_for(step.status, feature.file)) %></td>
|
92
90
|
<td>
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
91
|
+
<%= render "step", step: step %>
|
92
|
+
</td>
|
93
|
+
</tr>
|
94
|
+
<% end %>
|
95
|
+
</table>
|
96
|
+
<br />
|
97
|
+
<h2 class="scenarios">Scenarios:</h2>
|
98
|
+
<br />
|
99
|
+
<% feature.scenarios.each do |scenario| %>
|
100
|
+
<table cellspacing="0" cellpadding="7" class="scenario" width="100%">
|
101
|
+
<tr >
|
102
|
+
<th colspan="2" class="<%= scenario.status.to_s %>"><%= scenario.name %></th>
|
103
|
+
</tr>
|
104
|
+
<% scenario.steps.each do |step| %>
|
105
|
+
<tr class="borderSeparator">
|
106
|
+
<td class="image_tag"> <%= raw(feature.image_tag_for(step.status, feature.file)) %></td>
|
107
|
+
<td class="<%= "skipped_step" if step.status == :skipped %>">
|
108
|
+
|
109
|
+
<%= render "step", step: step %>
|
110
|
+
</td>
|
111
|
+
</tr>
|
112
|
+
<% end %>
|
113
|
+
</table>
|
114
|
+
<% if scenario.has_image? %>
|
115
|
+
<a href='' onclick="img=document.getElementById('<%= scenario.image_id %>'); img.style.display = (img.style.display == 'none' ? 'block' : 'none');return false"><%= "#{scenario.image_label}" %></a><br />
|
116
|
+
<img id='<%= scenario.image_id %>' style='display: none' src='<%= feature.directory_prefix_for(feature.file) %>images/<%= scenario.image %>'/>
|
117
|
+
<% end %>
|
118
|
+
<br /><br />
|
119
|
+
<% end %>
|
120
|
+
</div>
|
121
|
+
</div>
|
103
122
|
|
104
|
-
<% end %>
|
105
123
|
</div>
|
124
|
+
|
106
125
|
<div class="footer">
|
107
126
|
Generated by PrettyFace
|
108
127
|
</div>
|
109
|
-
|
110
128
|
</body>
|
111
129
|
</html>
|
@@ -7,52 +7,59 @@
|
|
7
7
|
</head>
|
8
8
|
|
9
9
|
<body>
|
10
|
-
<div style="float: left;">
|
11
|
-
<
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
<br />
|
21
|
-
<span>Duration: <%= report.total_duration %></span>
|
22
|
-
</div>
|
23
|
-
|
24
|
-
<div class="summary_body">
|
25
|
-
<h2 class="summary">Summary</h2>
|
10
|
+
<div style="float: left; clear:both;">
|
11
|
+
<div class="header_logo">
|
12
|
+
<img src='images/<%= logo %>' width="200" />
|
13
|
+
</div>
|
14
|
+
<div class="header_description">
|
15
|
+
<% if report.custom_suite_header? %>
|
16
|
+
<%= render "suite_header" %>
|
17
|
+
<% else %>
|
18
|
+
<%= render "main_header" %>
|
19
|
+
<% end %>
|
26
20
|
|
27
|
-
|
21
|
+
<table class="run_stats">
|
22
|
+
<tr>
|
23
|
+
<td>started:</td>
|
24
|
+
<td>duration: </td>
|
25
|
+
</tr>
|
26
|
+
<tr>
|
27
|
+
<td><%= report.start_time %></td>
|
28
|
+
<td><%= report.total_duration %></td>
|
29
|
+
</tr>
|
30
|
+
</table>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
<div class="summary_body">
|
34
|
+
<table class="StatTable">
|
28
35
|
<tr>
|
29
|
-
<th
|
36
|
+
<th>Summary</th>
|
30
37
|
<th>Executed</th>
|
31
|
-
|
32
|
-
<th>Failed</th>
|
33
|
-
<th>Skipped</th>
|
34
|
-
<th>Undefined</th>
|
35
|
-
<th>Pending</th>
|
36
|
-
<th>Average
|
38
|
+
<th class="passed"><img src="images/table_passed.png"> Passed</th>
|
39
|
+
<th class="failed"><img src="images/table_failed.png">Failed</th>
|
40
|
+
<th class="skipped"><img src="images/table_skipped.png">Skipped</th>
|
41
|
+
<th class="undefined"><img src="images/table_undefined.png">Undefined</th>
|
42
|
+
<th class="pending"><img src="images/table_pending.png">Pending</th>
|
43
|
+
<th>Average Duration</th>
|
37
44
|
</tr>
|
38
|
-
<tr>
|
39
|
-
|
45
|
+
<tr class="summary_row_header">
|
46
|
+
<td>Scenarios</td>
|
40
47
|
<td><%= report.scenario_count %></td>
|
41
|
-
<td><%= report.scenarios_summary_for :passed %></td>
|
42
|
-
<td><%= report.scenarios_summary_for :failed %></td>
|
43
|
-
<td><%= report.scenarios_summary_for :skipped %></td>
|
44
|
-
<td><%= report.scenarios_summary_for :undefined %></td>
|
45
|
-
<td><%= report.scenarios_summary_for :pending %></td>
|
48
|
+
<td><%= raw(report.scenarios_summary_for :passed) %></td>
|
49
|
+
<td><%= raw(report.scenarios_summary_for :failed) %></td>
|
50
|
+
<td><%= raw(report.scenarios_summary_for :skipped) %></td>
|
51
|
+
<td><%= raw(report.scenarios_summary_for :undefined) %></td>
|
52
|
+
<td><%= raw(report.scenarios_summary_for :pending) %></td>
|
46
53
|
<td><%= report.scenario_average_duration(report.features) %></td>
|
47
54
|
</tr>
|
48
|
-
<tr>
|
49
|
-
<td
|
55
|
+
<tr class="summary_row_header">
|
56
|
+
<td >Steps</td>
|
50
57
|
<td><%= report.step_count %></td>
|
51
|
-
<td><%= report.steps_summary_for :passed %></td>
|
52
|
-
<td><%= report.steps_summary_for :failed %></td>
|
53
|
-
<td><%= report.steps_summary_for :skipped %></td>
|
54
|
-
<td><%= report.steps_summary_for :undefined %></td>
|
55
|
-
<td><%= report.steps_summary_for :pending %></td>
|
58
|
+
<td><%= raw(report.steps_summary_for :passed) %></td>
|
59
|
+
<td><%= raw(report.steps_summary_for :failed) %></td>
|
60
|
+
<td><%= raw(report.steps_summary_for :skipped) %></td>
|
61
|
+
<td><%= raw(report.steps_summary_for :undefined) %></td>
|
62
|
+
<td><%= raw(report.steps_summary_for :pending) %></td>
|
56
63
|
<td><%= report.step_average_duration(report.features) %></td>
|
57
64
|
</tr>
|
58
65
|
</table>
|
Binary file
|
Binary file
|
Binary file
|
@@ -9,58 +9,134 @@
|
|
9
9
|
*/
|
10
10
|
|
11
11
|
body {
|
12
|
-
font-family:
|
12
|
+
font-family: Verdana,Helvetica,sans-serif;
|
13
13
|
font-size: 1em;
|
14
|
+
color: #1A1A1A;
|
15
|
+
max-width: 1500px;
|
14
16
|
}
|
17
|
+
|
18
|
+
|
15
19
|
a, a:visited {
|
16
|
-
color: #
|
20
|
+
color: #0071BC;
|
21
|
+
text-decoration:none;
|
17
22
|
}
|
18
|
-
|
19
|
-
|
23
|
+
|
24
|
+
|
25
|
+
a:hover {
|
26
|
+
text-decoration:underline;
|
20
27
|
}
|
28
|
+
|
21
29
|
h2 {
|
22
30
|
margin: 0;
|
31
|
+
|
32
|
+
}
|
33
|
+
|
34
|
+
.header_logo {
|
35
|
+
float: left;
|
36
|
+
width: 200;
|
37
|
+
}
|
38
|
+
|
39
|
+
.header_description {
|
40
|
+
float: right;
|
41
|
+
padding: 25px;
|
23
42
|
}
|
43
|
+
|
44
|
+
.run_stats{
|
45
|
+
font-size: 0.9em;
|
46
|
+
}
|
47
|
+
|
48
|
+
.run_stats td{
|
49
|
+
padding: 0 25px 0 0px;
|
50
|
+
}
|
51
|
+
|
52
|
+
.StatTable{
|
53
|
+
cellspacing:10px;
|
54
|
+
cellpadding: 10px;
|
55
|
+
width: 100%;
|
56
|
+
table-layout: fixed;
|
57
|
+
background-color: #fff;
|
58
|
+
border-collapse: separate;
|
59
|
+
border-spacing: 6px;
|
60
|
+
}
|
61
|
+
|
62
|
+
.StatTable th {
|
63
|
+
vertical-align: middle;
|
64
|
+
background-color: #f7f0f0;
|
65
|
+
padding: 6px;
|
66
|
+
text-align: center;
|
67
|
+
}
|
68
|
+
|
69
|
+
.StatTable tr {background-color: #f9f9f9;}
|
70
|
+
.StatTable th img {
|
71
|
+
vertical-align: middle;
|
72
|
+
padding-right: 10px;
|
73
|
+
}
|
74
|
+
|
75
|
+
.StatTable td {padding: 10px; margin:10px}
|
76
|
+
|
77
|
+
div.feature_background {
|
78
|
+
background-color:#f2f0f1;
|
79
|
+
border-top: 1px solid #d8d7d5;
|
80
|
+
clear:both;
|
81
|
+
}
|
82
|
+
div.scenario_list {
|
83
|
+
width: 60%;
|
84
|
+
margin:0 auto;
|
85
|
+
float: center;
|
86
|
+
background-color: white;
|
87
|
+
padding: 20px;
|
88
|
+
border-right: 1px solid #D8D7D5;
|
89
|
+
border-left: 1px solid #D8D7D5;
|
90
|
+
}
|
91
|
+
|
24
92
|
.summary_body {
|
25
|
-
|
26
|
-
margin-top: 15px;
|
27
|
-
float: left;
|
28
|
-
-moz-border-radius: 15px;
|
29
|
-
border-radius: 15px;
|
30
|
-
background-color: #E0E0E0;
|
93
|
+
clear: both;
|
31
94
|
}
|
32
95
|
.summary_row_header {
|
33
|
-
text-align:
|
96
|
+
text-align: center;
|
34
97
|
font-size: 1em;
|
35
|
-
font-weight: bold;
|
36
98
|
}
|
37
99
|
.summary td {
|
38
100
|
font-size: 1em;
|
39
101
|
text-align: center;
|
40
|
-
width: 150px;
|
41
102
|
}
|
42
103
|
.summary td:first-child {
|
43
104
|
font-size: inherit;
|
44
105
|
text-align: inherit;
|
45
106
|
width: inherit;
|
46
107
|
}
|
108
|
+
.percentage {
|
109
|
+
color: #808080;
|
110
|
+
font-size: .6em;
|
111
|
+
}
|
47
112
|
|
48
|
-
.failed {
|
49
|
-
background-color: #
|
113
|
+
th.failed {
|
114
|
+
background-color: #FF1D25;
|
50
115
|
color: white;
|
51
|
-
border-color: #333333;
|
52
116
|
}
|
53
|
-
|
54
|
-
|
117
|
+
|
118
|
+
th.passed {
|
119
|
+
background-color: #90c447;
|
55
120
|
color: white;
|
56
121
|
}
|
57
|
-
.pending {
|
58
|
-
background-color: #faf834;
|
59
122
|
|
123
|
+
th.pending {
|
124
|
+
background-color: #fbb03b;
|
125
|
+
color: white;
|
60
126
|
}
|
61
|
-
.undefined {
|
62
|
-
background-color: #e0ffff;
|
63
127
|
|
128
|
+
th.undefined {
|
129
|
+
background-color: #2e3192;
|
130
|
+
color: white;
|
131
|
+
}
|
132
|
+
|
133
|
+
th.skipped {
|
134
|
+
background-color: #ed1e79;
|
135
|
+
color: white;
|
136
|
+
}
|
137
|
+
|
138
|
+
.skipped_step{
|
139
|
+
background-color: #F9CFE1;
|
64
140
|
}
|
65
141
|
.footer {
|
66
142
|
width: 100%;
|
@@ -70,7 +146,8 @@ h2 {
|
|
70
146
|
margin-top: 25px;
|
71
147
|
font-family: Verdana;
|
72
148
|
font-size: 1em;
|
73
|
-
color: white
|
149
|
+
color: white;
|
150
|
+
clear: both;
|
74
151
|
}
|
75
152
|
.failures {
|
76
153
|
width: 100%;
|
@@ -112,15 +189,11 @@ table.scenario {
|
|
112
189
|
}
|
113
190
|
|
114
191
|
td.image_tag {
|
115
|
-
text-align:
|
192
|
+
text-align: left;
|
116
193
|
vertical-align: text-top;
|
194
|
+
width: 30px;
|
117
195
|
}
|
118
196
|
.description {
|
119
|
-
border: 1px dotted #CCCCCC;
|
120
|
-
border-radius: 8px 8px 8px 8px;
|
121
|
-
box-shadow: 1px 1px 5px #DDDDDD;
|
122
|
-
line-height: 2em;
|
123
|
-
padding: 10px;
|
124
197
|
width: 100%;
|
125
198
|
font-family: inherit
|
126
199
|
}
|
@@ -159,8 +232,8 @@ td.image_tag {
|
|
159
232
|
}
|
160
233
|
|
161
234
|
.error {
|
162
|
-
color:
|
163
|
-
background-color: #
|
235
|
+
color: black;
|
236
|
+
background-color: #f9e708;
|
164
237
|
border-color: #eed3d7;
|
165
238
|
}
|
166
239
|
|
@@ -175,8 +248,6 @@ td.image_tag {
|
|
175
248
|
font-weight: normal;
|
176
249
|
}
|
177
250
|
|
178
|
-
|
179
|
-
|
180
251
|
.ruby {
|
181
252
|
font-size: 12px;
|
182
253
|
font-family: monospace;
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/pretty_face/version.rb
CHANGED
@@ -35,31 +35,31 @@ describe PrettyFace::Formatter::Html do
|
|
35
35
|
it "should keep track of passing scenarios" do
|
36
36
|
step_mother.should_receive(:scenarios).with(:passed).and_return([1,2])
|
37
37
|
step_mother.should_receive(:scenarios).and_return([1,2])
|
38
|
-
formatter.scenarios_summary_for(:passed).should == "2 (100.0%)"
|
38
|
+
formatter.scenarios_summary_for(:passed).should == "2 <span class=\"percentage\">(100.0%)</span>"
|
39
39
|
end
|
40
40
|
|
41
41
|
it "should keep track of failing scenarios" do
|
42
42
|
step_mother.should_receive(:scenarios).with(:failed).and_return([1,2])
|
43
43
|
step_mother.should_receive(:scenarios).and_return([1,2])
|
44
|
-
formatter.scenarios_summary_for(:failed).should == "2 (100.0%)"
|
44
|
+
formatter.scenarios_summary_for(:failed).should == "2 <span class=\"percentage\">(100.0%)</span>"
|
45
45
|
end
|
46
46
|
|
47
47
|
it "should keep track of pending scenarios" do
|
48
48
|
step_mother.should_receive(:scenarios).with(:pending).and_return([1,2])
|
49
49
|
step_mother.should_receive(:scenarios).and_return([1,2])
|
50
|
-
formatter.scenarios_summary_for(:pending).should == "2 (100.0%)"
|
50
|
+
formatter.scenarios_summary_for(:pending).should == "2 <span class=\"percentage\">(100.0%)</span>"
|
51
51
|
end
|
52
52
|
|
53
53
|
it "should keep track of undefined scenarios" do
|
54
54
|
step_mother.should_receive(:scenarios).with(:undefined).and_return([1,2])
|
55
55
|
step_mother.should_receive(:scenarios).and_return([1,2])
|
56
|
-
formatter.scenarios_summary_for(:undefined).should == "2 (100.0%)"
|
56
|
+
formatter.scenarios_summary_for(:undefined).should == "2 <span class=\"percentage\">(100.0%)</span>"
|
57
57
|
end
|
58
58
|
|
59
59
|
it "should keep track of skipped scenarios" do
|
60
60
|
step_mother.should_receive(:scenarios).with(:skipped).and_return([1,2])
|
61
61
|
step_mother.should_receive(:scenarios).and_return([1,2])
|
62
|
-
formatter.scenarios_summary_for(:skipped).should == "2 (100.0%)"
|
62
|
+
formatter.scenarios_summary_for(:skipped).should == "2 <span class=\"percentage\">(100.0%)</span>"
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
@@ -72,31 +72,31 @@ describe PrettyFace::Formatter::Html do
|
|
72
72
|
it "should keep track of passing steps" do
|
73
73
|
step_mother.should_receive(:steps).with(:passed).and_return([1,2])
|
74
74
|
step_mother.should_receive(:steps).and_return([1,2])
|
75
|
-
formatter.steps_summary_for(:passed).should == "2 (100.0%)"
|
75
|
+
formatter.steps_summary_for(:passed).should == "2 <span class=\"percentage\">(100.0%)</span>"
|
76
76
|
end
|
77
77
|
|
78
78
|
it "should keep track of failing steps" do
|
79
79
|
step_mother.should_receive(:steps).with(:failed).and_return([1,2])
|
80
80
|
step_mother.should_receive(:steps).and_return([1,2])
|
81
|
-
formatter.steps_summary_for(:failed).should == "2 (100.0%)"
|
81
|
+
formatter.steps_summary_for(:failed).should == "2 <span class=\"percentage\">(100.0%)</span>"
|
82
82
|
end
|
83
83
|
|
84
84
|
it "should keep track of skipped steps" do
|
85
85
|
step_mother.should_receive(:steps).with(:skipped).and_return([1,2])
|
86
86
|
step_mother.should_receive(:steps).and_return([1,2])
|
87
|
-
formatter.steps_summary_for(:skipped).should == "2 (100.0%)"
|
87
|
+
formatter.steps_summary_for(:skipped).should == "2 <span class=\"percentage\">(100.0%)</span>"
|
88
88
|
end
|
89
89
|
|
90
90
|
it "should keep track of pending steps" do
|
91
91
|
step_mother.should_receive(:steps).with(:pending).and_return([1,2])
|
92
92
|
step_mother.should_receive(:steps).and_return([1,2])
|
93
|
-
formatter.steps_summary_for(:pending).should == "2 (100.0%)"
|
93
|
+
formatter.steps_summary_for(:pending).should == "2 <span class=\"percentage\">(100.0%)</span>"
|
94
94
|
end
|
95
95
|
|
96
96
|
it "should keep track of undefined steps" do
|
97
97
|
step_mother.should_receive(:steps).with(:undefined).and_return([1,2])
|
98
98
|
step_mother.should_receive(:steps).and_return([1,2])
|
99
|
-
formatter.steps_summary_for(:undefined).should == "2 (100.0%)"
|
99
|
+
formatter.steps_summary_for(:undefined).should == "2 <span class=\"percentage\">(100.0%)</span>"
|
100
100
|
end
|
101
101
|
end
|
102
102
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pretty_face
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.6'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeffrey S. Morgan
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2013-07-
|
15
|
+
date: 2013-07-24 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: actionpack
|
@@ -130,8 +130,6 @@ files:
|
|
130
130
|
- features/support/env.rb
|
131
131
|
- features/support/error_display.rb
|
132
132
|
- features/support/hooks.rb
|
133
|
-
- features/support/logo.png
|
134
|
-
- features/support/pretty_face/blah.txt
|
135
133
|
- fixtures/advanced.feature
|
136
134
|
- fixtures/background.feature
|
137
135
|
- fixtures/basic.feature
|
@@ -147,19 +145,19 @@ files:
|
|
147
145
|
- lib/pretty_face/templates/_main_header.erb
|
148
146
|
- lib/pretty_face/templates/_page_header.erb
|
149
147
|
- lib/pretty_face/templates/_step.erb
|
150
|
-
- lib/pretty_face/templates/face.
|
151
|
-
- lib/pretty_face/templates/failed.jpg
|
148
|
+
- lib/pretty_face/templates/face.png
|
152
149
|
- lib/pretty_face/templates/failed.png
|
153
150
|
- lib/pretty_face/templates/feature.erb
|
154
151
|
- lib/pretty_face/templates/main.erb
|
155
|
-
- lib/pretty_face/templates/passed.jpg
|
156
152
|
- lib/pretty_face/templates/passed.png
|
157
|
-
- lib/pretty_face/templates/pending.jpg
|
158
153
|
- lib/pretty_face/templates/pending.png
|
159
|
-
- lib/pretty_face/templates/skipped.jpg
|
160
154
|
- lib/pretty_face/templates/skipped.png
|
161
155
|
- lib/pretty_face/templates/style.css
|
162
|
-
- lib/pretty_face/templates/
|
156
|
+
- lib/pretty_face/templates/table_failed.png
|
157
|
+
- lib/pretty_face/templates/table_passed.png
|
158
|
+
- lib/pretty_face/templates/table_pending.png
|
159
|
+
- lib/pretty_face/templates/table_skipped.png
|
160
|
+
- lib/pretty_face/templates/table_undefined.png
|
163
161
|
- lib/pretty_face/templates/undefined.png
|
164
162
|
- lib/pretty_face/version.rb
|
165
163
|
- pretty_face.gemspec
|
@@ -212,8 +210,6 @@ test_files:
|
|
212
210
|
- features/support/env.rb
|
213
211
|
- features/support/error_display.rb
|
214
212
|
- features/support/hooks.rb
|
215
|
-
- features/support/logo.png
|
216
|
-
- features/support/pretty_face/blah.txt
|
217
213
|
- spec/lib/customization_spec.rb
|
218
214
|
- spec/lib/html_formatter_spec.rb
|
219
215
|
- spec/spec_helper.rb
|
data/features/support/logo.png
DELETED
Binary file
|
File without changes
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|