-
Notifications
You must be signed in to change notification settings - Fork 30
/
jasmine_template.html
200 lines (177 loc) · 8.23 KB
/
jasmine_template.html
1
2
3
4
5
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
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{{pageTitle}}</title>
<style>
body { background-color: #eeeeee; padding: 0; margin: 5px; overflow-y: scroll; }
#HTMLReporter h1 { font-size: 12px; font-weight: normal; text-align: right; margin: 10px 0 10px 0 !important; }
#HTMLReporter { font-size: 11px; font-family: Monaco, "Lucida Console", monospace; line-height: 14px; color: #333333; }
#HTMLReporter a { text-decoration: none; }
#HTMLReporter a:hover { text-decoration: underline; }
#HTMLReporter p, #HTMLReporter h1, #HTMLReporter h2, #HTMLReporter h3, #HTMLReporter h4, #HTMLReporter h5, #HTMLReporter h6 { margin: 0; line-height: 14px; }
#HTMLReporter .banner, #HTMLReporter .symbolSummary, #HTMLReporter .summary, #HTMLReporter .resultMessage, #HTMLReporter .specDetail .description, #HTMLReporter .alert .bar, #HTMLReporter .stackTrace { padding-left: 9px; padding-right: 9px; }
{{#sections}}#HTMLReporter .summary { padding: 0; }{{/sections}}
#HTMLReporter #jasmine_content { position: fixed; right: 100%; }
#HTMLReporter .version { color: #aaaaaa; }
#HTMLReporter .banner { margin-top: 14px; }
#HTMLReporter .duration { color: #aaaaaa; float: right; }
#HTMLReporter .exceptions { color: #fff; float: right; margin-top: 5px; margin-right: 5px; }
#HTMLReporter .bar { line-height: 28px; font-size: 14px; display: block; color: #eee; }
#HTMLReporter .runningAlert { background-color: #666666; }
#HTMLReporter .skippedAlert { background-color: #aaaaaa; }
#HTMLReporter .skippedAlert:first-child { background-color: #333333; }
#HTMLReporter .skippedAlert:hover { text-decoration: none; color: white; text-decoration: underline; }
#HTMLReporter .passingAlert { background-color: #a6b779; }
#HTMLReporter .passingAlert:first-child { background-color: #5e7d00; }
#HTMLReporter .failingAlert { background-color: #cf867e; }
#HTMLReporter .failingAlert:first-child { background-color: #b03911; }
#HTMLReporter .results { margin-top: 14px; }
#HTMLReporter #details { display: none; }
#HTMLReporter .resultsMenu { color: #999; background-color: #fff; }
#HTMLReporter .summaryMenuItem { font-weight: normal; text-decoration: none; margin-right: 5px; color: #333; }
#HTMLReporter .detailsMenuItem { font-weight: normal; text-decoration: none; margin-left: 5px; color: #999; }
#HTMLReporter.showDetails .summaryMenuItem { color: #999; }
#HTMLReporter.showDetails .detailsMenuItem { color: #333; }
#HTMLReporter.showDetails .summaryMenuItem:hover { text-decoration: underline; }
#HTMLReporter .detailsMenuItem:hover { text-decoration: underline; }
#HTMLReporter.showDetails .summary { display: none; }
#HTMLReporter.showDetails #details { display: block; }
#HTMLReporter .summary { margin-top: 14px; margin-bottom: 40px; }
#HTMLReporter .summary .suite .suite, #HTMLReporter .summary .specSummary { margin-left: 14px; }
#HTMLReporter .summary .specSummary.passed { color: #5e7d00; }
#HTMLReporter .summary .specSummary.failed { color: #b03911; }
#HTMLReporter .summary .specSummary.skipped { color: #ba9d37; }
#HTMLReporter .description + .suite { margin-top: 0; }
#HTMLReporter .suite { margin-top: 14px; }
#HTMLReporter .suite a { color: #333333; }
#HTMLReporter #details .specDetail { margin-bottom: 28px; }
#HTMLReporter #details .specDetail .description { display: block; color: white; background-color: #b03911; }
#HTMLReporter .resultMessage { padding-top: 14px; color: #333333; }
#HTMLReporter .resultMessage span.result { display: block; }
#HTMLReporter .stackTrace { margin: 5px 0 0 0; max-height: 224px; overflow: auto;
line-height: 18px; color: #666666; border: 1px solid #ddd; background: white; white-space: pre; }
.fold-buttons { float: right; }
.fold-buttons a { color: #fff; font-size: 12px; }
{{^sections}}.fold-buttons { display: none } {{/sections}}
#HTMLReporter .br { margin-top: 8px; }
#HTMLReporter .section-starter { font-size: 14px; line-height: 18px }
#HTMLReporter .summary-section {
cursor: -webkit-zoom-out; cursor: -moz-zoom-out; cursor: zoom-out;
background: #fafafa;
padding: 10px;
border-bottom: #eaeaea 1px solid; }
#HTMLReporter .summary-section.folded {
cursor: -webkit-zoom-in; cursor: -moz-zoom-in; cursor: zoom-in;
padding-bottom: 8px;
}
#HTMLReporter .summary-section.folded div { display: none }
#HTMLReporter .summary-section.folded div.section-starter { display: block }
/*#HTMLReporter .summary-section:hover { background: #e9e9e9; }*/
#HTMLReporter .summary-section:hover { background: #f5f5f5; }
#HTMLReporter .summary-section-totals {
font-size: 11px;
display: none;
margin-left: 11px;
overflow: hidden;
position: relative;
top: -1px;
}
#HTMLReporter .summary-section.folded .summary-section-totals { display: inline; }
#HTMLReporter .summary-section-total { color: #fff; vertical-align: baseline; padding: 1px 8px; }
#HTMLReporter .summary-section-total.passed { background: #5e7d00; }
#HTMLReporter .summary-section-total.failed { background: #b03911; }
#HTMLReporter .summary-section-total.skipped { background: #ba9d37; }
#HTMLReporter { font-size: 12px; line-height: 18px; } /*larget font-size*/
</style>
</head>
<body id="HTMLReporter" class="html-reporter{{#focusOnFailures}} showDetails{{/focusOnFailures}}">
<h1>Tested in {{browserName}} on {{date}}</h1>
<div class="alert">
{{#results}}
{{#hasFailed}}
<!-- <span class="failingAlert bar">Failed {{failed}} specs</span> -->
<span class="failingAlert bar"><span class="fold-buttons"><a href="#" onclick="fold();">Fold</a> |
<a href="#" onclick="unfold();">Unfold</a></span>{{total}} specs, {{failed}} failed, {{skipped}} pending</span>
<span class="resultsMenu bar">
<a class="summaryMenuItem" onclick="showSummary();" href="#">Spec List<a>|<a
class="detailsMenuItem" onclick="showFailures();" href="#">Failures</a>
</span>
{{/hasFailed}}
{{^hasFailed}}
{{#hasSuccess}}
<span class="passingAlert bar"><span class="fold-buttons"><a href="#" onclick="fold();">Fold</a> |
<a href="#" onclick="unfold();">Unfold</a></span>{{total}} specs, {{failed}} failed, {{skipped}} pending</span>
{{/hasSuccess}}
{{/hasFailed}}
{{/results}}
</div>
<div class="results">
<div class="summary">
{{#sections}}
<div class="summary-section{{folded}}" onclick="toggleSection(this);">
{{#lines}}
<div class="{{className}}" style="{{style}}">{{value}}<span
class="summary-section-totals">{{#totals}}<span
class="summary-section-total {{result}}">{{count}}</span>{{/totals}}</span>
</div>
{{/lines}}
</div>
{{/sections}}
{{^sections}}
{{#suites}}
<div class="suite {{state}}">
<span class="description">{{name}}</span>
{{#specs}}
<div class="specSummary {{state}}">
<span class="description">{{description}}</span>
</div>
{{/specs}}
</div>
{{/suites}}
{{/sections}}
</div>
<div id="details">
{{#failedSuites}}
{{#specs}}
<div class="specDetail {{state}}">
<span class="description">{{name}} {{description}}</span>
<div class="stackTrace">
<div class="resultMessage">{{log}}</div>
</div>
</div>
{{/specs}}
{{/failedSuites}}
</div>
<script>
var folded = {{foldAll}};
document.body.onkeypress = function (e) {
if (!e || !e.keyCode) return;
switch (e.keyCode) {
case 102: toggleFold(); break;
case 49: showSummary(); break;
{{#failedSuites}}case 50: showFailures(); break;{{/failedSuites}}
}
};
function showSummary() { document.body.className = "html-reporter showSummary"; }
function showFailures() { document.body.className = "html-reporter showDetails"; }
function toggleSection(el) {
el.className = el.className === 'summary-section' ? 'summary-section folded' : 'summary-section';
}
function toggleFold() { (folded) ? unfold() : fold(); }
function fold() {
var els = document.querySelectorAll('.summary-section');
for (var i = 0; i < els.length; i++) {
els[i].className = 'summary-section folded';
}
folded = true;
}
function unfold() {
var els = document.querySelectorAll('.summary-section');
for (var i = 0; i < els.length; i++) {
els[i].className = 'summary-section';
}
folded = false;
}
</script>
</body>
</html>