cuke_sniffer 0.0.8 → 1.0.0
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 +7 -0
- data/bin/cuke_sniffer +4 -1
- data/lib/cuke_sniffer/cli.rb +15 -4
- data/lib/cuke_sniffer/cuke_sniffer_helper.rb +4 -3
- data/lib/cuke_sniffer/dead_steps_helper.rb +53 -53
- data/lib/cuke_sniffer/formatter.rb +166 -125
- data/lib/cuke_sniffer/js/cuke_sniffer.js +184 -0
- data/lib/cuke_sniffer/report/css.html.erb +122 -132
- data/lib/cuke_sniffer/report/dead_steps.html.erb +61 -61
- data/lib/cuke_sniffer/report/dead_steps_min.html.erb +23 -0
- data/lib/cuke_sniffer/report/expand_and_collapse_buttons.html.erb +8 -0
- data/lib/cuke_sniffer/report/features.html.erb +124 -106
- data/lib/cuke_sniffer/report/hooks.html.erb +76 -76
- data/lib/cuke_sniffer/report/improvement_list.html.erb +34 -24
- data/lib/cuke_sniffer/report/information.html.erb +81 -0
- data/lib/cuke_sniffer/report/js.html.erb +9 -65
- data/lib/cuke_sniffer/report/min_template.html.erb +12 -7
- data/lib/cuke_sniffer/report/rules.html.erb +100 -68
- data/lib/cuke_sniffer/report/standard_template.html.erb +16 -12
- data/lib/cuke_sniffer/report/step_definitions.html.erb +69 -63
- data/lib/cuke_sniffer/report/summary.html.erb +131 -96
- data/lib/cuke_sniffer/report/title.html.erb +13 -9
- data/lib/cuke_sniffer/rule.rb +1 -0
- data/lib/cuke_sniffer/rule_config.rb +2 -2
- data/lib/cuke_sniffer/rules_evaluator.rb +1 -2
- data/lib/cuke_sniffer/scenario.rb +67 -23
- data/lib/cuke_sniffer/summary_helper.rb +90 -90
- metadata +31 -46
- data/lib/cuke_sniffer/report/legend.html.erb +0 -167
@@ -0,0 +1,81 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="panel panel-default">
|
3
|
+
<div class="panel-heading panel-title" data-toggle="collapse" data-target="#information" >
|
4
|
+
Information <span class="glyphicon glyphicon-menu-down"></span>
|
5
|
+
</div>
|
6
|
+
<div id="information" class="panel-body collapse">
|
7
|
+
<div class="col-md-12">
|
8
|
+
<div class="col-md-1">
|
9
|
+
<h4>Purpose:</h4>
|
10
|
+
</div>
|
11
|
+
<div class="col-md-11">
|
12
|
+
As users of Cucumber we are developers that wish to treat our testing projects with the same respect and
|
13
|
+
quality as our production and user facing code. We wish to follow best practices and to avoid falling into
|
14
|
+
some of the anti patterns that are easy to slip into using Cucumber. Cuke Sniffer was made to aid in the
|
15
|
+
identification of these issues. The list of improvements has been constructed on opinions from the authors
|
16
|
+
and feedback from community members. Not everyone will share these opinions and for that reason all
|
17
|
+
improvements can be turned off when generating this report. See the
|
18
|
+
<a target="_blank" href="https://github.com/r-cochran/cuke_sniffer/wiki">wiki</a> for instructions on how.
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
<div class="col-md-12">
|
22
|
+
<div class="col-md-1">
|
23
|
+
<h4>Scoring:</h4>
|
24
|
+
</div>
|
25
|
+
<div class="col-md-11">
|
26
|
+
Scoring is based on the number of 'smells' in a cucumber project, where smells are potential misuses or
|
27
|
+
errors. Cuke Sniffer follows a 'golf score' type system where the lower the number, the better. 'Min' refers
|
28
|
+
to the overall best score for a particular object and the 'Max' is the overall worst object score. The score
|
29
|
+
is <u>relative</u> to each project and should be used to compare the project and teams growth.
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
<div class="col-md-12">
|
33
|
+
<div class="col-md-1">
|
34
|
+
<h4>Authors:</h4>
|
35
|
+
</div>
|
36
|
+
<div class="col-md-11">
|
37
|
+
<div>
|
38
|
+
Robert Cochran <a target="_blank" href="https://twitter.com/cochrarj"><i class="fa fa-twitter"></i></a>
|
39
|
+
</div>
|
40
|
+
<div>
|
41
|
+
Robert Anderson <a target="_blank" href="https://twitter.com/bobthesatyr1337"><i class="fa fa-twitter"></i></a>
|
42
|
+
</div>
|
43
|
+
<div>
|
44
|
+
Christopher Vaughn <a target="_blank" href="https://twitter.com/mistercvaughn"><i class="fa fa-twitter"></i></a>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
<div class="col-md-12">
|
49
|
+
<div class="col-md-1">
|
50
|
+
<h4>Links:</h4>
|
51
|
+
</div>
|
52
|
+
<div class="col-md-11">
|
53
|
+
<div>
|
54
|
+
<div>
|
55
|
+
<a target="_blank" href="https://github.com/r-cochran/cuke_sniffer/issues">
|
56
|
+
<span class="fa fa-bug"></span> Report Issues
|
57
|
+
</a>
|
58
|
+
|
59
|
+
</div>
|
60
|
+
<div>
|
61
|
+
<a target="_blank" href="https://github.com/r-cochran/cuke_sniffer/wiki/Patch-notes">
|
62
|
+
<span class="fa fa-list"></span> Patch Notes
|
63
|
+
</a>
|
64
|
+
|
65
|
+
</div>
|
66
|
+
<div>
|
67
|
+
<a target="_blank" href="https://github.com/r-cochran/cuke_sniffer/blob/master/LICENSE">
|
68
|
+
<span class="fa fa-balance-scale"></span> License
|
69
|
+
</a>
|
70
|
+
</div>
|
71
|
+
<div>
|
72
|
+
<a target="_blank" href="https://github.com/r-cochran/cuke_sniffer/wiki">
|
73
|
+
<span class="fa fa-newspaper-o"></span> Wiki
|
74
|
+
</a>
|
75
|
+
</div>
|
76
|
+
</div>
|
77
|
+
</div>
|
78
|
+
</div>
|
79
|
+
</div>
|
80
|
+
</div>
|
81
|
+
</div>
|
@@ -1,65 +1,9 @@
|
|
1
|
-
<script
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
function expandAllShiftingRows(css_class) {
|
12
|
-
var elements = document.getElementsByClassName(css_class)
|
13
|
-
for (var i = 0; i < elements.length; i++) {
|
14
|
-
existing_style = elements.item(i).getAttribute('style');
|
15
|
-
elements.item(i).setAttribute('style', existing_style.replace(/display:\s*none/, "display: block-inline"));
|
16
|
-
}
|
17
|
-
}
|
18
|
-
|
19
|
-
function updateAll(css_class, display_type){
|
20
|
-
var elements = document.getElementsByClassName(css_class)
|
21
|
-
for (var i = 0; i < elements.length; i++) {
|
22
|
-
elements.item(i).style.display = display_type;
|
23
|
-
}
|
24
|
-
}
|
25
|
-
|
26
|
-
function toggleById(item, link) {
|
27
|
-
updateDisplayStatus(document.getElementById(item));
|
28
|
-
toggleText(link)
|
29
|
-
}
|
30
|
-
function updateDisplayStatus(object) {
|
31
|
-
if (object.tagName == "TR") {
|
32
|
-
updateDisplayStatusForTR(object);
|
33
|
-
} else {
|
34
|
-
object.style.display = (object.style.display == "block") ? 'none' : "block";
|
35
|
-
}
|
36
|
-
}
|
37
|
-
|
38
|
-
function updateDivScroll(divId, tableId) {
|
39
|
-
div = document.getElementById(divId);
|
40
|
-
table = document.getElementById(tableId);
|
41
|
-
if (table.offsetHeight >= 500) {
|
42
|
-
div.style.height = "75%";
|
43
|
-
div.style.overflow = "auto";
|
44
|
-
} else {
|
45
|
-
div.style.height = "";
|
46
|
-
div.style.overflow = "none";
|
47
|
-
}
|
48
|
-
|
49
|
-
}
|
50
|
-
|
51
|
-
function updateDisplayStatusForTR(object) {
|
52
|
-
existing_style = object.getAttribute('style');
|
53
|
-
if (object.style.display == "none") {
|
54
|
-
object.setAttribute('style', existing_style.replace(/display:\s*none/, "display: block-inline"))
|
55
|
-
} else {
|
56
|
-
object.setAttribute('style', existing_style.replace("display: block-inline", "display: none"))
|
57
|
-
}
|
58
|
-
}
|
59
|
-
function toggleText(link) {
|
60
|
-
var char_result = link.innerHTML.indexOf("+") > -1 ? "-" : "+";
|
61
|
-
link.innerHTML = link.innerHTML.replace(/(\+|\-)/, char_result)
|
62
|
-
}
|
63
|
-
|
64
|
-
|
65
|
-
</script>
|
1
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
|
2
|
+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
|
3
|
+
|
4
|
+
<script type="text/javascript">
|
5
|
+
<%= build_page(cuke_sniffer, "../js/cuke_sniffer.js") %>
|
6
|
+
$(document).ready(function(){
|
7
|
+
CukeSniffer.init();
|
8
|
+
});
|
9
|
+
</script>
|
@@ -2,15 +2,20 @@
|
|
2
2
|
styles = build_page(cuke_sniffer, "css.html.erb")
|
3
3
|
scripts = build_page(cuke_sniffer, "js.html.erb")
|
4
4
|
title = build_page(cuke_sniffer, "title.html.erb")
|
5
|
-
|
5
|
+
information = build_page(cuke_sniffer, "information.html.erb")
|
6
6
|
summary = build_page(cuke_sniffer, "summary.html.erb")
|
7
7
|
rules = rules_template(cuke_sniffer)
|
8
8
|
improvement_list = build_page(cuke_sniffer, "improvement_list.html.erb")
|
9
|
+
dead_steps = build_page(cuke_sniffer, "dead_steps_min.html.erb")
|
9
10
|
%>
|
10
11
|
|
11
|
-
|
12
|
-
<%=
|
13
|
-
<%=
|
14
|
-
<%=
|
15
|
-
<%=
|
16
|
-
<%=
|
12
|
+
<div class="container">
|
13
|
+
<%= styles %>
|
14
|
+
<%= scripts %>
|
15
|
+
<%= title %>
|
16
|
+
<%= information %>
|
17
|
+
<%= summary %>
|
18
|
+
<%= improvement_list %>
|
19
|
+
<%= rules %>
|
20
|
+
<%= dead_steps %>
|
21
|
+
</div>
|
@@ -1,71 +1,103 @@
|
|
1
|
-
<div
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
<input type="button" class="function_button" value="Collapse All" onclick="collapseAll('rule_detail')" />
|
7
|
-
<input type="button" class="function_button" value="Expand All" onclick="expandAll('rule_detail')" />
|
8
|
-
</div>
|
9
|
-
|
10
|
-
<div class="shrink_section" id="rules">
|
11
|
-
<table id="rules_table" style="width: 100%" border="0" cellspacing="0">
|
12
|
-
<% index = 0 %>
|
13
|
-
<% cuke_sniffer.rules.each do |rule| %>
|
14
|
-
<% if !rule.enabled %>
|
15
|
-
<tr class="notes disabled_title_row" onclick="updateDisplayStatus(document.getElementById('rule_detail_<%=index%>'));updateDivScroll('rules', 'rules_table');">
|
16
|
-
<% elsif index.odd? %>
|
17
|
-
<tr class="notes blue_title_row" onclick="updateDisplayStatus(document.getElementById('rule_detail_<%=index%>'));updateDivScroll('rules', 'rules_table');">
|
18
|
-
<% else %>
|
19
|
-
<tr class="notes white_title_row" onclick="updateDisplayStatus(document.getElementById('rule_detail_<%=index%>'));updateDivScroll('rules', 'rules_table');">
|
20
|
-
<% end %>
|
1
|
+
<div class="row">
|
2
|
+
<div class="panel panel-default">
|
3
|
+
<div id="rulesTab" class="panel-heading panel-title" data-toggle="collapse" data-target="#rules_data">
|
4
|
+
Rules <span class="glyphicon glyphicon-menu-down"></span>
|
5
|
+
</div>
|
21
6
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
7
|
+
<div id="rules_data" class="panel-body collapse">
|
8
|
+
<span class="button-bar">
|
9
|
+
<%= build_page(cuke_sniffer, "expand_and_collapse_buttons.html.erb") %>
|
10
|
+
<div class="btn-group enable-bar">
|
11
|
+
<div id="enableAllRules" class="btn btn-default">
|
12
|
+
Enable All
|
13
|
+
</div>
|
14
|
+
<div id="disableAllRules" class="btn btn-default">
|
15
|
+
Disable All
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
<div id="ruleFilters" class="btn-group" data-toggle="buttons">
|
19
|
+
<div class="btn btn-default active">
|
20
|
+
<input type="checkbox" checked data-rule-type="feature"/>
|
21
|
+
<span class="full-page" title="Feature">Feature</span>
|
22
|
+
<span class="small-page" title="Feature">F.</span>
|
23
|
+
</div>
|
24
|
+
<div class="btn btn-default active">
|
25
|
+
<input type="checkbox" checked data-rule-type="background"/>
|
26
|
+
<span class="full-page" title="Background">Background</span>
|
27
|
+
<span class="small-page" title="Background">B.</span>
|
28
|
+
</div>
|
29
|
+
<div class="btn btn-default active">
|
30
|
+
<input type="checkbox" checked data-rule-type="scenario"/>
|
31
|
+
<span class="full-page" title="Scenario">Scenario</span>
|
32
|
+
<span class="small-page" title="Scenario">S.</span>
|
33
|
+
</div>
|
34
|
+
<div class="btn btn-default active">
|
35
|
+
<input type="checkbox" checked data-rule-type="stepdefinition"/>
|
36
|
+
<span class="full-page" title="Step Definition">Step Definition</span>
|
37
|
+
<span class="small-page" title="Step Definition">S. D.</span>
|
38
|
+
</div>
|
39
|
+
<div class="btn btn-default active">
|
40
|
+
<input type="checkbox" checked data-rule-type="hook"/>
|
41
|
+
<span class="full-page" title="Hook">Hook</span>
|
42
|
+
<span class="small-page" title="Hook">H</span>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
</span>
|
46
|
+
<% cuke_sniffer.rules.each do |rule| %>
|
47
|
+
<div class="rule" data-rule-symbol="<%=rule.symbol%>"
|
48
|
+
<% rule.targets.each do |target| %>
|
49
|
+
rule-<%=target%>
|
62
50
|
<% end %>
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
51
|
+
>
|
52
|
+
<div>
|
53
|
+
<input type="checkbox"
|
54
|
+
<% if rule.enabled%>
|
55
|
+
checked="checked"
|
56
|
+
<% end %>
|
57
|
+
/>
|
58
|
+
<span data-phrase><%=rule.phrase %></span>
|
59
|
+
</div>
|
60
|
+
<div class="details" style="display:none;">
|
61
|
+
<div class="well">
|
62
|
+
<div class="row">
|
63
|
+
<div class="col-md-3">
|
64
|
+
<b>Score:</b>
|
65
|
+
</div>
|
66
|
+
<div class="col-md-9">
|
67
|
+
<%= rule.score %>
|
68
|
+
</div>
|
69
|
+
</div>
|
70
|
+
<div class="row">
|
71
|
+
<div class="col-md-3">
|
72
|
+
<b>Targets:</b>
|
73
|
+
</div>
|
74
|
+
<div class="col-md-9" data-targets>
|
75
|
+
<%= rule.targets.to_s.gsub(/[\]\[\"]/, "") %>
|
76
|
+
</div>
|
77
|
+
</div>
|
78
|
+
<% unless rule.conditions.empty? %>
|
79
|
+
<div class="row conditions">
|
80
|
+
<div class="col-md-3">
|
81
|
+
<b>Conditions:</b>
|
82
|
+
</div>
|
83
|
+
<div class="col-md-9">
|
84
|
+
<% rule.conditions.each do |condition_symbol, value| %>
|
85
|
+
<div class="row well">
|
86
|
+
<div class="col-md-2">
|
87
|
+
<%= condition_symbol %>:
|
88
|
+
</div>
|
89
|
+
<div class="col-md-10" data-conditions>
|
90
|
+
<%= value %>
|
91
|
+
</div>
|
92
|
+
</div>
|
93
|
+
<% end %>
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
<% end %>
|
97
|
+
</div>
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
<% end %>
|
101
|
+
</div>
|
102
|
+
</div>
|
70
103
|
</div>
|
71
|
-
<br style="clear:both">
|
@@ -2,7 +2,7 @@
|
|
2
2
|
styles = build_page(cuke_sniffer, "css.html.erb")
|
3
3
|
scripts = build_page(cuke_sniffer, "js.html.erb")
|
4
4
|
title = build_page(cuke_sniffer, "title.html.erb")
|
5
|
-
|
5
|
+
information = build_page(cuke_sniffer, "information.html.erb")
|
6
6
|
summary = build_page(cuke_sniffer, "summary.html.erb")
|
7
7
|
rules = rules_template(cuke_sniffer)
|
8
8
|
improvement_list = build_page(cuke_sniffer, "improvement_list.html.erb")
|
@@ -11,14 +11,18 @@
|
|
11
11
|
step_definitions = build_page(cuke_sniffer, "step_definitions.html.erb")
|
12
12
|
hooks = build_page(cuke_sniffer, "hooks.html.erb")
|
13
13
|
%>
|
14
|
-
|
15
|
-
|
16
|
-
<%=
|
17
|
-
<%= title %>
|
18
|
-
<%=
|
19
|
-
<%=
|
20
|
-
<%=
|
21
|
-
<%=
|
22
|
-
<%=
|
23
|
-
<%=
|
24
|
-
<%=
|
14
|
+
<body class="container">
|
15
|
+
<div class="container">
|
16
|
+
<%= styles %>
|
17
|
+
<%= title %>
|
18
|
+
<%= information %>
|
19
|
+
<%= summary %>
|
20
|
+
<%= improvement_list %>
|
21
|
+
<%= rules %>
|
22
|
+
<%= dead_steps %>
|
23
|
+
<%= features %>
|
24
|
+
<%= step_definitions %>
|
25
|
+
<%= hooks %>
|
26
|
+
<%= scripts %>
|
27
|
+
</div>
|
28
|
+
</body>
|
@@ -1,68 +1,74 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
|
1
|
+
<div class="row">
|
2
|
+
<div class="panel panel-default">
|
3
|
+
<div id="stepDefinitionTab" class="panel-heading panel-title" data-toggle="collapse" data-target="#step_definitions">
|
4
|
+
Step Definitions <span class="glyphicon glyphicon-menu-down"></span>
|
5
|
+
</div>
|
4
6
|
|
5
|
-
<div id="
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
<% else %>
|
35
|
-
Not cataloged
|
36
|
-
<% end %>
|
37
|
-
</td>
|
38
|
-
</tr>
|
39
|
-
|
40
|
-
<% if index.odd? %>
|
41
|
-
<tr id="step_definition_detail_<%= index %>" class="blue_row step_definition_detail" style="display: none;">
|
42
|
-
<% else %>
|
43
|
-
<tr id="step_definition_detail_<%= index %>" class="white_row step_definition_detail" style="display: none;">
|
44
|
-
<% end %>
|
45
|
-
<td colspan="2">
|
46
|
-
<% SummaryHelper::sort_improvement_list(step_definition.rules_hash).each do |phrase, count| %>
|
47
|
-
<div style="text-indent: 10px;">
|
48
|
-
<div style="color:red; display:inline-block;">
|
49
|
-
<%= count %>
|
7
|
+
<div id="step_definitions" class="panel-body collapse">
|
8
|
+
<span class="button-bar">
|
9
|
+
<%= build_page(cuke_sniffer, "expand_and_collapse_buttons.html.erb") %>
|
10
|
+
<div class="btn-group" data-toggle="buttons">
|
11
|
+
<div id="showDeadSteps" class="btn btn-default">
|
12
|
+
<input type="checkbox"/>Show Dead Steps
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</span>
|
16
|
+
<% if cuke_sniffer.step_definitions.count == 0 %>
|
17
|
+
<div>
|
18
|
+
<div>There were no Step Definitions to sniff in '<%= cuke_sniffer.step_definitions_location %>'!</div>
|
19
|
+
</div>
|
20
|
+
<% elsif cuke_sniffer.step_definitions.count >= 1 && cuke_sniffer.summary[:step_definitions][:total_score] ==0 %>
|
21
|
+
<div>
|
22
|
+
<div>Excellent! No smells found for Step Definitions!</div>
|
23
|
+
</div>
|
24
|
+
<% else %>
|
25
|
+
<% cuke_sniffer.step_definitions.each do |step_definition| %>
|
26
|
+
<% next if step_definition.score == 0 %>
|
27
|
+
<div class="stepDefinition <%if step_definition.calls.size == 0%>deadStep<% end %>">
|
28
|
+
<div class="row">
|
29
|
+
<div class="col-md-12 title">
|
30
|
+
<div class="col-md-1 red" title="Total Score from this Step Definition file.">
|
31
|
+
<%= step_definition.score %>
|
32
|
+
</div>
|
33
|
+
<div class="col-md-11">
|
34
|
+
/<%= step_definition.regex.to_s.gsub(/[(]\?-mix:/, "")[0...-1] %>/
|
35
|
+
</div>
|
50
36
|
</div>
|
51
|
-
<div style="display:
|
52
|
-
|
37
|
+
<div class="details col-md-12" style="display: none;">
|
38
|
+
<div class="well">
|
39
|
+
<div class="row">
|
40
|
+
<div class="col-md-12 filename">
|
41
|
+
File: <a target="_blank" href="file:///<%= step_definition.location.gsub(/:\d+$/, "") %>" title="Note: Links to file on system this report was generated.">
|
42
|
+
<%= step_definition.location.gsub(cuke_sniffer.step_definitions_location, '') %>
|
43
|
+
</a>
|
44
|
+
</div>
|
45
|
+
<div class="col-md-12">
|
46
|
+
<% if cuke_sniffer.cataloged? %>
|
47
|
+
Call(s): <%= step_definition.calls.size %>
|
48
|
+
<% else %>
|
49
|
+
Not cataloged
|
50
|
+
<% end %>
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
<div class="row well">
|
54
|
+
<% SummaryHelper::sort_improvement_list(step_definition.rules_hash).each do |phrase, count| %>
|
55
|
+
<div class="row" data-improvement-row>
|
56
|
+
<div class="col-md-1 red" data-score>
|
57
|
+
<%= count %>
|
58
|
+
</div>
|
59
|
+
<div class="col-md-11" data-improvement="<%=phrase %>">
|
60
|
+
<%= phrase %>
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
<% end %>
|
64
|
+
</div>
|
65
|
+
</div>
|
53
66
|
</div>
|
54
67
|
</div>
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
<a href="file:///<%= step_definition.location.gsub(/:\d+$/, "") %>" title="Note: Links to file on system this report was generated.">
|
59
|
-
<%= step_definition.location.gsub(cuke_sniffer.step_definitions_location, '') %>
|
60
|
-
</a>
|
61
|
-
</td>
|
62
|
-
</tr>
|
68
|
+
</div>
|
69
|
+
<% end %>
|
70
|
+
<% end %>
|
63
71
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
</div>
|
68
|
-
<br style="clear:both">
|
72
|
+
</div>
|
73
|
+
</div>
|
74
|
+
</div>
|