Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: Tools/GardeningServer/ui/test/ct-bot-failure-card-tests.html

Issue 565523002: [Sheriff-o-matic] Refactor cards and get rid of ct-failure-cards (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix includes. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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-bot-failure-card.html">
8
9 <link rel="import" href="../../model/ct-commit-list-mock.html">
10 <link rel="import" href="../../model/ct-commit-log-mock.html">
11 <link rel="import" href="../../model/ct-failure-group.html">
12
13 <script>
14 (function () {
15
16 var assert = chai.assert;
17
18 describe('ct-bot-failure-card', function() {
19 var group;
20 var card;
21 var failures;
22
23 beforeEach(function(done) {
24 card = document.createElement('ct-bot-failure-card');
25 var cl = new CTCommitListMock();
26 group = new CTFailureGroup('', new CTSheriffFailureGroupData([
27 new CTFailure('autobot', 'unknown', {someBuilder: {key: 'a'}}, {'blink': 158547},
28 {'blink':158544})], cl));
29 card.group = group.data;
30 card.commitLog = new CTCommitLogMock();
31 setTimeout(done);
32 });
33
34 describe('failure card UI', function() {
35
36 it('should have commit summaries', function(done) {
37 // Expand the first repository so that the <ct-commit>'s are generated.
38 card.group.commitList.repositories[0].expanded = true;
39
40 setTimeout(function() {
41 var list = card.shadowRoot.querySelector('ct-commit-list');
42 var commits = list.shadowRoot.querySelectorAll('ct-commit');
43 assert(commits[1].data);
44 assert(commits[1].data.summary);
45 done();
46 });
47 });
48
49 it('removing a commit summary', function(done) {
50 card.commitLog.commits['blink']['158545'].summary = undefined;
51 card.group.commitList.repositories[0].expanded = true;
52
53 setTimeout(function() {
54 var list = card.shadowRoot.querySelector('ct-commit-list');
55 var commits = list.shadowRoot.querySelectorAll('ct-commit');
56 assert.notOk(commits[0].data.summary);
57 done();
58 });
59 });
60
61 });
62
63 });
64
65 })()
66 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698