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="../ct-failure-card-buttons.html"> | 7 <link rel="import" href="../ct-failure-card-buttons.html"> |
8 <link rel="import" href="../ct-step-failure-card.html"> | 8 <link rel="import" href="../ct-step-failure-card.html"> |
9 | 9 |
10 <link rel="import" href="../../model/ct-commit-list-mock.html"> | 10 <link rel="import" href="../../model/ct-commit-list-mock.html"> |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 card.shadowRoot.getElementById('dialogOk').dispatchEvent(new CustomEvent
('tap')); | 69 card.shadowRoot.getElementById('dialogOk').dispatchEvent(new CustomEvent
('tap')); |
70 setTimeout(function() { | 70 setTimeout(function() { |
71 assert.equal(group.bug, 'https://foo.com/?id=888'); | 71 assert.equal(group.bug, 'https://foo.com/?id=888'); |
72 assert.equal(group.bugLabel, 'Bug 888'); | 72 assert.equal(group.bugLabel, 'Bug 888'); |
73 assert.equal(group._annotation.bug, 'https://foo.com/?id=888'); | 73 assert.equal(group._annotation.bug, 'https://foo.com/?id=888'); |
74 done(); | 74 done(); |
75 }); | 75 }); |
76 }); | 76 }); |
77 }); | 77 }); |
78 | 78 |
| 79 it('file bug link should have the right URL', function(done) { |
| 80 card.shadowRoot.getElementById('link-bug').dispatchEvent(new CustomEvent('
tap')); |
| 81 setTimeout(function() { |
| 82 var dialog = card.shadowRoot.getElementById('bugDialog'); |
| 83 assert.isTrue(dialog.opened); |
| 84 var fileBugLink = card.shadowRoot.getElementById('fileBugLink'); |
| 85 assert.equal(fileBugLink.href, 'https://code.google.com/p/chromium/issue
s/entry?status=Available&labels=Pri-2,gardening-blink&summary=Build%20failure&co
mment=Build%20is%20broken:%0aautobot%20unknown%0Ahttp%3A%2F%2Ftest-results.appsp
ot.com%2Fdashboards%2Fflakiness_dashboard.html%23tests%3Dunknown%26testType%3Dau
tobot%0A%0ARevision%20range%3A%0Ablink%20158544%20%3A%20158545%0A%0AFailing%20bu
ilders%3A%0AsomeBuilder%3A%20undefined%2Fbuilders%2FsomeBuilder%0A'); |
| 86 done(); |
| 87 }); |
| 88 }); |
| 89 |
79 it('remove bug link should work', function(done) { | 90 it('remove bug link should work', function(done) { |
80 group.setBug(123); | 91 group.setBug(123); |
81 card.shadowRoot.getElementById('link-bug').dispatchEvent(new CustomEvent('
tap')); | 92 card.shadowRoot.getElementById('link-bug').dispatchEvent(new CustomEvent('
tap')); |
82 setTimeout(function() { | 93 setTimeout(function() { |
83 var dialog = card.shadowRoot.getElementById('bugDialog'); | 94 var dialog = card.shadowRoot.getElementById('bugDialog'); |
84 assert.isTrue(dialog.opened); | 95 assert.isTrue(dialog.opened); |
85 card.shadowRoot.getElementById('dialogRemoveBug').dispatchEvent(new Cust
omEvent('tap')); | 96 card.shadowRoot.getElementById('dialogRemoveBug').dispatchEvent(new Cust
omEvent('tap')); |
86 setTimeout(function() { | 97 setTimeout(function() { |
87 assert.isUndefined(group.bug); | 98 assert.isUndefined(group.bug); |
88 assert.isUndefined(group.bugLabel); | 99 assert.isUndefined(group.bugLabel); |
89 done(); | 100 done(); |
90 }); | 101 }); |
91 }); | 102 }); |
92 }); | 103 }); |
93 }); | 104 }); |
94 | 105 |
95 }); | 106 }); |
96 | 107 |
97 })() | 108 })() |
98 </script> | 109 </script> |
OLD | NEW |