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
4 found in the LICENSE file.
7 <link rel="import" href="../ct-tree-status.html">
12 var assert = chai.assert;
14 describe('ct-tree-status', function() {
15 it('should show statuses', function(done) {
16 var openTree = document.createElement("ct-tree-status");
17 var openTreeStatus = new TreeStatus('open-tree-project');
18 openTreeStatus.status = 'open';
19 openTree.status = openTreeStatus;
21 var throttledTree = document.createElement("ct-tree-status");
22 var throttledTreeStatus = new TreeStatus('throttled-tree-project');
23 throttledTreeStatus.status = 'throttled';
24 throttledTreeStatus.message = 'Tree is throttled just for fun';
25 throttledTree.status = throttledTreeStatus;
27 var closedTree = document.createElement("ct-tree-status");
28 var closedTreeStatus = new TreeStatus('closed-tree-project');
29 closedTreeStatus.status = 'closed';
30 closedTreeStatus.message = 'Tree is closed';
31 closedTree.status = closedTreeStatus;
33 setTimeout(function() {
34 assert.notInclude(!openTree.shadowRoot.textContent, "open-tree-project");
35 assert.include(throttledTree.shadowRoot.textContent, "throttled-tree-project");
36 assert.include(closedTree.shadowRoot.textContent, "closed-tree-project");
37 assert.equal(closedTree.shadowRoot.querySelector('a').href, closedTreeStatus.url);