From 40d7e66f408eaaa66efd8d7934ab2eb3324236a1 Mon Sep 17 00:00:00 2001 From: Elliott Sprehn Date: Sun, 24 Oct 2010 14:14:45 -0700 Subject: Lots of bug fixes in the scenario runner and a bunch of new features. - By default the runner now creates multiple output formats as it runs. Nodes are created in the DOM with ids: json, xml, and html. ex. $('#json').html() => json output of the runner ex. $('#xml').html() => json output of the runner $result is also an object tree result. The permitted formats are html,json,xml,object. If you don't want certain formats you can select specific ones with the new ng:scenario-output attribute on the script tag. '); - } - - function addCSS(path) { - document.write(''); - } - - window.onload = function(){ - try { - if (previousOnLoad) previousOnLoad(); - } catch(e) {} - _jQuery(document.body).append( - '
' + - '' - ); - var frame = _jQuery('#frame'); - var runner = _jQuery('#runner'); - var application = new angular.scenario.Application(frame); - var ui = new angular.scenario.ui.Html(runner); - $scenario.run(ui, application, angular.scenario.SpecRunner, function(error) { - frame.remove(); - if (error) { - if (window.console) { - console.log(error.stack || error); - } else { - // Do something for IE - alert(error); - } - } - }); - }; - - addCSS("../../css/angular-scenario.css"); - addScript("../../lib/jquery/jquery-1.4.2.js"); - document.write( - '' - ); - addScript("../angular-bootstrap.js"); - - addScript("Scenario.js"); - addScript("Application.js"); - addScript("Describe.js"); - addScript("Future.js"); - addScript("HtmlUI.js"); - addScript("Runner.js"); - addScript("SpecRunner.js"); - addScript("dsl.js"); - addScript("matchers.js"); - - // Create the runner (which also sets up the global API) - document.write( - '' - ); - -})(window.onload); -- cgit v1.2.3