Revert "Adding jasmine testing across domains"
authorTim Otten <totten@civicrm.org>
Mon, 16 May 2016 21:58:18 +0000 (14:58 -0700)
committerTim Otten <totten@civicrm.org>
Mon, 16 May 2016 21:58:18 +0000 (14:58 -0700)
karma.conf.js
tests/karma/unit/externalDomainSpec.js [deleted file]
tools/scripts/npm/test.sh

index b04979c74437691c26af68d838772ac56cae603b..eada18ded519964e83d60c5e5d179d07534fd613 100644 (file)
@@ -1,18 +1,7 @@
 module.exports = function(config) {
   config.set({
     autoWatch: true,
-    browsers: ['PhantomJS', 'PhantomJS_custom'],
-    customLaunchers: {
-      'PhantomJS_custom': {
-        base: 'PhantomJS',
-        options: {
-            windowName: 'my-window',
-            settings: {
-                webSecurityEnabled: false
-            }
-        }
-      }
-    },
+    browsers: ['PhantomJS'],
     exclude: [
     ],
     files: [
diff --git a/tests/karma/unit/externalDomainSpec.js b/tests/karma/unit/externalDomainSpec.js
deleted file mode 100644 (file)
index e8f2328..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-'use strict';
-
-describe('Web page', function(){
-
-    var request = new XMLHttpRequest();
-    var url = 'http://localhost:8000'; // Change to your port!
-
-    beforeAll(function(){
-        /**
-         * Warning! Default installation of jasmine (karma+phantomjs)
-         * doesn't support JS request to other domains than own.
-         * The solutions is at page https://github.com/karma-runner/karma-phantomjs-launcher
-         * + add additional configuration to karma.conf.js
-         *   with parameter for PhantomJS webSecurityEnabled: false
-         * + change run parameter in npm/test.sh
-         */
-        request.open("GET", url, false);
-        request.send();
-    });
-
-    it('has response code 200', function(){
-        expect(request.status).toBe(200);
-    });
-
-    it('contain tag body', function(){
-        expect(request.responseText).toContain('<body');
-    });
-
-});
index 9863e9c332f5ffdb7f5554ce1b2c172f22616e67..1a114feaae6df8db7162f5d1e6ba7e990e7062b3 100644 (file)
@@ -2,13 +2,13 @@
 if which node_modules/karma/bin/karma >> /dev/null; then
   if which nodejs >> /dev/null; then
     ## Debian
-    nodejs node_modules/karma/bin/karma start --browsers PhantomJS_custom
+    nodejs node_modules/karma/bin/karma start
   else
     ## Official
-    node node_modules/karma/bin/karma start --browsers PhantomJS_custom
+    node node_modules/karma/bin/karma start
   fi
 elif which karma >> /dev/null ; then
-  karma start --browsers PhantomJS_custom
+  karma start
 else
   echo "ERROR: Failed to find karma"
   exit 1