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

Unified Diff: Tools/GardeningServer/ui/test/ct-failure-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, 4 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 side-by-side diff with in-line comments
Download patch
Index: Tools/GardeningServer/ui/test/ct-failure-card-tests.html
diff --git a/Tools/GardeningServer/ui/test/ct-failure-card-tests.html b/Tools/GardeningServer/ui/test/ct-failure-card-tests.html
index e60baee3df35d115e3b91c0cc0aab867f866e60f..fa4a84f9e27483688491471361e21af01a1e9ca2 100644
--- a/Tools/GardeningServer/ui/test/ct-failure-card-tests.html
+++ b/Tools/GardeningServer/ui/test/ct-failure-card-tests.html
@@ -33,12 +33,36 @@ describe('ct-failure-card', function() {
describe('failure card UI', function() {
+ it('should select the correct card type', function(done) {
+ assert(card.shadowRoot.querySelector('ct-sheriff-card',
+ 'missing sheriff card') != null);
ojan 2014/09/02 02:35:11 This explanatory string is in the wrong place.
shans 2014/09/04 01:59:43 Done.
+ card.group = new CTTrooperFailureGroup({percent_over_median_slo: '6%',
+ percent_over_max_slo: '7%'}, 'cq_latency', '');
+ setTimeout(function() {
+ assert(card.shadowRoot.querySelector('ct-cq-latency-card') != null,
+ 'missing cq-latency card');
+ card.group.type = 'tree_status';
+ setTimeout(function() {
+ assert(card.shadowRoot.querySelector('ct-tree-status-card') !=
+ null, 'missing tree-status card');
+ card.group.type = 'cycle_time';
+ setTimeout(function() {
+ assert(card.shadowRoot.querySelector('ct-cycle-time-card') !=
+ null, 'missing cycle-time card');
+ // Suppress leaked global warning from third-party library.
+ delete __googleVisualizationAbstractRendererElementsCount__;
+ done();
+ });
+ });
+ });
+ });
+
it('should have commit summaries', function(done) {
// Expand the first repository so that the <ct-commit>'s are generated.
card.group.commitList.repositories[0].expanded = true;
setTimeout(function() {
- var list = card.shadowRoot.querySelector('ct-commit-list');
+ var list = card.shadowRoot.querySelector('::shadow ct-commit-list');
var commits = list.shadowRoot.querySelectorAll('ct-commit');
assert(commits[1].data);
assert(commits[1].data.summary);
@@ -51,7 +75,7 @@ describe('ct-failure-card', function() {
card.group.commitList.repositories[0].expanded = true;
setTimeout(function() {
- var list = card.shadowRoot.querySelector('ct-commit-list');
+ var list = card.shadowRoot.querySelector('::shadow ct-commit-list');
var commits = list.shadowRoot.querySelectorAll('ct-commit');
assert.notOk(commits[0].data.summary);
done();

Powered by Google App Engine
This is Rietveld 408576698