|
3 | 3 | <title>Test results</title> |
4 | 4 | <meta charset='utf-8'> |
5 | 5 | <link href='http://fonts.googleapis.com/css?family=Varela+Round&v2' rel='stylesheet' type='text/css'> |
| 6 | + <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"> |
6 | 7 |
|
7 | 8 | <style> |
8 | 9 | .layout { |
9 | 10 | margin: 0 auto; |
10 | | - width: 960px; |
| 11 | + max-width: 1000px; |
11 | 12 |
|
12 | 13 | } |
13 | | - body { font-family: arial, serif; margin: 0; padding: 0; background: #333; } |
14 | | - h1,h2,h3 { font-family: arial, serif; color: white; } |
| 14 | + body { font-family: arial, serif; margin: 0; padding: 0; background: #ecf0f1; font-size: 20px; } |
| 15 | + h1,h2,h3 { font-family: arial, serif; color: #7f8c8d; } |
15 | 16 | h1 { font-size: 2.5em; } |
16 | 17 | h2 { font-size: 1.3em; } |
17 | 18 | h3 { font-size: 1em; color: #84BBDD; margin: 0.5em 0; } |
18 | 19 |
|
19 | | - table { border: none; margin: 0; padding: 0; } |
| 20 | + table { border: none; margin: 0; padding: 0; font-size: 0.9em;} |
20 | 21 | .scenarioStepsTable .stepName { padding: 5px; } |
21 | 22 |
|
22 | 23 | .scenarioStepsTable td { |
23 | | - font-size: 80%; |
24 | 24 | border: 1px solid #ccc; |
25 | 25 | font-family: 'Varela Round', arial; |
26 | 26 | -webkit-border-radius: 5px; |
|
37 | 37 |
|
38 | 38 | } |
39 | 39 |
|
| 40 | + .scenarioStepsTable .nostyle { |
| 41 | + background: none; |
| 42 | + border: none; |
| 43 | + } |
| 44 | + |
40 | 45 | p { |
41 | 46 | cursor: pointer; |
42 | | - padding: 5px; |
| 47 | + } |
43 | 48 |
|
44 | | - -webkit-border-radius: 5px; |
45 | | - -moz-border-radius: 5px; |
46 | | - border-radius: 5px; |
| 49 | + .scenarioRow>td>p { |
| 50 | + padding: 5px; |
| 51 | + } |
47 | 52 |
|
48 | | - } |
| 53 | + .scenarioStepsTable.substeps td { |
| 54 | + background: #bdc3c7; |
| 55 | + } |
49 | 56 |
|
50 | 57 | .header { font-size: large; font-weight: bold; } |
51 | 58 | p.scenarioSuccess { |
52 | | - background: rgb(157,213,58); /* Old browsers */ |
53 | | - background: -moz-linear-gradient(top, rgba(157,213,58,1) 0%, rgba(161,213,79,1) 50%, rgba(124,188,10,1) 100%); /* FF3.6+ */ |
54 | | - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(157,213,58,1)), color-stop(50%,rgba(161,213,79,1)), color-stop(100%,rgba(124,188,10,1))); /* Chrome,Safari4+ */ |
55 | | - background: -webkit-linear-gradient(top, rgba(157,213,58,1) 0%,rgba(161,213,79,1) 50%,rgba(124,188,10,1) 100%); /* Chrome10+,Safari5.1+ */ |
56 | | - background: -o-linear-gradient(top, rgba(157,213,58,1) 0%,rgba(161,213,79,1) 50%,rgba(124,188,10,1) 100%); /* Opera11.10+ */ |
57 | | - background: -ms-linear-gradient(top, rgba(157,213,58,1) 0%,rgba(161,213,79,1) 50%,rgba(124,188,10,1) 100%); /* IE10+ */ |
58 | | - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9dd53a', endColorstr='#7cbc0a',GradientType=0 ); /* IE6-9 */ |
59 | | - background: linear-gradient(top, rgba(157,213,58,1) 0%,rgba(161,213,79,1) 50%,rgba(124,188,10,1) 100%); /* W3C */ |
60 | | - |
| 59 | + background: rgb(157,213,58); /* Old browsers */ |
61 | 60 | } |
62 | 61 |
|
63 | 62 |
|
64 | 63 | .scenario { color: black; } |
65 | | - p.scenarioFailed { color: black; |
66 | | - background: rgb(204,0,0); /* Old browsers */ |
67 | | - background: -moz-linear-gradient(top, rgba(204,0,0,1) 0%, rgba(119,0,0,1) 100%); /* FF3.6+ */ |
68 | | - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(204,0,0,1)), color-stop(100%,rgba(119,0,0,1))); /* Chrome,Safari4+ */ |
69 | | - background: -webkit-linear-gradient(top, rgba(204,0,0,1) 0%,rgba(119,0,0,1) 100%); /* Chrome10+,Safari5.1+ */ |
70 | | - background: -o-linear-gradient(top, rgba(204,0,0,1) 0%,rgba(119,0,0,1) 100%); /* Opera11.10+ */ |
71 | | - background: -ms-linear-gradient(top, rgba(204,0,0,1) 0%,rgba(119,0,0,1) 100%); /* IE10+ */ |
72 | | - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cc0000', endColorstr='#770000',GradientType=0 ); /* IE6-9 */ |
73 | | - background: linear-gradient(top, rgba(204,0,0,1) 0%,rgba(119,0,0,1) 100%); /* W3C */ |
| 64 | + p.scenarioFailed, p.scenarioError { color: black; |
| 65 | + background: #e74c3c |
74 | 66 | } |
75 | 67 |
|
76 | 68 |
|
|
90 | 82 | padding: 20px; |
91 | 83 | } |
92 | 84 | ul#toolbar-filter { |
93 | | - display: inline; |
| 85 | + display: block; |
| 86 | + position: fixed; |
| 87 | + top: 20px; |
| 88 | + left: 0px; |
| 89 | + padding: 0px; |
94 | 90 | } |
95 | 91 | ul#toolbar-filter li { |
96 | | - display: inline; |
97 | | - float: right; |
| 92 | + list-style: none; |
| 93 | + text-align: center; |
98 | 94 | padding: 20px; |
99 | | - width: 120px; |
100 | | - color: black; |
101 | | - background-color: #9DD53A; |
102 | | - } |
103 | | - ul#toolbar-filter li.disabled { |
104 | | - background-color: gray; |
| 95 | + background-color: #3498db; |
105 | 96 | } |
106 | | - ul#toolbar-filter li:hover { |
107 | | - background-color: white; |
| 97 | + ul#toolbar-filter li a, ul#toolbar-filter li a:hover, ul#toolbar-filter li a:visited { |
| 98 | + color: #34495e; |
| 99 | + text-decoration: none; |
108 | 100 | } |
109 | | - ul#toolbar-filter li.disabled:hover { |
110 | | - background-color: #333; |
| 101 | + ul#toolbar-filter li.disabled { |
| 102 | + background-color: #bdc3c7; |
111 | 103 | } |
112 | 104 | </style> |
113 | 105 |
|
114 | 106 | <script type="text/javascript"> |
| 107 | + var showAll = true; |
115 | 108 | function showHide(nodeId, linkObj) |
116 | 109 | { |
117 | 110 | var subObj = document.getElementById('stepContainer' + nodeId); |
|
136 | 129 | for(var z = 0; z < trs.length; z++) { |
137 | 130 | trs[z].style.display = ''; |
138 | 131 | } |
| 132 | + showAll = true; |
139 | 133 | } |
140 | 134 |
|
141 | | - function toogleScenarios(name, linkObj) { |
142 | | - if (linkObj.className == '') { |
143 | | - document.getElementById('toolbar-filter').children[0].className = 'disabled'; |
144 | | - linkObj.className = 'disabled'; |
145 | | - } else { |
146 | | - var toolbar = document.getElementById('toolbar-filter'); |
147 | | - toolbar.children[0].className = ''; |
148 | | - linkObj.className = ''; |
149 | | - for (var i = 1; i < toolbar.children.length; i++) { |
150 | | - if (toolbar.children[i].classList.contains('disabled')) { |
151 | | - showAll = false; |
152 | | - toolbar.children[0].className = 'disabled'; |
| 135 | + function toggleScenarios(name, linkObj) { |
| 136 | + var links = document.getElementById('toolbar-filter').children; |
| 137 | + var rows = document.getElementsByClassName('scenarioRow'); |
| 138 | + if (showAll) { |
| 139 | + for (var i = 0; i < links.length; i++) { |
| 140 | + links[i].className = 'disabled'; |
| 141 | + } |
| 142 | + |
| 143 | + for (var i = 0; i < rows.length; i++) { |
| 144 | + rows[i].style.display = 'none'; |
153 | 145 | } |
154 | | - } |
| 146 | + |
155 | 147 | } |
| 148 | + showAll = false; |
156 | 149 |
|
157 | | - var rows = document.getElementsByClassName('scenarioRow'); |
158 | | - for (var i = 0; i < rows.length; i++) { |
159 | | - var row = rows[i]; |
160 | | - if (row.classList.contains(name)) { |
161 | | - if (row.style.display == '') { |
162 | | - row.style.display = 'none'; |
163 | | - } else { |
164 | | - row.style.display = ''; |
| 150 | + if (linkObj.className == '') { |
| 151 | + linkObj.className = 'disabled'; |
| 152 | + for (var i = 0; i < rows.length; i++) { |
| 153 | + if (rows[i].classList.contains(name)) { |
| 154 | + rows[i].style.display = 'none'; |
| 155 | + } |
| 156 | + } |
| 157 | + return; |
| 158 | + } |
| 159 | + if (linkObj.className == 'disabled') { |
| 160 | + linkObj.className = ''; |
| 161 | + for (var i = 0; i < rows.length; i++) { |
| 162 | + if (rows[i].classList.contains(name)) { |
| 163 | + rows[i].style.display = 'table-row'; |
| 164 | + } |
165 | 165 | } |
166 | | - } |
| 166 | + return; |
167 | 167 | } |
| 168 | + |
168 | 169 | } |
169 | 170 | </script> |
170 | 171 | </head> |
171 | 172 |
|
172 | 173 | <body> |
| 174 | + <ul id="toolbar-filter"> |
| 175 | + <li> <a href="#" title="Show all" onClick="showAllScenarios()"><i class="fa fa-plus-square-o"></i></a></li> |
| 176 | + <li> <a href="#" title="Successful" onClick="toggleScenarios('scenarioSuccess', this.parentElement)"><i class="fa fa-check"></i> {successfulScenarios}</a></li> |
| 177 | + <li> <a href="#" title="Failed" onClick="toggleScenarios('scenarioFailed', this.parentElement)"><i class="fa fa-exclamation-triangle"></i> {failedScenarios}</a></li> |
| 178 | + <li> <a href="#" title="Skipped" onClick="toggleScenarios('scenarioSkipped', this.parentElement)"><i class="fa fa-square-o"></i> {skippedScenarios}</a></li> |
| 179 | + <li> <a href="#" title="Incomplete" onClick="toggleScenarios('scenarioIncomplete', this.parentElement)"><i class="fa fa-info"></i> {incompleteScenarios}</a></li> |
| 180 | + </ul> |
173 | 181 | <div class="layout"> |
174 | 182 | {header} |
175 | | - <ul id="toolbar-filter"> |
176 | | - <li onClick="showAllScenarios()">Show all</li> |
177 | | - <li onClick="toogleScenarios('scenarioSuccess', this)">Success ({successfulScenarios})</li> |
178 | | - <li onClick="toogleScenarios('scenarioFailed', this)">Failed ({failedScenarios})</li> |
179 | | - <li onClick="toogleScenarios('scenarioSkipped', this)">Skipped ({skippedScenarios})</li> |
180 | | - <li onClick="toogleScenarios('scenarioIncomplete', this)">Incomplete ({incompleteScenarios})</li> |
181 | | - </ul> |
| 183 | + |
182 | 184 | <table border="0" style="width: 100%;"> |
183 | 185 | {scenarios} |
184 | 186 | <tr> |
|
0 commit comments