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

Unified Diff: Tools/GardeningServer/ui/test/ct-unexpected-failures-tests.html

Issue 530613002: Fix partytime. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address review comments Created 6 years, 3 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
« no previous file with comments | « Tools/GardeningServer/ui/test/ct-results-panel-tests.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/GardeningServer/ui/test/ct-unexpected-failures-tests.html
diff --git a/Tools/GardeningServer/ui/test/ct-unexpected-failures-tests.html b/Tools/GardeningServer/ui/test/ct-unexpected-failures-tests.html
new file mode 100644
index 0000000000000000000000000000000000000000..bedb3881a43f04f264afb6785bfdc18fab730912
--- /dev/null
+++ b/Tools/GardeningServer/ui/test/ct-unexpected-failures-tests.html
@@ -0,0 +1,71 @@
+<!--
+Copyright 2014 The Chromium Authors. All rights reserved.
+Use of this source code is governed by a BSD-style license that can be
+found in the LICENSE file.
+-->
+
+<link rel='import' href='../ct-unexpected-failures.html'>
+
+<link rel="import" href="../../model/ct-commit-list.html">
+<link rel="import" href="../../model/ct-failures.html">
+
+<script>
+(function () {
+
+var assert = chai.assert;
+
+describe('ct-unexpected-failures', function() {
+ it('test showing partytime with no CTFailures', function(done) {
+ var noFailures = document.createElement('ct-unexpected-failures');
+ setTimeout(function() {
+ assert.notOk(noFailures.shadowRoot.querySelector('ct-party-time'));
+ done();
+ });
+ });
+
+ it('test showing partytime with no failures for the selected tree', function(done) {
+ var noFailuresForTree = document.createElement('ct-unexpected-failures');
+ noFailuresForTree.failures = new CTFailures(new CTCommitList(undefined, []));
+ noFailuresForTree.failures.failures = {
+ othertree: [new CTFailure('step', 'reason', [])]
+ };
+ noFailuresForTree.tree = 'mocktree';
+
+ setTimeout(function() {
+ assert.ok(noFailuresForTree.shadowRoot.querySelector('ct-party-time'));
+ done();
+ });
+ });
+
+ it('test showing partytime with no failures in this tree\'s list', function(done) {
+ var noFailuresByLength = document.createElement('ct-unexpected-failures');
+ noFailuresByLength.failures = new CTFailures(new CTCommitList(undefined, []));
+ noFailuresByLength.failures.failures = {
+ mocktree: []
+ };
+ noFailuresByLength.tree = 'mocktree';
+
+ setTimeout(function() {
+ assert.ok(noFailuresByLength.shadowRoot.querySelector('ct-party-time'));
+ done();
+ });
+ });
+
+ it('test showing partytime with failures for this tree', function(done) {
+ var hasFailures = document.createElement('ct-unexpected-failures');
+ hasFailures.failures = new CTFailures(new CTCommitList(undefined, []));
+ hasFailures.failures.failures = {
+ mocktree: [new CTFailure('step', 'reason', [])]
+ };
+ hasFailures.tree = 'mocktree';
+
+ setTimeout(function() {
+ assert.notOk(hasFailures.shadowRoot.querySelector('ct-party-time'));
+
+ done();
+ });
+ });
+});
+
+})();
+</script>
« no previous file with comments | « Tools/GardeningServer/ui/test/ct-results-panel-tests.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698