From 1abdc097b235366759a889bdcc68359653a9b8a3 Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Thu, 19 May 2011 17:33:25 +0200 Subject: JSTD adapter for running e2e tests Couple of changes into angular.scenario runner: - add autotest config (runs tests when document ready) - update ObjectModel (forwards events) - use only one ObjectModel instance for all outputters - expose error msg and line number in ObjectModel.Spec and ObjectModel.Step - fix generating spec.ids - fix 'html' output so that it does not mutate ObjectModel Couple of changes into docs / generator: - rename copy -> copyTpl - move docs/static into docs/examples (to avoid conflict with jstd proxy) Running all docs e2e tests: ======================================================== 1/ compile angular-scenario, jstd-scenario-adapter >> rake compile 2/ build docs >> rake docs 3/ start jstd server >> ./server-scenario.sh 4/ capture some browser 5/ run node server to serve static content >> node ../lib/nodeserver/server.js 6/ run tests >> ./test-scenario.sh --- src/scenario/output/Html.js | 48 +++++++++++++++++++++++-------------------- src/scenario/output/Json.js | 6 ++---- src/scenario/output/Object.js | 4 ++-- src/scenario/output/Xml.js | 5 ++--- 4 files changed, 32 insertions(+), 31 deletions(-) (limited to 'src/scenario/output') diff --git a/src/scenario/output/Html.js b/src/scenario/output/Html.js index 6e2e20f3..ccf7db6f 100644 --- a/src/scenario/output/Html.js +++ b/src/scenario/output/Html.js @@ -4,8 +4,9 @@ * TODO(esprehn): This should be refactored now that ObjectModel exists * to use angular bindings for the UI. */ -angular.scenario.output('html', function(context, runner) { - var model = new angular.scenario.ObjectModel(runner); +angular.scenario.output('html', function(context, runner, model) { + var specUiMap = {}, + lastStepUiMap = {}; context.append( '