diff options
Diffstat (limited to 'test/scenario/HtmlUISpec.js')
| -rw-r--r-- | test/scenario/HtmlUISpec.js | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/test/scenario/HtmlUISpec.js b/test/scenario/HtmlUISpec.js index b2e2652f..5b800fca 100644 --- a/test/scenario/HtmlUISpec.js +++ b/test/scenario/HtmlUISpec.js @@ -2,7 +2,7 @@ describe('angular.scenario.HtmlUI', function() { var ui; var context; var spec; - + beforeEach(function() { spec = { name: 'test spec', @@ -20,18 +20,18 @@ describe('angular.scenario.HtmlUI', function() { context = _jQuery("<div></div>"); ui = new angular.scenario.ui.Html(context); }); - + it('should create nested describe context', function() { ui.addSpec(spec); - expect(context.find('#describe-20 #describe-10 > h2').text()) - .toEqual('describe: child'); + expect(context.find('#describe-20 #describe-10 > h2').text()). + toEqual('describe: child'); expect(context.find('#describe-20 > h2').text()).toEqual('describe: parent'); - expect(context.find('#describe-10 .tests > li .test-info .test-name').text()) - .toEqual('it test spec'); - expect(context.find('#describe-10 .tests > li').hasClass('status-pending')) - .toBeTruthy(); + expect(context.find('#describe-10 .tests > li .test-info .test-name').text()). + toEqual('it test spec'); + expect(context.find('#describe-10 .tests > li').hasClass('status-pending')). + toBeTruthy(); }); - + it('should update totals when steps complete', function() { // Error ui.addSpec(spec).error('error'); @@ -55,31 +55,31 @@ describe('angular.scenario.HtmlUI', function() { specUI = ui.addSpec(spec); specUI.addStep('some step').finish(); specUI.finish(); - - expect(parseInt(context.find('#status-legend .status-failure').text())) - .toEqual(3); - expect(parseInt(context.find('#status-legend .status-error').text())) - .toEqual(2); - expect(parseInt(context.find('#status-legend .status-success').text())) - .toEqual(1); + + expect(parseInt(context.find('#status-legend .status-failure').text(), 10)). + toEqual(3); + expect(parseInt(context.find('#status-legend .status-error').text(), 10)). + toEqual(2); + expect(parseInt(context.find('#status-legend .status-success').text(), 10)). + toEqual(1); }); - + it('should update timer when test completes', function() { // Success specUI = ui.addSpec(spec); specUI.addStep('some step').finish(); specUI.finish(); - + // Failure specUI = ui.addSpec(spec); specUI.addStep('some step').finish('failure'); specUI.finish('failure'); - + // Error specUI = ui.addSpec(spec).error('error'); - - context.find('#describe-10 .tests > li .test-info .timer-result') - .each(function(index, timer) { + + context.find('#describe-10 .tests > li .test-info .timer-result'). + each(function(index, timer) { expect(timer.innerHTML).toMatch(/ms$/); }); }); |
