Chromium Code Reviews| Index: Tools/GardeningServer/ui/test/ct-unexpected-failures-tests.html |
| diff --git a/Tools/GardeningServer/ui/test/ct-unexpected-failures-tests.html b/Tools/GardeningServer/ui/test/ct-unexpected-failures-tests.html |
| index b35a8318157d9bd6291aac4126ed69b53031af01..198e20620923d4d9a913bc7a02dc61e34a71fdf2 100644 |
| --- a/Tools/GardeningServer/ui/test/ct-unexpected-failures-tests.html |
| +++ b/Tools/GardeningServer/ui/test/ct-unexpected-failures-tests.html |
| @@ -65,6 +65,69 @@ describe('ct-unexpected-failures', function() { |
| done(); |
| }); |
| }); |
| + |
| + it('test showing only chromium tree status when chromium', function(done) { |
| + var hasFailures = document.createElement('ct-unexpected-failures'); |
| + hasFailures.failures = new CTFailures(new CTCommitList(undefined, [])); |
|
ojan
2014/10/09 01:58:57
Why do we need the failures at all, including the
fgorski
2014/10/10 20:14:59
Good point, failures are only impacting visibility
|
| + hasFailures.failures.failures = { |
| + chromium: [new CTStepFailure('step', 'reason', [])], |
| + blink: [new CTStepFailure('step', 'reason', [])] |
| + }; |
| + hasFailures.tree = 'chromium'; |
| + |
| + setTimeout(function() { |
| + assert.equal(hasFailures.shadowRoot.querySelectorAll('ct-tree-status').length, 1); |
| + |
| + done(); |
| + }); |
| + }); |
| + |
| + it('test showing both chromium and blink tree status when blink (both fail)', function(done) { |
| + var hasFailures = document.createElement('ct-unexpected-failures'); |
| + hasFailures.failures = new CTFailures(new CTCommitList(undefined, [])); |
| + hasFailures.failures.failures = { |
| + chromium: [new CTStepFailure('step', 'reason', [])], |
| + blink: [new CTStepFailure('step', 'reason', [])] |
| + }; |
| + hasFailures.tree = 'blink'; |
| + |
| + setTimeout(function() { |
| + assert.equal(hasFailures.shadowRoot.querySelectorAll('ct-tree-status').length, 2); |
| + |
| + done(); |
| + }); |
| + }); |
| + |
| + it('test showing both chromium and blink tree status when blink (blink fails)', function(done) { |
| + var hasFailures = document.createElement('ct-unexpected-failures'); |
| + hasFailures.failures = new CTFailures(new CTCommitList(undefined, [])); |
| + hasFailures.failures.failures = { |
| + blink: [new CTStepFailure('step', 'reason', [])] |
| + }; |
| + hasFailures.tree = 'blink'; |
| + |
| + setTimeout(function() { |
| + assert.equal(hasFailures.shadowRoot.querySelectorAll('ct-tree-status').length, 2); |
| + |
| + done(); |
| + }); |
| + }); |
| + |
| + it('test showing both chromium and blink tree status when blink (chromium fails)', function(done) { |
| + var hasFailures = document.createElement('ct-unexpected-failures'); |
| + hasFailures.failures = new CTFailures(new CTCommitList(undefined, [])); |
| + hasFailures.failures.failures = { |
| + chromium: [new CTStepFailure('step', 'reason', [])] |
| + }; |
| + hasFailures.tree = 'blink'; |
| + |
| + setTimeout(function() { |
| + assert.equal(hasFailures.shadowRoot.querySelectorAll('ct-tree-status').length, 2); |
| + |
| + done(); |
| + }); |
| + }); |
| + |
| }); |
| })(); |