Index: Tools/GardeningServer/ui/test/ct-party-time-tests.html |
diff --git a/Tools/GardeningServer/ui/test/ct-commit-tests.html b/Tools/GardeningServer/ui/test/ct-party-time-tests.html |
similarity index 29% |
copy from Tools/GardeningServer/ui/test/ct-commit-tests.html |
copy to Tools/GardeningServer/ui/test/ct-party-time-tests.html |
index 2154f3c447ef474ed909f46da76489d25d07eb03..cb96f5bfc0d1616dca11c8dbeadfe19cfb9d88c0 100644 |
--- a/Tools/GardeningServer/ui/test/ct-commit-tests.html |
+++ b/Tools/GardeningServer/ui/test/ct-party-time-tests.html |
@@ -4,34 +4,47 @@ 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-commit.html"> |
- |
-<link rel="import" href="../../model/ct-commit-mock.html"> |
+<link rel="import" href="../ct-party-time.html"> |
<script> |
(function () { |
var assert = chai.assert; |
-describe('ct-commit', function() { |
- var commit; |
+describe('ct-party-time', function() { |
+ var partyTime; |
+ var blinkFailures; |
beforeEach(function(done) { |
- commit = document.createElement('ct-commit'); |
- commit.data = new CTCommitMock(); |
+ partyTime = document.createElement('ct-party-time'); |
+ |
+ partyTime.failures = { blink: blinkFailures }; |
+ partyTime.tree = 'blink'; |
setTimeout(done); |
}); |
- describe('commit UI', function() { |
- it('should show example commit', function() { |
- var html = commit.shadowRoot.innerHTML; |
+ describe('party time: party', function() { |
+ before(function() { |
+ blinkFailures = []; |
+ }); |
- assert.include(html, 'mkwst'); |
- assert.include(html, 'behavior for these types'); |
- assert.equal(commit.shadowRoot.querySelector('a').href, commit.data.url); |
+ it('should have a party', function() { |
+ assert(partyTime._partytime); |
}); |
}); |
+ |
+ describe('party time: no party', function() { |
+ before(function() { |
+ var resultsByBuilder = {}; |
+ blinkFailures = [new CTFailure("step1", "reason1", resultsByBuilder, 123, 123)]; |
+ }); |
+ |
+ it('should not have a party', function() { |
+ assert(!partyTime._partytime); |
+ }); |
+ |
+ }); |
}); |
})() |