Merge "Fix jasmine runners to work better with requirejs and join all specs in one"
diff --git a/dev/js/runner/all.html b/dev/js/runner/all.html
new file mode 100644
index 0000000..78e2f19
--- /dev/null
+++ b/dev/js/runner/all.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <meta charset="utf-8">
+  <title>Spec Runner for Kalamar</title>
+  <link rel="shortcut icon" type="image/png" href="../lib/jasmine-2.1.1/jasmine_favicon.png">
+  <link rel="stylesheet" href="../lib/jasmine-2.1.1/jasmine.css">
+  <script src="../lib/require.js"></script>
+  <!--
+  <script src="../lib/jasmine-2.1.1/jasmine.js"></script>
+  <script src="../lib/jasmine-2.1.1/jasmine-html.js"></script>
+  <script src="../lib/jasmine-2.1.1/boot.js"></script>
+  -->
+  <script>
+    require.config({
+      baseUrl: "../src",
+      paths: {
+        "lib" : "../lib",
+        "spec" : "../spec",
+        "jlib" : "lib/jasmine-2.1.1",
+        "jasmine" : ['../lib/jasmine-2.1.1/jasmine'],
+        "jasmine-html": ['../lib/jasmine-2.1.1/jasmine-html'],
+        "jasmine-boot": ['../lib/jasmine-2.1.1/boot']
+      },
+      shim : {
+        'jasmine-html' : {
+          deps : ['jasmine']
+        },
+        'jasmine-boot' : {
+          deps : ['jasmine','jasmine-html']
+        }
+      }
+    });
+
+    require(['jasmine-boot'], function () {
+      require([
+        'spec/matchSpec',
+        'spec/hintSpec',
+        'spec/buttongroupSpec',
+        'spec/datepickerSpec',
+        'spec/menuSpec',
+        'spec/selectMenuSpec',
+        'spec/panelSpec',
+        'spec/pluginSpec',
+        'spec/queryCreatorSpec',
+        'spec/statSpec',
+        //'spec/vcSpec'
+      ],
+      function () {
+        window.onload();
+      });
+    });
+    </script>
+  </head>
+  <body></body>
+</html>
diff --git a/dev/js/runner/buttongroup.html b/dev/js/runner/buttongroup.html
index 78b6a94..31646b7 100644
--- a/dev/js/runner/buttongroup.html
+++ b/dev/js/runner/buttongroup.html
@@ -6,25 +6,36 @@
   <link rel="shortcut icon" type="image/png" href="../lib/jasmine-2.1.1/jasmine_favicon.png">
   <link rel="stylesheet" href="../lib/jasmine-2.1.1/jasmine.css">
   <script src="../lib/require.js"></script>
-  <script src="../lib/jasmine-2.1.1/jasmine.js"></script>
-  <script src="../lib/jasmine-2.1.1/jasmine-html.js"></script>
-  <script src="../lib/jasmine-2.1.1/boot.js"></script>
   <script>
     require.config({
       baseUrl: "../src",
       paths: {
         "lib" : "../lib",
-        "spec" : "../spec"
+        "spec" : "../spec",
+        "jlib" : "lib/jasmine-2.1.1",
+        "jasmine" : ['../lib/jasmine-2.1.1/jasmine'],
+        "jasmine-html": ['../lib/jasmine-2.1.1/jasmine-html'],
+        "jasmine-boot": ['../lib/jasmine-2.1.1/boot']
+      },
+      shim : {
+        'jasmine-html' : {
+          deps : ['jasmine']
+        },
+        'jasmine-boot' : {
+          deps : ['jasmine','jasmine-html']
+        }
       }
     });
-    require([
-      'spec/buttongroupSpec'
-    ],
-    function () {
-      if (jsApiReporter.finished === true)
-        jasmine.getEnv().execute();
+    require(['jasmine-boot'], function () {
+      require([
+        'spec/buttongroupSpec'
+     ],
+      function () {
+        window.onload();
+      });
     });
     </script>
+      
 </head>
 <body>
 </body>
diff --git a/dev/js/runner/datepicker.html b/dev/js/runner/datepicker.html
index 141d7c6..b6005bf 100644
--- a/dev/js/runner/datepicker.html
+++ b/dev/js/runner/datepicker.html
@@ -6,26 +6,35 @@
   <link rel="shortcut icon" type="image/png" href="../lib/jasmine-2.1.1/jasmine_favicon.png">
   <link rel="stylesheet" href="../lib/jasmine-2.1.1/jasmine.css">
   <script src="../lib/require.js"></script>
-  <script src="../lib/jasmine-2.1.1/jasmine.js"></script>
-  <script src="../lib/jasmine-2.1.1/jasmine-html.js"></script>
-  <script src="../lib/jasmine-2.1.1/boot.js"></script>
   <script>
     require.config({
       baseUrl: "../src",
       paths: {
         "lib" : "../lib",
-        "spec" : "../spec"
+        "spec" : "../spec",
+        "jlib" : "lib/jasmine-2.1.1",
+        "jasmine" : ['../lib/jasmine-2.1.1/jasmine'],
+        "jasmine-html": ['../lib/jasmine-2.1.1/jasmine-html'],
+        "jasmine-boot": ['../lib/jasmine-2.1.1/boot']
+      },
+      shim : {
+        'jasmine-html' : {
+          deps : ['jasmine']
+        },
+        'jasmine-boot' : {
+          deps : ['jasmine','jasmine-html']
+        }
       }
     });
-    require([
-      'lib/domReady!',
-      'spec/datepickerSpec'
-    ],
-    function () {
-      if (jsApiReporter.finished === true)
-        jasmine.getEnv().execute();
+    require(['jasmine-boot'], function () {
+      require([
+        'spec/datepickerSpec'
+     ],
+      function () {
+        window.onload();
+      });
     });
-  </script>
+    </script>
 </head>
 <body>
 </body>
diff --git a/dev/js/runner/hint.html b/dev/js/runner/hint.html
index f177a4e..a712c80 100644
--- a/dev/js/runner/hint.html
+++ b/dev/js/runner/hint.html
@@ -6,23 +6,33 @@
   <link rel="shortcut icon" type="image/png" href="../lib/jasmine-2.1.1/jasmine_favicon.png">
   <link rel="stylesheet" href="../lib/jasmine-2.1.1/jasmine.css">
   <script src="../lib/require.js"></script>
-  <script src="../lib/jasmine-2.1.1/jasmine.js"></script>
-  <script src="../lib/jasmine-2.1.1/jasmine-html.js"></script>
-  <script src="../lib/jasmine-2.1.1/boot.js"></script>
   <script>
     require.config({
       baseUrl: "../src",
       paths: {
         "lib" : "../lib",
-        "spec" : "../spec"
+        "spec" : "../spec",
+        "jlib" : "lib/jasmine-2.1.1",
+        "jasmine" : ['../lib/jasmine-2.1.1/jasmine'],
+        "jasmine-html": ['../lib/jasmine-2.1.1/jasmine-html'],
+        "jasmine-boot": ['../lib/jasmine-2.1.1/boot']
+      },
+      shim : {
+        'jasmine-html' : {
+          deps : ['jasmine']
+        },
+        'jasmine-boot' : {
+          deps : ['jasmine','jasmine-html']
+        }
       }
     });
-    require([
-      'spec/hintSpec'
-    ],
-    function () {
-      if (jsApiReporter.finished === true)
-        jasmine.getEnv().execute();
+    require(['jasmine-boot'], function () {
+      require([
+        'spec/hintSpec'
+     ],
+      function () {
+        window.onload();
+      });
     });
     </script>
 </head>
diff --git a/dev/js/runner/match.html b/dev/js/runner/match.html
index cd4f93a..8ad35b1 100644
--- a/dev/js/runner/match.html
+++ b/dev/js/runner/match.html
@@ -6,26 +6,35 @@
   <link rel="shortcut icon" type="image/png" href="../lib/jasmine-2.1.1/jasmine_favicon.png">
   <link rel="stylesheet" href="../lib/jasmine-2.1.1/jasmine.css">
   <script src="../lib/require.js"></script>
-  <script src="../lib/jasmine-2.1.1/jasmine.js"></script>
-  <script src="../lib/jasmine-2.1.1/jasmine-html.js"></script>
-  <script src="../lib/jasmine-2.1.1/boot.js"></script>
   <script>
     require.config({
       baseUrl: "../src",
       paths: {
         "lib" : "../lib",
-        "spec" : "../spec"
+        "spec" : "../spec",
+        "jlib" : "lib/jasmine-2.1.1",
+        "jasmine" : ['../lib/jasmine-2.1.1/jasmine'],
+        "jasmine-html": ['../lib/jasmine-2.1.1/jasmine-html'],
+        "jasmine-boot": ['../lib/jasmine-2.1.1/boot']
+      },
+      shim : {
+        'jasmine-html' : {
+          deps : ['jasmine']
+        },
+        'jasmine-boot' : {
+          deps : ['jasmine','jasmine-html']
+        }
       }
     });
-    require([
-      'lib/domReady!',
-      'spec/matchSpec'
-    ],
-    function () {
-      if (jsApiReporter.finished === true)
-        jasmine.getEnv().execute();
+    require(['jasmine-boot'], function () {
+      require([
+        'spec/matchSpec'
+     ],
+      function () {
+        window.onload();
+      });
     });
-  </script>
+    </script>
 </head>
 <body>
 </body>
diff --git a/dev/js/runner/menu.html b/dev/js/runner/menu.html
index 4d2bffa..caf580a 100644
--- a/dev/js/runner/menu.html
+++ b/dev/js/runner/menu.html
@@ -6,27 +6,36 @@
   <link rel="shortcut icon" type="image/png" href="../lib/jasmine-2.1.1/jasmine_favicon.png">
   <link rel="stylesheet" href="../lib/jasmine-2.1.1/jasmine.css">
   <script src="../lib/require.js"></script>
-  <script src="../lib/jasmine-2.1.1/jasmine.js"></script>
-  <script src="../lib/jasmine-2.1.1/jasmine-html.js"></script>
-  <script src="../lib/jasmine-2.1.1/boot.js"></script>
   <script>
     require.config({
       baseUrl: "../src",
       paths: {
         "lib" : "../lib",
-        "spec" : "../spec"
+        "spec" : "../spec",
+        "jlib" : "lib/jasmine-2.1.1",
+        "jasmine" : ['../lib/jasmine-2.1.1/jasmine'],
+        "jasmine-html": ['../lib/jasmine-2.1.1/jasmine-html'],
+        "jasmine-boot": ['../lib/jasmine-2.1.1/boot']
+      },
+      shim : {
+        'jasmine-html' : {
+          deps : ['jasmine']
+        },
+        'jasmine-boot' : {
+          deps : ['jasmine','jasmine-html']
+        }
       }
     });
-    require([
-    'lib/domReady!',
-    'spec/menuSpec',
-    'spec/selectMenuSpec'
-    ],
-    function () {
-      if (jsApiReporter.finished === true)
-        jasmine.getEnv().execute();
+    require(['jasmine-boot'], function () {
+      require([
+        'spec/menuSpec',
+        'spec/selectMenuSpec'
+     ],
+      function () {
+        window.onload();
+      });
     });
-  </script>
+    </script>
 </head>
 <body>
 </body>
diff --git a/dev/js/runner/panel.html b/dev/js/runner/panel.html
index d0cf2d2..4f21bef 100644
--- a/dev/js/runner/panel.html
+++ b/dev/js/runner/panel.html
@@ -5,25 +5,34 @@
     <title>Spec Runner for Panels</title>
     <link rel="shortcut icon" type="image/png" href="../lib/jasmine-2.1.1/jasmine_favicon.png">
     <link rel="stylesheet" href="../lib/jasmine-2.1.1/jasmine.css">
-    <script src="../lib/require.js"></script>
-    <script src="../lib/jasmine-2.1.1/jasmine.js"></script>
-    <script src="../lib/jasmine-2.1.1/jasmine-html.js"></script>
-    <script src="../lib/jasmine-2.1.1/boot.js"></script>
-    <script>
+  <script src="../lib/require.js"></script>
+  <script>
     require.config({
       baseUrl: "../src",
       paths: {
         "lib" : "../lib",
-        "spec" : "../spec"
+        "spec" : "../spec",
+        "jlib" : "lib/jasmine-2.1.1",
+        "jasmine" : ['../lib/jasmine-2.1.1/jasmine'],
+        "jasmine-html": ['../lib/jasmine-2.1.1/jasmine-html'],
+        "jasmine-boot": ['../lib/jasmine-2.1.1/boot']
+      },
+      shim : {
+        'jasmine-html' : {
+          deps : ['jasmine']
+        },
+        'jasmine-boot' : {
+          deps : ['jasmine','jasmine-html']
+        }
       }
     });
-    require([
-      'lib/domReady!',
-      'spec/panelSpec'
-    ],
-    function () {
-      if (jsApiReporter.finished === true)
-        jasmine.getEnv().execute();
+    require(['jasmine-boot'], function () {
+      require([
+        'spec/panelSpec'
+     ],
+      function () {
+        window.onload();
+      });
     });
     </script>
   </head>
diff --git a/dev/js/runner/plugin.html b/dev/js/runner/plugin.html
index 94f3142..47ca393 100644
--- a/dev/js/runner/plugin.html
+++ b/dev/js/runner/plugin.html
@@ -5,25 +5,34 @@
     <title>Spec Runner for Plugins</title>
     <link rel="shortcut icon" type="image/png" href="../lib/jasmine-2.1.1/jasmine_favicon.png">
     <link rel="stylesheet" href="../lib/jasmine-2.1.1/jasmine.css">
-    <script src="../lib/require.js"></script>
-    <script src="../lib/jasmine-2.1.1/jasmine.js"></script>
-    <script src="../lib/jasmine-2.1.1/jasmine-html.js"></script>
-    <script src="../lib/jasmine-2.1.1/boot.js"></script>
-    <script>
+  <script src="../lib/require.js"></script>
+  <script>
     require.config({
       baseUrl: "../src",
       paths: {
         "lib" : "../lib",
-        "spec" : "../spec"
+        "spec" : "../spec",
+        "jlib" : "lib/jasmine-2.1.1",
+        "jasmine" : ['../lib/jasmine-2.1.1/jasmine'],
+        "jasmine-html": ['../lib/jasmine-2.1.1/jasmine-html'],
+        "jasmine-boot": ['../lib/jasmine-2.1.1/boot']
+      },
+      shim : {
+        'jasmine-html' : {
+          deps : ['jasmine']
+        },
+        'jasmine-boot' : {
+          deps : ['jasmine','jasmine-html']
+        }
       }
     });
-    require([
-      'lib/domReady!',
-      'spec/pluginSpec'
-    ],
-    function () {
-      if (jsApiReporter.finished === true)
-        jasmine.getEnv().execute();
+    require(['jasmine-boot'], function () {
+      require([
+        'spec/pluginSpec'
+     ],
+      function () {
+        window.onload();
+      });
     });
     </script>
   </head>
diff --git a/dev/js/runner/querycreator.html b/dev/js/runner/querycreator.html
index dacfaa4..478b78d 100644
--- a/dev/js/runner/querycreator.html
+++ b/dev/js/runner/querycreator.html
@@ -6,23 +6,33 @@
   <link rel="shortcut icon" type="image/png" href="../lib/jasmine-2.1.1/jasmine_favicon.png">
   <link rel="stylesheet" href="../lib/jasmine-2.1.1/jasmine.css">
   <script src="../lib/require.js"></script>
-  <script src="../lib/jasmine-2.1.1/jasmine.js"></script>
-  <script src="../lib/jasmine-2.1.1/jasmine-html.js"></script>
-  <script src="../lib/jasmine-2.1.1/boot.js"></script>
   <script>
     require.config({
       baseUrl: "../src",
       paths: {
         "lib" : "../lib",
-        "spec" : "../spec"
+        "spec" : "../spec",
+        "jlib" : "lib/jasmine-2.1.1",
+        "jasmine" : ['../lib/jasmine-2.1.1/jasmine'],
+        "jasmine-html": ['../lib/jasmine-2.1.1/jasmine-html'],
+        "jasmine-boot": ['../lib/jasmine-2.1.1/boot']
+      },
+      shim : {
+        'jasmine-html' : {
+          deps : ['jasmine']
+        },
+        'jasmine-boot' : {
+          deps : ['jasmine','jasmine-html']
+        }
       }
     });
-    require([
-    'spec/queryCreatorSpec'
-    ],
-    function () {
-      if (jsApiReporter.finished === true)
-        jasmine.getEnv().execute();
+    require(['jasmine-boot'], function () {
+      require([
+        'spec/queryCreatorSpec'
+     ],
+      function () {
+        window.onload();
+      });
     });
     </script>
 </head>
diff --git a/dev/js/runner/statistic.html b/dev/js/runner/statistic.html
index e309f75..301a420 100644
--- a/dev/js/runner/statistic.html
+++ b/dev/js/runner/statistic.html
@@ -6,26 +6,35 @@
   <link rel="shortcut icon" type="image/png" href="../lib/jasmine-2.1.1/jasmine_favicon.png">
   <link rel="stylesheet" href="../lib/jasmine-2.1.1/jasmine.css">
   <script src="../lib/require.js"></script>
-  <script src="../lib/jasmine-2.1.1/jasmine.js"></script>
-  <script src="../lib/jasmine-2.1.1/jasmine-html.js"></script>
-  <script src="../lib/jasmine-2.1.1/boot.js"></script>
   <script>
     require.config({
       baseUrl: "../src",
       paths: {
         "lib" : "../lib",
-        "spec" : "../spec"
+        "spec" : "../spec",
+        "jlib" : "lib/jasmine-2.1.1",
+        "jasmine" : ['../lib/jasmine-2.1.1/jasmine'],
+        "jasmine-html": ['../lib/jasmine-2.1.1/jasmine-html'],
+        "jasmine-boot": ['../lib/jasmine-2.1.1/boot']
+      },
+      shim : {
+        'jasmine-html' : {
+          deps : ['jasmine']
+        },
+        'jasmine-boot' : {
+          deps : ['jasmine','jasmine-html']
+        }
       }
     });
-    require([
-      'lib/domReady!',
+    require(['jasmine-boot'], function () {
+      require([
       'spec/statSpec'
-    ],
-    function () {
-      if (jsApiReporter.finished === true)
-        jasmine.getEnv().execute();
+     ],
+      function () {
+        window.onload();
+      });
     });
-  </script>
+    </script>
 </head>
 <body>
 </body>
diff --git a/dev/js/runner/vc.html b/dev/js/runner/vc.html
index 2653bb4..b71302b 100644
--- a/dev/js/runner/vc.html
+++ b/dev/js/runner/vc.html
@@ -5,25 +5,34 @@
     <title>Spec Runner for Virtual Collection Builder</title>
     <link rel="shortcut icon" type="image/png" href="../lib/jasmine-2.1.1/jasmine_favicon.png">
     <link rel="stylesheet" href="../lib/jasmine-2.1.1/jasmine.css">
-    <script src="../lib/require.js"></script>
-    <script src="../lib/jasmine-2.1.1/jasmine.js"></script>
-    <script src="../lib/jasmine-2.1.1/jasmine-html.js"></script>
-    <script src="../lib/jasmine-2.1.1/boot.js"></script>
-    <script>
+  <script src="../lib/require.js"></script>
+  <script>
     require.config({
       baseUrl: "../src",
       paths: {
         "lib" : "../lib",
-        "spec" : "../spec"
+        "spec" : "../spec",
+        "jlib" : "lib/jasmine-2.1.1",
+        "jasmine" : ['../lib/jasmine-2.1.1/jasmine'],
+        "jasmine-html": ['../lib/jasmine-2.1.1/jasmine-html'],
+        "jasmine-boot": ['../lib/jasmine-2.1.1/boot']
+      },
+      shim : {
+        'jasmine-html' : {
+          deps : ['jasmine']
+        },
+        'jasmine-boot' : {
+          deps : ['jasmine','jasmine-html']
+        }
       }
     });
-    require([
-      'lib/domReady!',
-      'spec/vcSpec'
-    ],
-    function () {
-      if (jsApiReporter.finished === true)
-        jasmine.getEnv().execute();
+    require(['jasmine-boot'], function () {
+      require([
+        'spec/vcSpec'
+     ],
+      function () {
+        window.onload();
+      });
     });
     </script>
   </head>