| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 3 Use of this source code is governed by a BSD-style license that can be |
| 4 found in the LICENSE file. | 4 found in the LICENSE file. |
| 5 --> | 5 --> |
| 6 | 6 |
| 7 <link rel="import" href="ct-commit.html"> | 7 <link rel="import" href="../ct-commit.html"> |
| 8 | 8 |
| 9 <link rel="import" href="../model/ct-commit-mock.html"> | 9 <link rel="import" href="../../model/ct-commit-mock.html"> |
| 10 | 10 |
| 11 <script> | 11 <script> |
| 12 (function () { | 12 (function () { |
| 13 | 13 |
| 14 module("ct-commit"); | 14 var assert = chai.assert; |
| 15 | 15 |
| 16 asyncTest("basic", 3, function() { | 16 describe('ct-commit', function() { |
| 17 var commit = document.createElement('ct-commit'); | 17 var commit; |
| 18 | 18 |
| 19 commit.data = new CTCommitMock(); | 19 beforeEach(function(done) { |
| 20 commit = document.createElement('ct-commit'); |
| 21 commit.data = new CTCommitMock(); |
| 20 | 22 |
| 21 requestAnimationFrame(function() { | 23 setTimeout(done); |
| 22 var html = commit.shadowRoot.innerHTML; | 24 }); |
| 23 | 25 |
| 24 equal(html.indexOf('mkwst') != -1, true); | 26 describe('commit UI', function() { |
| 25 equal(html.indexOf('behavior for these types') != -1, true); | 27 it('should show example commit', function() { |
| 26 equal(commit.shadowRoot.querySelector('a').href, commit.data.url); | 28 var html = commit.shadowRoot.innerHTML; |
| 27 | 29 |
| 28 start(); | 30 assert.include(html, 'mkwst'); |
| 31 assert.include(html, 'behavior for these types'); |
| 32 assert.equal(commit.shadowRoot.querySelector('a').href, commit.data.url); |
| 33 }); |
| 29 }); | 34 }); |
| 30 }); | 35 }); |
| 31 | 36 |
| 32 })() | 37 })() |
| 33 </script> | 38 </script> |
| OLD | NEW |