OLD | NEW |
| (Empty) |
1 <!-- | |
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. | |
5 --> | |
6 | |
7 <link rel="import" href="../ct-commit-list.html"> | |
8 | |
9 <link rel="import" href="../../model/ct-commit-list-mock.html"> | |
10 | |
11 <script> | |
12 (function () { | |
13 | |
14 var assert = chai.assert; | |
15 | |
16 describe('ct-commit-list', function() { | |
17 var list; | |
18 | |
19 beforeEach(function(done) { | |
20 list = document.createElement('ct-commit-list'); | |
21 setTimeout(done); | |
22 }); | |
23 | |
24 describe('commit list UI', function() { | |
25 beforeEach(function(done) { | |
26 list.commitList = new CTCommitListMock(); | |
27 setTimeout(done); | |
28 }); | |
29 | |
30 it('should show no commits by default', function() { | |
31 var commits = list.shadowRoot.querySelectorAll('ct-commit'); | |
32 assert.lengthOf(commits, 0); | |
33 }); | |
34 | |
35 describe('expanded test', function() { | |
36 beforeEach(function(done) { | |
37 list.commitList.repositories.first().expanded = true; | |
38 setTimeout(done); | |
39 }); | |
40 | |
41 it('should show commit when expanded', function() { | |
42 assert.lengthOf(list.shadowRoot.querySelectorAll('ct-commit'), 2); | |
43 }); | |
44 }); | |
45 }); | |
46 }); | |
47 | |
48 })() | |
49 </script> | |
OLD | NEW |