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

Side by Side Diff: Tools/TestResultServer/static-dashboards/load_failures_unittests.js

Issue 337433003: Switch buildershandler over to using the json mirror. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
« no previous file with comments | « Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js ('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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module('loadfailures'); 5 module('loadfailures');
6 6
7 test('htmlForBuilder', 1, function() { 7 test('htmlForBuilder', 1, function() {
8 var html = loadfailures._htmlForBuilder('MockBuilder', 'MockTestType', { 8 var html = loadfailures._htmlForBuilder('MockBuilder', 'MockTestType', {
9 'MockBuilder': new builders.BuilderMaster('MockMaster', 'http://mockbase path', [], []), 9 'MockBuilder': new builders.BuilderMaster({name: 'MockMaster', url_name: 'mock.master', tests: [], groups: []}),
10 }); 10 });
11 11
12 equal(html, '<tr class="builder">' + 12 equal(html, '<tr class="builder">' +
13 '<td>MockBuilder' + 13 '<td>MockBuilder' +
14 '<td><a href="http://test-results.appspot.com/testfile?testtype=MockTest Type&builder=MockBuilder&master=MockMaster">uploaded results</a>' + 14 '<td><a href="http://test-results.appspot.com/testfile?testtype=MockTest Type&builder=MockBuilder&master=MockMaster">uploaded results</a>' +
15 '<td><a href="http://mockbasepath/builders/MockBuilder">buildbot</a>' + 15 '<td><a href="http://mockbasepath/builders/MockBuilder">buildbot</a>' +
16 '</tr>'); 16 '</tr>');
17 }); 17 });
18 18
19 test('html', 5, function() { 19 test('html', 5, function() {
20 var mockBuilderMaster = new builders.BuilderMaster('MockMaster', 'http://moc kbasepath', [], []); 20 var mockBuilderMaster = new builders.BuilderMaster({name: 'MockMaster', url_ name: 'mock.master', tests: [], groups: []}),
21 var failureData = { 21 var failureData = {
22 '@ToT Chromium': { 22 '@ToT Chromium': {
23 failingBuilders: { 23 failingBuilders: {
24 'MockTestType': ['MockFailingBuilder'], 24 'MockTestType': ['MockFailingBuilder'],
25 }, 25 },
26 staleBuilders: { 26 staleBuilders: {
27 'MockTestType': ['MockStaleBuilder'], 27 'MockTestType': ['MockStaleBuilder'],
28 }, 28 },
29 testTypesWithNoSuccessfullLoads: [ 'MockTestType' ], 29 testTypesWithNoSuccessfullLoads: [ 'MockTestType' ],
30 builderToMaster: { 30 builderToMaster: {
(...skipping 19 matching lines...) Expand all
50 equal(container.querySelectorAll('h1').length, 2, 'There should be two group headers'); 50 equal(container.querySelectorAll('h1').length, 2, 'There should be two group headers');
51 equal(container.querySelectorAll('.builder').length, 3, 'There should be 3 b uilders'); 51 equal(container.querySelectorAll('.builder').length, 3, 'There should be 3 b uilders');
52 52
53 var firstFailingBuilder = container.querySelector('table').querySelector('tr :nth-child(2) > td:nth-child(2)'); 53 var firstFailingBuilder = container.querySelector('table').querySelector('tr :nth-child(2) > td:nth-child(2)');
54 equal(firstFailingBuilder.querySelector('b').innerHTML, 'No builders with up to date results.'); 54 equal(firstFailingBuilder.querySelector('b').innerHTML, 'No builders with up to date results.');
55 equal(firstFailingBuilder.querySelectorAll('.builder').length, 1, 'There sho uld be one failing builder in the first group.'); 55 equal(firstFailingBuilder.querySelectorAll('.builder').length, 1, 'There sho uld be one failing builder in the first group.');
56 56
57 var firstStaleBuilder = container.querySelector('table').querySelector('tr:n th-child(2) > td:nth-child(3)'); 57 var firstStaleBuilder = container.querySelector('table').querySelector('tr:n th-child(2) > td:nth-child(3)');
58 equal(firstFailingBuilder.querySelectorAll('.builder').length, 1, 'There sho uld be one stale builder in the first group.'); 58 equal(firstFailingBuilder.querySelectorAll('.builder').length, 1, 'There sho uld be one stale builder in the first group.');
59 }); 59 });
OLDNEW
« no previous file with comments | « Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698