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

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

Issue 476903004: [sheriff-o-matic]: Basic trooper display for sheriff-o-matic. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« no previous file with comments | « Tools/GardeningServer/ui/test/ct-tree-status-tests.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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-trooper-card.html">
8
9 <link rel="import" href="../../model/ct-trooper-failure-group-data.html">
10
11 <script>
12 (function () {
13
14 var assert = chai.assert;
15
16 describe('ct-trooper-card', function() {
17
18 var card;
19
20 beforeEach(function(done) {
21 card = document.createElement('ct-trooper-card');
22 setTimeout(done);
23 });
24
25 it('creates a chart for cq_latency data types', function(done) {
26 var data = new CTTrooperFailureGroupData('detail', 'url', {p50: 0, p90: 0}, 'cq_latency', 'blink');
27 card.group = data;
28 var chart = card.querySelector('::shadow ct-chart::shadow #chart');
29 var initialState = chart.toDataURL();
30 var initialChildren = chart.children.length;
31 setTimeout(function() {
32 assert(chart.toDataURL() != initialState, "setting card data didn't update chart");
33 done();
34 });
35 });
36
37 it('creates a chart for tree_status data types', function(done) {
38 var data = new CTTrooperFailureGroupData('detail', 'url', {percent_open: 0}, 'tree_status', 'blink');
39 card.group = data;
40 var chart = card.querySelector('::shadow ct-chart::shadow #chart');
41 var initialState = chart.toDataURL();
42 setTimeout(function() {
43 assert(chart.toDataURL() != initialState, "setting card data didn't update chart");
44 done();
45 });
46 });
47
48 it('creates a chart for cycle_time data types', function(done) {
49 var data = new CTTrooperFailureGroupData('detail', 'url', {percent_over_medi an_slo: '0%', percent_over_max_slo: '0%'},
50 'cycle_time', 'blink');
51 card.group = data;
52 var chart = card.querySelector('::shadow ct-chart::shadow #chart');
53 var initialState = chart.toDataURL();
54 setTimeout(function() {
55 assert(chart.toDataURL() != initialState, "setting card data didn't update chart");
56 done();
57 });
58 });
59 });
60
61 })();
62 </script>
OLDNEW
« no previous file with comments | « Tools/GardeningServer/ui/test/ct-tree-status-tests.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698