You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mm...@apache.org on 2014/04/30 17:44:20 UTC

[1/4] git commit: minor changes to workflow

Repository: cordova-labs
Updated Branches:
  refs/heads/cdvtest 7d614b920 -> e0df895f3


minor changes to workflow


Project: http://git-wip-us.apache.org/repos/asf/cordova-labs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-labs/commit/42f74c39
Tree: http://git-wip-us.apache.org/repos/asf/cordova-labs/tree/42f74c39
Diff: http://git-wip-us.apache.org/repos/asf/cordova-labs/diff/42f74c39

Branch: refs/heads/cdvtest
Commit: 42f74c39af06da38fd16de0a3e31a6131e5b489c
Parents: 7d614b9
Author: Michal Mocny <mm...@gmail.com>
Authored: Fri Apr 25 09:55:53 2014 -0400
Committer: Michal Mocny <mm...@gmail.com>
Committed: Fri Apr 25 09:55:53 2014 -0400

----------------------------------------------------------------------
 cordova-app-test-harness/hooks/before_prepare/pre-prepare.js | 3 +--
 cordova-app-test-harness/update.sh                           | 2 +-
 cordova-app-test-harness/www/last_update                     | 1 -
 3 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/42f74c39/cordova-app-test-harness/hooks/before_prepare/pre-prepare.js
----------------------------------------------------------------------
diff --git a/cordova-app-test-harness/hooks/before_prepare/pre-prepare.js b/cordova-app-test-harness/hooks/before_prepare/pre-prepare.js
index d7a1863..8b21f18 100755
--- a/cordova-app-test-harness/hooks/before_prepare/pre-prepare.js
+++ b/cordova-app-test-harness/hooks/before_prepare/pre-prepare.js
@@ -10,8 +10,7 @@ cordova platform add android
 cordova platform add ios
 
 cordova plugin add ~/dev/cordova/cordova-labs/cordova-plugin-test-framework
+cordova plugin add ~/dev/cordova/cordova-plugin-contacts
 cordova plugin add ~/dev/cordova/cordova-plugin-device
 cordova plugin add ~/dev/cordova/cordova-plugin-device-motion
-cordova plugin add ~/dev/cordova/cordova-plugin-device-orientation
 cordova plugin add ~/dev/cordova/cordova-plugin-geolocation
-cordova plugin add ~/dev/cordova/cordova-plugin-vibration

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/42f74c39/cordova-app-test-harness/update.sh
----------------------------------------------------------------------
diff --git a/cordova-app-test-harness/update.sh b/cordova-app-test-harness/update.sh
index b630013..0ecccf2 100755
--- a/cordova-app-test-harness/update.sh
+++ b/cordova-app-test-harness/update.sh
@@ -1,5 +1,5 @@
 # Pass an arg like --all to rebuild everything
-if [ $# -gt 0 ]; then
+if [ $# -gt 0 -o ! -d platforms -o ! -d plugins ]; then
   rm -rf platforms
   rm -rf plugins
   mkdir platforms

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/42f74c39/cordova-app-test-harness/www/last_update
----------------------------------------------------------------------
diff --git a/cordova-app-test-harness/www/last_update b/cordova-app-test-harness/www/last_update
deleted file mode 100644
index 8884c8a..0000000
--- a/cordova-app-test-harness/www/last_update
+++ /dev/null
@@ -1 +0,0 @@
-Thu Apr 24 12:18:00 EDT 2014


[3/4] git commit: Moving test management from app to plugin

Posted by mm...@apache.org.
Moving test management from app to plugin


Project: http://git-wip-us.apache.org/repos/asf/cordova-labs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-labs/commit/9f765bcf
Tree: http://git-wip-us.apache.org/repos/asf/cordova-labs/tree/9f765bcf
Diff: http://git-wip-us.apache.org/repos/asf/cordova-labs/diff/9f765bcf

Branch: refs/heads/cdvtest
Commit: 9f765bcf7f008c69eff8f4755f2eb40ac741cc06
Parents: f695e4b
Author: Michal Mocny <mm...@gmail.com>
Authored: Mon Apr 28 09:35:53 2014 -0400
Committer: Michal Mocny <mm...@gmail.com>
Committed: Mon Apr 28 09:45:13 2014 -0400

----------------------------------------------------------------------
 cordova-app-test-harness/www/index.html   |   1 -
 cordova-app-test-harness/www/main.js      |   6 +-
 cordova-app-test-harness/www/tests.js     |  83 ------------
 cordova-plugin-test-framework/www/test.js | 176 ++++++++++---------------
 4 files changed, 71 insertions(+), 195 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/9f765bcf/cordova-app-test-harness/www/index.html
----------------------------------------------------------------------
diff --git a/cordova-app-test-harness/www/index.html b/cordova-app-test-harness/www/index.html
index a379892..61be191 100644
--- a/cordova-app-test-harness/www/index.html
+++ b/cordova-app-test-harness/www/index.html
@@ -17,7 +17,6 @@
     <script type="text/javascript" src="cordova.js"></script>
 
     <!-- App scripts -->
-    <script type="text/javascript" src="tests.js"></script>
     <script type="text/javascript" src="jasmine_helpers.js"></script>
     <script type="text/javascript" src="jasmine-medic.js"></script>
     <script type="text/javascript" src="medic.js"></script>

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/9f765bcf/cordova-app-test-harness/www/main.js
----------------------------------------------------------------------
diff --git a/cordova-app-test-harness/www/main.js b/cordova-app-test-harness/www/main.js
index 256ac09..89a250a 100644
--- a/cordova-app-test-harness/www/main.js
+++ b/cordova-app-test-harness/www/main.js
@@ -86,7 +86,8 @@ function runAutoTests() {
   for (var property in jasmineInterface) {
     window[property] = jasmineInterface[property];
   }
-  window.defineAutoTests(jasmineInterface);
+  var cdvtest = cordova.require('org.apache.cordova.test-framework.test');
+  cdvtest.defineAutoTests(jasmineInterface);
 
   // Run the tests!
   var jasmineEnv = jasmine.getEnv();
@@ -107,7 +108,8 @@ function runManualTests() {
     createActionButton('Reset App', location.reload.bind(location));
     createActionButton('Back', setMode.bind(null, 'manual'));
   }
-  window.defineManualTests(contentEl, beforeEach, createActionButton);
+  var cdvtest = cordova.require('org.apache.cordova.test-framework.test');
+  cdvtest.defineManualTests(contentEl, beforeEach, createActionButton);
 }
 
 /******************************************************************************/

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/9f765bcf/cordova-app-test-harness/www/tests.js
----------------------------------------------------------------------
diff --git a/cordova-app-test-harness/www/tests.js b/cordova-app-test-harness/www/tests.js
deleted file mode 100644
index 8a1f21f..0000000
--- a/cordova-app-test-harness/www/tests.js
+++ /dev/null
@@ -1,83 +0,0 @@
-(function() {
-
-'use strict';
-
-var exports = window;
-
-exports.tests = Object.create(null);
-
-function getTestsObject(api) {
-  return window.tests[api] = window.tests[api] || { enabled: true };
-}
-
-// Usage:
-// registerAutoTests('apiName', function() {
-//   define('foo', function() {
-//     .. jasmine tests ..
-//   });
-// });
-exports.registerAutoTests = function(api, fn) {
-  var apiTests = getTestsObject(api);
-  apiTests.defineAutoTests = function(jasmineInterface) {
-    jasmineInterface.describe(api + ' >>', function() {
-      fn(jasmineInterface); // Note: don't pass fn directly to jasmine.describe, since describe does async magic if fn takes an arg
-    });
-  };
-};
-
-exports.defineAutoTests = function(jasmineInterface) {
-  // one time
-  var test_modules = cordova.require('cordova/plugin_list')
-    .map(function(jsmodule) {
-      return jsmodule.id;
-    })
-    .filter(function(id) {
-      return /.tests$/.test(id);
-    });
-  test_modules.forEach(function(id) {
-    try {
-      // This runs the tests
-      cordova.require(id);
-    } catch(ex) {
-      logger('Failed to load:', id);
-      return;
-    }
-    logger('Loaded:', id);
-  });
-
-  Object.keys(exports.tests).forEach(function(key) {
-    if (!exports.tests[key].enabled)
-      return;
-    if (!exports.tests[key].hasOwnProperty('defineAutoTests'))
-      return;
-    exports.tests[key].defineAutoTests(jasmineInterface);
-  });
-};
-
-// Usage:
-// registerManualTests('apiName', function(contentEl, addButton) {
-//   .. setup ..
-//   addButton('Test Description', function() { ... });
-//   addButton('Test 2', function() { ... });
-// });
-exports.registerManualTests = function(api, fn) {
-  var apiTests = getTestsObject(api);
-  apiTests.defineManualTests = function(contentEl, addButton) {
-    fn(contentEl, addButton);
-  };
-}
-
-exports.defineManualTests = function(contentEl, beforeEach, createActionButton) {
-  Object.keys(exports.tests).forEach(function(key) {
-    if (!exports.tests[key].enabled)
-      return;
-    if (!exports.tests[key].hasOwnProperty('defineManualTests'))
-      return;
-    createActionButton(key, function() {
-      beforeEach();
-      exports.tests[key].defineManualTests(contentEl, createActionButton);
-    });
-  });
-};
-
-}());

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/9f765bcf/cordova-plugin-test-framework/www/test.js
----------------------------------------------------------------------
diff --git a/cordova-plugin-test-framework/www/test.js b/cordova-plugin-test-framework/www/test.js
index 68b3108..4c067b0 100644
--- a/cordova-plugin-test-framework/www/test.js
+++ b/cordova-plugin-test-framework/www/test.js
@@ -19,120 +19,78 @@
  *
 */
 
-/******************************************************************************/
-/******************************************************************************/
-/******************************************************************************/
-// Common
-
-var contentEl,
-    createActionButtonFn,
-    logFn;
-
-/******************************************************************************/
-
-exports.init = function(contentEl_, createActionButtonFn_, logFn_) {
-  contentEl = contentEl_;
-  createActionButtonFn = createActionButtonFn_;
-  logFn = logFn_;
+exports.tests = Object.create(null);
+
+function getTestsObject(api) {
+  return window.tests[api] = window.tests[api] || { enabled: true };
+}
+
+// Usage:
+// registerAutoTests('apiName', function() {
+//   define('foo', function() {
+//     .. jasmine tests ..
+//   });
+// });
+exports.registerAutoTests = function(api, fn) {
+  var apiTests = getTestsObject(api);
+  apiTests.defineAutoTests = function(jasmineInterface) {
+    jasmineInterface.describe(api + ' >>', function() {
+      fn(jasmineInterface); // Note: don't pass fn directly to jasmine.describe, since describe does async magic if fn takes an arg
+    });
+  };
 };
 
-/******************************************************************************/
-
-Object.defineProperty(exports, "log", {
-    get: function() { return logFn; }
-});
-
-/******************************************************************************/
-/******************************************************************************/
-/******************************************************************************/
-// Auto Tests
-
-(function() {
-
-var jasmine,
-    jasmineInterface;
-
-/******************************************************************************/
-
-exports.initForAutoTests = function(jasmine_) {
-  jasmine = jasmine_;
-  jasmineInterface = {};
-
-  var jasmineEnv = jasmine.getEnv();
-
-  // Fill in jasmineInterface
-  var jasmine_functions = ['describe',
-                           'xdescribe',
-                           'it',
-                           'xit',
-                           'beforeEach',
-                           'afterEach',
-                           'expect',
-                           'pending',
-                           'addMatchers',
-                           'spyOn'];
-  jasmine_functions.forEach(function(fn) {
-    jasmineInterface[fn] = jasmineEnv[fn].bind(jasmineEnv);
+exports.defineAutoTests = function(jasmineInterface) {
+  // one time
+  var test_modules = cordova.require('cordova/plugin_list')
+    .map(function(jsmodule) {
+      return jsmodule.id;
+    })
+    .filter(function(id) {
+      return /.tests$/.test(id);
+    });
+  test_modules.forEach(function(id) {
+    try {
+      // This runs the tests
+      cordova.require(id);
+    } catch(ex) {
+      logger('Failed to load:', id);
+      return;
+    }
+    logger('Loaded:', id);
   });
-  jasmineInterface.clock = jasmineEnv.clock;
-  jasmineInterface.jsApiReporter = new jasmine.JsApiReporter({ timer: new jasmine.Timer() });
-  jasmineInterface.jasmine = jasmine;
-  jasmineInterface.log = exports.log;
-
-  jasmineEnv.addReporter(jasmineInterface.jsApiReporter);
-};
-
-/******************************************************************************/
-
-exports.runAutoTests = function() {
-  jasmine.getEnv().execute();
-};
 
-/******************************************************************************/
-
-exports.injectJasmineInterface = function(target, targetName) {
-  var ret = "";
-  for (var property in jasmineInterface) {
-    target[property] = jasmineInterface[property];
-    ret += 'var ' + property + ' = this[\'' + property + '\'];\n';
-  }
-  return ret;
-};
-
-/******************************************************************************/
-
-}());
-
-/******************************************************************************/
-/******************************************************************************/
-/******************************************************************************/
-// Manual Tests
-
-(function () {
-
-/******************************************************************************/
-
-exports.initForManualTests = function() {
-};
-
-/******************************************************************************/
-
-exports.addManualTestFn = function(title, fn) {
-  createActionButtonFn(title, fn);
+  Object.keys(exports.tests).forEach(function(key) {
+    if (!exports.tests[key].enabled)
+      return;
+    if (!exports.tests[key].hasOwnProperty('defineAutoTests'))
+      return;
+    exports.tests[key].defineAutoTests(jasmineInterface);
+  });
 };
 
-/******************************************************************************/
-
-exports.addManualTestPage = function(title, url) {
-  createActionButtonFn(title, function() {
-    // TODO: This should probably have a way to get back.
-    // Perhaps open the page in a frame?
-    window.href = url;
+// Usage:
+// registerManualTests('apiName', function(contentEl, addButton) {
+//   .. setup ..
+//   addButton('Test Description', function() { ... });
+//   addButton('Test 2', function() { ... });
+// });
+exports.registerManualTests = function(api, fn) {
+  var apiTests = getTestsObject(api);
+  apiTests.defineManualTests = function(contentEl, addButton) {
+    fn(contentEl, addButton);
+  };
+}
+
+exports.defineManualTests = function(contentEl, beforeEach, createActionButton) {
+  Object.keys(exports.tests).forEach(function(key) {
+    if (!exports.tests[key].enabled)
+      return;
+    if (!exports.tests[key].hasOwnProperty('defineManualTests'))
+      return;
+    createActionButton(key, function() {
+      beforeEach();
+      exports.tests[key].defineManualTests(contentEl, createActionButton);
+    });
   });
 };
-
-/******************************************************************************/
-
-}());
-
-/******************************************************************************/


[2/4] git commit: Remove dev preferences from config

Posted by mm...@apache.org.
Remove dev preferences from config


Project: http://git-wip-us.apache.org/repos/asf/cordova-labs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-labs/commit/f695e4bf
Tree: http://git-wip-us.apache.org/repos/asf/cordova-labs/tree/f695e4bf
Diff: http://git-wip-us.apache.org/repos/asf/cordova-labs/diff/f695e4bf

Branch: refs/heads/cdvtest
Commit: f695e4bf9a13617582b5cd188221f5b25bfc7381
Parents: 42f74c3
Author: Michal Mocny <mm...@gmail.com>
Authored: Fri Apr 25 15:20:11 2014 -0400
Committer: Michal Mocny <mm...@gmail.com>
Committed: Fri Apr 25 15:41:00 2014 -0400

----------------------------------------------------------------------
 cordova-app-test-harness/config.xml                 |  2 --
 .../hooks/before_prepare/pre-prepare.js             | 16 ----------------
 .../hooks/before_prepare/pre-prepare.sh             | 16 ++++++++++++++++
 cordova-plugin-test-framework/plugin.xml            | 16 +---------------
 4 files changed, 17 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/f695e4bf/cordova-app-test-harness/config.xml
----------------------------------------------------------------------
diff --git a/cordova-app-test-harness/config.xml b/cordova-app-test-harness/config.xml
index 7d55342..142dae6 100644
--- a/cordova-app-test-harness/config.xml
+++ b/cordova-app-test-harness/config.xml
@@ -9,8 +9,6 @@
     <content src="index.html" />
     <access origin="http://www.apache.org/*" />
     <access origin="https://www.googleapis.com/*" />
-    <content src="http://192.168.1.147:8000/android" />
-    <access origin="http://192.168.1.147:8000" />
 
     <preference name="fullscreen" value="true" />
     <preference name="webviewbounce" value="false" />

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/f695e4bf/cordova-app-test-harness/hooks/before_prepare/pre-prepare.js
----------------------------------------------------------------------
diff --git a/cordova-app-test-harness/hooks/before_prepare/pre-prepare.js b/cordova-app-test-harness/hooks/before_prepare/pre-prepare.js
deleted file mode 100755
index 8b21f18..0000000
--- a/cordova-app-test-harness/hooks/before_prepare/pre-prepare.js
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-if [ -d "plugins/org.apache.cordova.test-framework" ]; then
-  exit
-fi
-
-mkdir -p plugins platforms
-
-cordova platform add android
-cordova platform add ios
-
-cordova plugin add ~/dev/cordova/cordova-labs/cordova-plugin-test-framework
-cordova plugin add ~/dev/cordova/cordova-plugin-contacts
-cordova plugin add ~/dev/cordova/cordova-plugin-device
-cordova plugin add ~/dev/cordova/cordova-plugin-device-motion
-cordova plugin add ~/dev/cordova/cordova-plugin-geolocation

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/f695e4bf/cordova-app-test-harness/hooks/before_prepare/pre-prepare.sh
----------------------------------------------------------------------
diff --git a/cordova-app-test-harness/hooks/before_prepare/pre-prepare.sh b/cordova-app-test-harness/hooks/before_prepare/pre-prepare.sh
new file mode 100755
index 0000000..09d8408
--- /dev/null
+++ b/cordova-app-test-harness/hooks/before_prepare/pre-prepare.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+if [ -d "plugins/org.apache.cordova.test-framework" ]; then
+  exit
+fi
+
+mkdir -p plugins platforms
+
+cordova platform add android
+cordova platform add ios
+
+cordova plugin add ~/dev/cordova/cordova-labs/cordova-plugin-test-framework --searchpath ~/dev/cordova/cordova-labs
+cordova plugin add ~/dev/cordova/cordova-plugin-contacts --searchpath ~/dev/cordova
+cordova plugin add ~/dev/cordova/cordova-plugin-device --searchpath ~/dev/cordova
+cordova plugin add ~/dev/cordova/cordova-plugin-device-motion --searchpath ~/dev/cordova
+cordova plugin add ~/dev/cordova/cordova-plugin-geolocation --searchpath ~/dev/cordova

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/f695e4bf/cordova-plugin-test-framework/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-plugin-test-framework/plugin.xml b/cordova-plugin-test-framework/plugin.xml
index 25ed129..dc21287 100644
--- a/cordova-plugin-test-framework/plugin.xml
+++ b/cordova-plugin-test-framework/plugin.xml
@@ -10,22 +10,8 @@
     <license>Apache 2.0</license>
     <keywords>cordova,test</keywords>
 
-    <dependency id="org.apache.cordova.appsettings" url="." subdir="cordova-plugin-appsettings" />
+    <dependency id="org.apache.cordova.appsettings" />
 
     <js-module src="www/test.js" name="test" />
 
-    <!-- android -->
-    <platform name="android">
-        <config-file target="res/xml/config.xml" parent="/*">
-            <access origin="http://172.23.188.139" />
-        </config-file>
-    </platform>
-
-    <!-- ios -->
-    <platform name="ios">
-        <config-file target="config.xml" parent="/*">
-            <access origin="http://172.23.188.139" ></access>
-        </config-file>
-    </platform>
-
 </plugin>


[4/4] git commit: Change plugin test definitions to use module exports

Posted by mm...@apache.org.
Change plugin test definitions to use module exports


Project: http://git-wip-us.apache.org/repos/asf/cordova-labs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-labs/commit/e0df895f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-labs/tree/e0df895f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-labs/diff/e0df895f

Branch: refs/heads/cdvtest
Commit: e0df895f314d7b9eaddc99fbf64594d9e042255a
Parents: 9f765bc
Author: Michal Mocny <mm...@gmail.com>
Authored: Mon Apr 28 10:48:32 2014 -0400
Committer: Michal Mocny <mm...@gmail.com>
Committed: Mon Apr 28 10:48:32 2014 -0400

----------------------------------------------------------------------
 cordova-plugin-test-framework/www/test.js | 56 ++++++++++----------------
 1 file changed, 21 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/e0df895f/cordova-plugin-test-framework/www/test.js
----------------------------------------------------------------------
diff --git a/cordova-plugin-test-framework/www/test.js b/cordova-plugin-test-framework/www/test.js
index 4c067b0..d6fe220 100644
--- a/cordova-plugin-test-framework/www/test.js
+++ b/cordova-plugin-test-framework/www/test.js
@@ -22,26 +22,11 @@
 exports.tests = Object.create(null);
 
 function getTestsObject(api) {
-  return window.tests[api] = window.tests[api] || { enabled: true };
+  return exports.tests[api] = exports.tests[api] || { enabled: true };
 }
 
-// Usage:
-// registerAutoTests('apiName', function() {
-//   define('foo', function() {
-//     .. jasmine tests ..
-//   });
-// });
-exports.registerAutoTests = function(api, fn) {
-  var apiTests = getTestsObject(api);
-  apiTests.defineAutoTests = function(jasmineInterface) {
-    jasmineInterface.describe(api + ' >>', function() {
-      fn(jasmineInterface); // Note: don't pass fn directly to jasmine.describe, since describe does async magic if fn takes an arg
-    });
-  };
-};
-
-exports.defineAutoTests = function(jasmineInterface) {
-  // one time
+exports.init = function() {
+  // This finds all js-modules named "tests" regadless of plugin it came from
   var test_modules = cordova.require('cordova/plugin_list')
     .map(function(jsmodule) {
       return jsmodule.id;
@@ -49,17 +34,30 @@ exports.defineAutoTests = function(jasmineInterface) {
     .filter(function(id) {
       return /.tests$/.test(id);
     });
+
+  // Map auto / manual test definitions for each, but without actually running the handlers
   test_modules.forEach(function(id) {
     try {
-      // This runs the tests
-      cordova.require(id);
+      var plugintests = cordova.require(id);
+
+      if (plugintests.hasOwnProperty('defineAutoTests')) {
+        getTestsObject(id).defineAutoTests = function(jasmineInterface) {
+          jasmineInterface.describe(id + ' >>', plugintests.defineAutoTests.bind(plugintests));
+        };
+      }
+
+      if (plugintests.hasOwnProperty('defineManualTests')) {
+        getTestsObject(id).defineManualTests = plugintests.defineManualTests.bind(plugintests);
+      }
     } catch(ex) {
-      logger('Failed to load:', id);
+      console.warn('Failed to load tests: ', id);
       return;
     }
-    logger('Loaded:', id);
   });
+}
 
+exports.defineAutoTests = function(jasmineInterface) {
+  exports.init();
   Object.keys(exports.tests).forEach(function(key) {
     if (!exports.tests[key].enabled)
       return;
@@ -69,20 +67,8 @@ exports.defineAutoTests = function(jasmineInterface) {
   });
 };
 
-// Usage:
-// registerManualTests('apiName', function(contentEl, addButton) {
-//   .. setup ..
-//   addButton('Test Description', function() { ... });
-//   addButton('Test 2', function() { ... });
-// });
-exports.registerManualTests = function(api, fn) {
-  var apiTests = getTestsObject(api);
-  apiTests.defineManualTests = function(contentEl, addButton) {
-    fn(contentEl, addButton);
-  };
-}
-
 exports.defineManualTests = function(contentEl, beforeEach, createActionButton) {
+  exports.init();
   Object.keys(exports.tests).forEach(function(key) {
     if (!exports.tests[key].enabled)
       return;