--- a/.hgignore Thu Mar 06 21:49:28 2014 +0000
+++ b/.hgignore Fri Mar 07 09:36:04 2014 +0100
@@ -17,4 +17,5 @@
urls_local.py
dev/.vagrant
dev/custom.yaml
-web/
+src/cm/scripts/test-suite/node_modules
+src/cm/scripts/test-suite//workspace.info.js
--- a/src/cm/scripts/test-suite/karma.conf.js Thu Mar 06 21:49:28 2014 +0000
+++ b/src/cm/scripts/test-suite/karma.conf.js Fri Mar 07 09:36:04 2014 +0100
@@ -1,6 +1,7 @@
// Karma configuration
// Generated on Wed Jan 29 2014 15:32:16 GMT+0100 (CET)
+
// SID: get WORKSPACE_URL configuration from one single file to customize
var w = require ('./workspace.info.js');
@@ -17,7 +18,7 @@
// - Firefox ; Safari (only Mac; run `npm install karma-safari-launcher` first)
// - Chrome ; ChromeCanary ; Opera (run `npm install karma-opera-launcher` first)
// - PhantomJS ; IE (only Windows; run `npm install karma-ie-launcher` first)
- browsers: ['Chrome'],
+ browsers: w.BROWSERS,
// frameworks to use. SID: choosen mocha, added karma-e2e-dsl (end-to-end testing)
frameworks: ['mocha', 'karma-e2e-dsl'],
// SID: Karma will start and run somewhere else than '/', to allow proxying '/'
--- a/src/cm/scripts/test-suite/start-test-suite.sh Thu Mar 06 21:49:28 2014 +0000
+++ b/src/cm/scripts/test-suite/start-test-suite.sh Fri Mar 07 09:36:04 2014 +0100
@@ -1,5 +1,17 @@
#!/bin/bash
-export CHROME_BIN=`whereis chromium | sed -r 's/[^ ]* ([^ ]*).*/\1/g' -`
-karma start
+export CHROME_BIN= `which chromium`
+if [ -z "$CHROME_BIN" ]; then
+ export CHROME_BIN=`which chrome`
+fi
+export PHANTOMJS_BIN=`which phantomjs`
+if [ -x ./node_modules/.bin/karma ]; then
+ KARMA=./node_modules/.bin/karma
+else
+ KARMA=`which karma`
+fi
+
+"$KARMA" start
+
+
--- a/src/cm/scripts/test-suite/workspace.info.js Thu Mar 06 21:49:28 2014 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-
-define ("WORKSPACE_URL", 'http://192.168.2.61:8000/');
-define ("USER_ADMIN", 'siltaar');
-define ("PASS_ADMIN", 'oaueoaue');
-
-// TODO: decide wether we should populate workspaces with standard users or
-// create them on the fly ?
-
-define ("USER_EDIT", '');
-define ("PASS_EDIT", '');
-
-define ("USER_COM", '');
-define ("PASS_COM", '');
-
-define ("USER_OBSERV", '');
-define ("PASS_OBSERV", '');
-
-function define (name, value) {
- Object.defineProperty (exports, name, {
- value: value,
- enumerable: true
- });
-}
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/cm/scripts/test-suite/workspace.info.js.tmpl Fri Mar 07 09:36:04 2014 +0100
@@ -0,0 +1,27 @@
+
+define ("WORKSPACE_URL", '<workspace-url>');
+define ("USER_ADMIN", '<admin-login>');
+define ("PASS_ADMIN", '<admin-password>');
+
+define ("BROWSERS", ['Chrome']);
+
+// TODO: decide wether we should populate workspaces with standard users or
+// create them on the fly ?
+
+define ("USER_EDIT", '');
+define ("PASS_EDIT", '');
+
+define ("USER_COM", '');
+define ("PASS_COM", '');
+
+define ("USER_OBSERV", '');
+define ("PASS_OBSERV", '');
+
+function define (name, value) {
+ Object.defineProperty (exports, name, {
+ value: value,
+ enumerable: true
+ });
+}
+
+