diff options
| author | Misko Hevery | 2010-10-26 15:35:58 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-10-26 16:33:59 -0700 |
| commit | 9c0225512c63ebfc37e6408cc155d9da1fe682c9 (patch) | |
| tree | 4973f6c57b801c71cbc93d7d993887ff6d3f9558 /src/scenario/output | |
| parent | 40d7e66f408eaaa66efd8d7934ab2eb3324236a1 (diff) | |
| download | angular.js-9c0225512c63ebfc37e6408cc155d9da1fe682c9.tar.bz2 | |
fixes IE related failures, and form submit event handling in ie
Diffstat (limited to 'src/scenario/output')
| -rw-r--r-- | src/scenario/output/Xml.js | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/scenario/output/Xml.js b/src/scenario/output/Xml.js index 47d98c78..cbc55ee7 100644 --- a/src/scenario/output/Xml.js +++ b/src/scenario/output/Xml.js @@ -3,10 +3,11 @@ */ angular.scenario.output('xml', function(context, runner) { var model = new angular.scenario.ObjectModel(runner); - + var $ = function(args) {return new context.init(args);}; runner.on('RunnerEnd', function() { - context.append('<scenario></scenario>'); - serializeXml(context.find('> scenario'), model.value); + var scenario = $('<scenario></scenario>'); + context.append(scenario); + serializeXml(scenario, model.value); }); /** @@ -17,30 +18,31 @@ angular.scenario.output('xml', function(context, runner) { */ function serializeXml(context, tree) { angular.foreach(tree.children, function(child) { - context.append('<describe></describe>'); - var describeContext = context.find('> describe:last'); + var describeContext = $('<describe></describe>'); describeContext.attr('id', child.id); describeContext.attr('name', child.name); + context.append(describeContext); serializeXml(describeContext, child); }); - context.append('<its></its>'); - context = context.find('> its'); + var its = $('<its></its>'); + context.append(its); angular.foreach(tree.specs, function(spec) { - context.append('<it></it>') - var specContext = context.find('> it:last'); - specContext.attr('id', spec.id); - specContext.attr('name', spec.name); - specContext.attr('duration', spec.duration); - specContext.attr('status', spec.status); + var it = $('<it></it>'); + it.attr('id', spec.id); + it.attr('name', spec.name); + it.attr('duration', spec.duration); + it.attr('status', spec.status); + its.append(it); angular.foreach(spec.steps, function(step) { - specContext.append('<step></step>'); - var stepContext = specContext.find('> step:last'); + var stepContext = $('<step></step>'); stepContext.attr('name', step.name); stepContext.attr('duration', step.duration); stepContext.attr('status', step.status); + it.append(stepContext); if (step.error) { - stepContext.append('<error></error'); - stepContext.find('error').text(formatException(step.error)); + var error = $('<error></error'); + stepContext.append(error); + error.text(formatException(stepContext.error)); } }); }); |
