| Index: Tools/GardeningServer/ui/test/ct-tree-status-tests.html
|
| diff --git a/Tools/GardeningServer/ui/test/ct-tree-status-tests.html b/Tools/GardeningServer/ui/test/ct-tree-status-tests.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1fdec2f48215b06d93daeba094096e08983f80ae
|
| --- /dev/null
|
| +++ b/Tools/GardeningServer/ui/test/ct-tree-status-tests.html
|
| @@ -0,0 +1,45 @@
|
| +<!--
|
| +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-tree-status.html">
|
| +
|
| +<script>
|
| +(function () {
|
| +
|
| +var assert = chai.assert;
|
| +
|
| +describe('ct-tree-status', function() {
|
| + it('should show statuses', function(done) {
|
| + var openTree = document.createElement("ct-tree-status");
|
| + var openTreeStatus = new TreeStatus('open-tree-project');
|
| + openTreeStatus.status = 'open';
|
| + openTree.status = openTreeStatus;
|
| +
|
| + var throttledTree = document.createElement("ct-tree-status");
|
| + var throttledTreeStatus = new TreeStatus('throttled-tree-project');
|
| + throttledTreeStatus.status = 'throttled';
|
| + throttledTreeStatus.message = 'Tree is throttled just for fun';
|
| + throttledTree.status = throttledTreeStatus;
|
| +
|
| + var closedTree = document.createElement("ct-tree-status");
|
| + var closedTreeStatus = new TreeStatus('closed-tree-project');
|
| + closedTreeStatus.status = 'closed';
|
| + closedTreeStatus.message = 'Tree is closed';
|
| + closedTree.status = closedTreeStatus;
|
| +
|
| + setTimeout(function() {
|
| + assert.notInclude(!openTree.shadowRoot.textContent, "open-tree-project");
|
| + assert.include(throttledTree.shadowRoot.textContent, "throttled-tree-project");
|
| + assert.include(closedTree.shadowRoot.textContent, "closed-tree-project");
|
| + assert.equal(closedTree.shadowRoot.querySelector('a').href, closedTreeStatus.url);
|
| +
|
| + done();
|
| + });
|
| + });
|
| +});
|
| +
|
| +})();
|
| + </script>
|
|
|