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

Side by Side Diff: Tools/GardeningServer/model/test/ct-failure-group-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
OLDNEW
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-group.html"> 7 <link rel="import" href="../ct-failure-group.html">
8 8
9 <script> 9 <script>
10 (function () { 10 (function () {
11 11
12 var assert = chai.assert; 12 var assert = chai.assert;
13 13
14 describe('ct-failure-group', function() { 14 describe('ct-failure-group', function() {
15 15
16 beforeEach(function() { 16 beforeEach(function() {
17 localStorage.removeItem('CTFailureGroupAnnotations'); 17 localStorage.removeItem('CTFailureGroupAnnotations');
18 }); 18 });
19 19
20 describe('category', function() {
21 it('should be "default" by default', function() {
22 var group = new CTFailureGroup('key', []);
23 assert.equal(group.category, 'default');
24 });
25
26 it('should be "snoozed" when snoozed', function() {
27 var group = new CTFailureGroup('key', [], {snoozeTime: Date.now() + 1000 * 1000});
28 assert.equal(group.category, 'snoozed');
29 });
30 });
31
20 describe('snooze', function() { 32 describe('snooze', function() {
21 it('should set isSnoozed', function(done) { 33 it('should set isSnoozed', function(done) {
22 var group = new CTFailureGroup('key', []); 34 var group = new CTFailureGroup('key', []);
23 group.snoozeUntil(Date.now() + 1000 * 1000).then(function() { 35 group.snoozeUntil(Date.now() + 1000 * 1000).then(function() {
24 assert.isTrue(group.isSnoozed); 36 assert.isTrue(group.isSnoozed);
25 done(); 37 done();
26 }); 38 });
27 }); 39 });
28 }); 40 });
29 41
(...skipping 28 matching lines...) Expand all
58 assert.deepEqual(annotations['key'], {snoozeTime: 123}); 70 assert.deepEqual(annotations['key'], {snoozeTime: 123});
59 done(); 71 done();
60 }); 72 });
61 }); 73 });
62 }); 74 });
63 }); 75 });
64 }); 76 });
65 77
66 })() 78 })()
67 </script> 79 </script>
OLDNEW
« no previous file with comments | « Tools/GardeningServer/model/ct-failure-group.html ('k') | Tools/GardeningServer/run-unittests.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698