| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 Copyright 2014 The Chromium Authors. All rights reserved. | 2 Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 Use of this source code is governed by a BSD-style license that can be | 3 Use of this source code is governed by a BSD-style license that can be |
| 4 found in the LICENSE file. | 4 found in the LICENSE file. |
| 5 --> | 5 --> |
| 6 | 6 |
| 7 <link rel="import" href="../bower_components/paper-icon-button/paper-icon-button
.html"> | 7 <link rel="import" href="../bower_components/paper-icon-button/paper-icon-button
.html"> |
| 8 | 8 |
| 9 <polymer-element name="ct-test-list" attributes="tests tree"> | 9 <polymer-element name="ct-test-list" attributes="tests tree"> |
| 10 <template> | 10 <template> |
| 11 <style> | 11 <style> |
| 12 :host { | 12 :host { |
| 13 display: block; | 13 display: block; |
| 14 } | 14 } |
| 15 | 15 |
| 16 :host > div { | 16 :host > div { |
| 17 /* Be at least the height of a paper-icon-button. | 17 /* Be at least the height of a paper-icon-button. |
| 18 So things line up nicely. */ | 18 So things line up nicely. */ |
| 19 min-height: 24px; | 19 min-height: 24px; |
| 20 } | 20 } |
| 21 | 21 |
| 22 .test-failures { |
| 23 margin-left: 15px; |
| 24 } |
| 25 |
| 22 paper-icon-button { | 26 paper-icon-button { |
| 23 vertical-align: middle; | 27 vertical-align: middle; |
| 24 } | 28 } |
| 25 | 29 |
| 26 paper-icon-button::shadow #icon { | 30 paper-icon-button::shadow #icon { |
| 27 margin: 0; | 31 margin: 0; |
| 28 } | 32 } |
| 29 </style> | 33 </style> |
| 30 <template repeat="{{ groups in testGroups_ }}"> | 34 <template repeat="{{ groups in testGroups_ }}"> |
| 31 <!-- FIXME: Find a less redundant UI than repeating the step on each line.
--> | 35 <template if="{{ groups.tests.length }}"> |
| 36 <div><span style="font-weight: bold">Step:</span> {{ groups.step }}</div
> |
| 37 </template> |
| 38 |
| 32 <template repeat="{{ group in groups.tests }}"> | 39 <template repeat="{{ group in groups.tests }}"> |
| 33 <!-- Case 1: entire step failed --> | 40 <!-- Case 1: single test failure --> |
| 34 <template if="{{ !group.name }}"> | |
| 35 <div>{{ groups.step }} <b>whole step failed</b></div> | |
| 36 </template> | |
| 37 <!-- Case 2: single test failure --> | |
| 38 <template if="{{ group.name && (group.tests.length == 1 || group.expande
d) }}"> | 41 <template if="{{ group.name && (group.tests.length == 1 || group.expande
d) }}"> |
| 39 <template repeat="{{ test in group.tests }}"> | 42 <template repeat="{{ test in group.tests }}"> |
| 40 <div> | 43 <div class="test-failures"> |
| 41 {{ groups.step }} | |
| 42 <a href="{{ test | flakinessDashboardURL }}">{{ test.testName }}</
a> | 44 <a href="{{ test | flakinessDashboardURL }}">{{ test.testName }}</
a> |
| 43 </div> | 45 </div> |
| 44 </template> | 46 </template> |
| 45 </template> | 47 </template> |
| 46 <!-- Case 3: group of tests failed --> | 48 <!-- Case 2: group of tests failed --> |
| 47 <template if="{{ group.name && group.tests.length > 1 && !group.expanded
}}"> | 49 <template if="{{ group.name && group.tests.length > 1 && !group.expanded
}}"> |
| 48 <div> | 50 <div class="test-failures"> |
| 49 {{ groups.step }} {{ group.name }} ({{ group.tests.length }} Tests) | 51 {{ group.name }} ({{ group.tests.length }} Tests) |
| 50 <paper-icon-button id="expand" icon="unfold-more" step="{{ groups.st
ep }}" group="{{ group.name }}" on-click="{{ _expand }}"></paper-icon-button> | 52 <paper-icon-button id="expand" icon="unfold-more" step="{{ groups.st
ep }}" group="{{ group.name }}" on-click="{{ _expand }}"></paper-icon-button> |
| 51 </div> | 53 </div> |
| 52 </template> | 54 </template> |
| 53 </template> | 55 </template> |
| 54 </template> | 56 </template> |
| 55 </template> | 57 </template> |
| 56 <script> | 58 <script> |
| 57 Polymer('ct-test-list', { | 59 Polymer('ct-test-list', { |
| 58 testsChanged: function() { | 60 testsChanged: function() { |
| 59 var groups = {}; | 61 var groups = {}; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 } | 96 } |
| 95 }); | 97 }); |
| 96 }, | 98 }, |
| 97 | 99 |
| 98 flakinessDashboardURL: function(test) { | 100 flakinessDashboardURL: function(test) { |
| 99 return test.flakinessDashboardURL(this.tree); | 101 return test.flakinessDashboardURL(this.tree); |
| 100 }, | 102 }, |
| 101 }); | 103 }); |
| 102 </script> | 104 </script> |
| 103 </polymer-element> | 105 </polymer-element> |
| OLD | NEW |