From 7d9286f0427588e4a4a7aa41885e806c95621014 Mon Sep 17 00:00:00 2001 From: Stuart Mitchell Date: Wed, 11 Mar 2015 12:53:34 +1300 Subject: [PATCH 1/3] test-slimer --- .travis.yml | 13 +++++++++++-- project.clj | 8 +++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index c50d466..d0d00bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,15 @@ language: clojure lein: lein2 -script: "lein2 test" +script: "lein2 test; lein2 slimer-test" before_install: - sudo apt-get update -qq - - sudo apt-get install -qq rhino \ No newline at end of file + - sudo apt-get install -qq rhino +env: + - SLIMERJSLAUNCHER=$(which firefox) DISPLAY=:99.0 PATH=$TRAVIS_BUILD_DIR/slimerjs:$PATH +addons: + firefox: "34.0" +before_script: + - "echo 'Installing Slimer'" + - "wget http://download.slimerjs.org/releases/0.9.4/slimerjs-0.9.4.zip" + - "unzip slimerjs-0.9.4.zip" + - "mv slimerjs-0.9.4 ./slimerjs" \ No newline at end of file diff --git a/project.clj b/project.clj index aaa797b..1bac381 100644 --- a/project.clj +++ b/project.clj @@ -35,9 +35,11 @@ :pretty-print true}}] :test-commands {"rhino" ["rhino" "-opt" "-1" :rhino-runner - "" - "run/compiled/test.js"]}} + "run/compiled/test.js"] + "slimer" ["xvfb-run" "-a" "slimerjs" :runner + "run/compiled/test.js"]}} :aliases {"auto" ["do" "clean," "cljsbuild" "clean," "cljsbuild" "auto" "demo,"] "once" ["do" "clean," "cljsbuild" "clean," "cljsbuild" "once" "demo,"] - "test" ["do" "clean," "cljsbuild" "once," "cljsbuild" "test" "rhino"]}) + "test" ["do" "clean," "cljsbuild" "once," "cljsbuild" "test" "rhino"] + "slimer-test" ["do" "clean," "cljsbuild" "once," "cljsbuild" "test" "slimer"] }) From 2490a4768c8de12dae95a359f5128222d619a2ae Mon Sep 17 00:00:00 2001 From: Stuart Mitchell Date: Wed, 11 Mar 2015 13:09:14 +1300 Subject: [PATCH 2/3] made slimer the default tests --- .travis.yml | 2 +- project.clj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index d0d00bc..d13c797 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: clojure lein: lein2 -script: "lein2 test; lein2 slimer-test" +script: "lein2 test-slimer" before_install: - sudo apt-get update -qq - sudo apt-get install -qq rhino diff --git a/project.clj b/project.clj index 1bac381..911403f 100644 --- a/project.clj +++ b/project.clj @@ -41,5 +41,5 @@ :aliases {"auto" ["do" "clean," "cljsbuild" "clean," "cljsbuild" "auto" "demo,"] "once" ["do" "clean," "cljsbuild" "clean," "cljsbuild" "once" "demo,"] - "test" ["do" "clean," "cljsbuild" "once," "cljsbuild" "test" "rhino"] - "slimer-test" ["do" "clean," "cljsbuild" "once," "cljsbuild" "test" "slimer"] }) + "test-rhino" ["do" "clean," "cljsbuild" "once," "cljsbuild" "test" "rhino"] + "test-slimer" ["do" "clean," "cljsbuild" "once," "cljsbuild" "test" "slimer"] }) From b98feca0e42414fc8e71832b185d46b07d1a20cc Mon Sep 17 00:00:00 2001 From: Stuart Mitchell Date: Wed, 11 Mar 2015 16:19:42 +1300 Subject: [PATCH 3/3] added phantomjs option for testing --- project.clj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/project.clj b/project.clj index 911403f..4726f8b 100644 --- a/project.clj +++ b/project.clj @@ -37,7 +37,9 @@ :test-commands {"rhino" ["rhino" "-opt" "-1" :rhino-runner "run/compiled/test.js"] "slimer" ["xvfb-run" "-a" "slimerjs" :runner - "run/compiled/test.js"]}} + "run/compiled/test.js"] + "phantom" ["phantomjs" ; doesn't work with phantomjs < 2.0.0 + :runner "run/compiled/test.js"]}} :aliases {"auto" ["do" "clean," "cljsbuild" "clean," "cljsbuild" "auto" "demo,"] "once" ["do" "clean," "cljsbuild" "clean," "cljsbuild" "once" "demo,"]