diff options
| author | Julie | 2012-10-09 11:13:26 -0700 | 
|---|---|---|
| committer | Igor Minar | 2013-02-07 04:09:52 -0800 | 
| commit | d46fe3c23fa269dcc10249148f2af14f3db6b066 (patch) | |
| tree | b5c30f1526eeb3a51c1fc57803353c818cd41bf3 /test/ngScenario/output | |
| parent | 92ca7efaa4bc4f37da3008b234e19343a1fa4207 (diff) | |
| download | angular.js-d46fe3c23fa269dcc10249148f2af14f3db6b066.tar.bz2 | |
fix(scenario): include error messages in XML output
Fix the XML output of scenario tests so that it properly includes error
messages from failing specs.
Diffstat (limited to 'test/ngScenario/output')
| -rw-r--r-- | test/ngScenario/output/xmlSpec.js | 15 | 
1 files changed, 14 insertions, 1 deletions
diff --git a/test/ngScenario/output/xmlSpec.js b/test/ngScenario/output/xmlSpec.js index 94c3cb5a..32646417 100644 --- a/test/ngScenario/output/xmlSpec.js +++ b/test/ngScenario/output/xmlSpec.js @@ -1,6 +1,6 @@  'use strict'; -describe('angular.scenario.output.json', function() { +describe('angular.scenario.output.xml', function() {    var output, context;    var runner, model, $window;    var spec, step; @@ -33,4 +33,17 @@ describe('angular.scenario.output.json', function() {      expect(context.find('it').attr('status')).toEqual('success');      expect(context.find('it step').attr('status')).toEqual('success');    }); + +  it('should output errors to the XML', function() { +    runner.emit('SpecBegin', spec); +    runner.emit('StepBegin', spec, step); +    runner.emit('StepFailure', spec, step, 'error reason'); +    runner.emit('StepEnd', spec, step); +    runner.emit('SpecEnd', spec); +    runner.emit('RunnerEnd'); + +    expect(context.find('it').attr('status')).toEqual('failure'); +    expect(context.find('it step').attr('status')).toEqual('failure'); +    expect(context.find('it step').text()).toEqual('error reason'); +  });  });  | 
