Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Side by Side Diff: Tools/GardeningServer/ui/test/ct-failure-stream-tests.html

Issue 455263002: Sheriff-o-matic: Display snoozed failure groups in a separate stream (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix ct-failure-stream-tests Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Tools/GardeningServer/ui/ct-unexpected-failures.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!--
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
4 found in the LICENSE file.
5 -->
6
7 <link rel="import" href="../ct-failure-stream.html">
8
9 <script>
10 (function () {
11
12 var assert = chai.assert;
13
14 describe('ct-failure-stream', function() {
15
16 var stream;
17
18 beforeEach(function(done) {
19 stream = document.createElement('ct-failure-stream');
20 setTimeout(done);
21 });
22
23 describe('default ui', function() {
24 it('should show failure groups', function(done) {
25 // FIXME: We should use some more interesting test data, but
26 // ct-failure-stream will give these values to ct-commit-data,
27 // which will hit the network unless we figure out how to mock
28 // out ct-commit-data in a better way.
29 stream.groups = [new CTFailureGroup('a', []), new CTFailureGroup('b', [])] ;
30 stream.category = 'default';
31 setTimeout(function() {
32 var cards = stream.shadowRoot.querySelectorAll('ct-failure-card');
33 assert.equal(cards.length, 2);
34 assert.equal(cards[0].group.key, 'a');
35 assert.equal(cards[1].group.key, 'b');
36 done();
37 });
38 });
39 });
40
41 describe('category', function() {
42 it('should only show failure groups for the specified category', function(do ne) {
43 stream.groups = [new CTFailureGroup('a', []), new CTFailureGroup('b', [], {snoozeTime: Date.now() + 1000 * 1000})];
44 stream.category = 'snoozed';
45 setTimeout(function() {
46 var cards = stream.shadowRoot.querySelectorAll('ct-failure-card');
47 assert.equal(cards.length, 1);
48 assert.equal(cards[0].group.key, 'b');
49 done();
50 });
51 });
52 });
53 });
54
55 })();
56 </script>
OLDNEW
« no previous file with comments | « Tools/GardeningServer/ui/ct-unexpected-failures.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698