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

Unified Diff: Tools/GardeningServer/model/test/ct-failure-group-tests.html

Issue 476903003: Add a "Link Bug" button to associate a bug with a failure (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: Tools/GardeningServer/model/test/ct-failure-group-tests.html
diff --git a/Tools/GardeningServer/model/test/ct-failure-group-tests.html b/Tools/GardeningServer/model/test/ct-failure-group-tests.html
index 7b6cdd533d9d60cfe0e4ee7ea530bdd1e9e7d83a..5d818ef8282b49eb56abab06a1cab1cde215bf00 100644
--- a/Tools/GardeningServer/model/test/ct-failure-group-tests.html
+++ b/Tools/GardeningServer/model/test/ct-failure-group-tests.html
@@ -39,6 +39,17 @@ describe('ct-failure-group', function() {
});
});
+ describe('setBug', function() {
+ it('should store the bug and set hasBug', function(done) {
+ var group = new CTFailureGroup('key', []);
+ group.setBug(123).then(function() {
+ assert.isTrue(group.hasBug);
+ assert.equal(group.annotation.bugNumber, 123);
+ done();
+ });
+ });
+ });
+
describe('annotations', function() {
it('should have sensible defaults', function() {
var group = new CTFailureGroup('key', []);
@@ -47,16 +58,19 @@ describe('ct-failure-group', function() {
});
it('should compute properties', function() {
- var group = new CTFailureGroup('key', [], {snoozeTime: Date.now() + 1000 * 1000});
+ var group = new CTFailureGroup('key', [], {snoozeTime: Date.now() + 1000 * 1000, bugNumber: 123});
assert.isTrue(group.isSnoozed);
+ assert.isTrue(group.hasBug);
});
it('should be persisted', function(done) {
var group = new CTFailureGroup('key', []);
group.snoozeUntil(123).then(function() {
- CTFailureGroup.fetchAnnotations().then(function(annotations) {
- assert.deepEqual(annotations['key'], {snoozeTime: 123});
- done();
+ group.setBug(456).then(function() {
+ CTFailureGroup.fetchAnnotations().then(function(annotations) {
+ assert.deepEqual(annotations['key'], {snoozeTime: 123, bugNumber: 456});
+ done();
+ });
});
});
});

Powered by Google App Engine
This is Rietveld 408576698