aboutsummaryrefslogtreecommitdiffstats
path: root/test-agent
diff options
context:
space:
mode:
Diffstat (limited to 'test-agent')
-rw-r--r--test-agent/config.json3
-rw-r--r--test-agent/index.html29
-rw-r--r--test-agent/index.js43
-rw-r--r--test-agent/package.json0
-rw-r--r--test-agent/sandbox.html34
5 files changed, 109 insertions, 0 deletions
diff --git a/test-agent/config.json b/test-agent/config.json
new file mode 100644
index 0000000..f4f0f2a
--- /dev/null
+++ b/test-agent/config.json
@@ -0,0 +1,3 @@
+{"tests": [
+"webcals/ical_test.js","webcals/request/abstract_test.js","webcals/request/calendar_query_test.js","webcals/request/propfind_test.js","webcals/resource_root_test.js","webcals/sax/base_test.js","webcals/sax/dav_response_test.js","webcals/sax_test.js","webcals/template_test.js","webcals/templates/calendar_data_test.js","webcals/templates/calendar_filter_test.js","webcals/xhr_test.js"
+ ]}
diff --git a/test-agent/index.html b/test-agent/index.html
new file mode 100644
index 0000000..b2e7bb5
--- /dev/null
+++ b/test-agent/index.html
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+
+ <title>Serve the tests</title>
+ <link rel="stylesheet" href="../vendor/test-agent.css" type="text/css" charset="utf-8">
+ <style type="text/css" media="all">
+ body > iframe {
+ width: 100%;
+ height: 100%;
+ visibility: visible;
+ border: 1px solid white;
+ }
+ </style>
+</head>
+<body>
+
+<!-- Test Agent UI will be loaded in here -->
+<div id="test-agent-ui">
+</div>
+
+<!-- Load the bare minimum to get the ui and runner working -->
+<script src="../vendor/test-agent.js" type="text/javascript" charset="utf-8"></script>
+<script src="./index.js" type="text/javascript" charset="utf-8"></script>
+
+</body>
+</html>
+
diff --git a/test-agent/index.js b/test-agent/index.js
new file mode 100644
index 0000000..637062b
--- /dev/null
+++ b/test-agent/index.js
@@ -0,0 +1,43 @@
+(function(window) {
+
+ var worker = new TestAgent.BrowserWorker({
+ /* this is where your tests will be loaded into */
+ sandbox: './sandbox.html'
+ });
+
+ worker.use(TestAgent.BrowserWorker.Config, {
+ /* config file which lists all available tests for the ui */
+ url: './config.json'
+ });
+
+ worker.use(TestAgent.BrowserWorker.MochaDriver, {
+ /* path to mocha */
+ mochaUrl: '../vendor/mocha.js',
+ testHelperUrl: '../test/helper.js',
+ reporter: 'HTML'
+ });
+
+ worker.use(TestAgent.BrowserWorker.Websocket);
+ worker.use(TestAgent.BrowserWorker.TestUi);
+ worker.use(TestAgent.BrowserWorker.ErrorReporting);
+
+ worker.on({
+
+ 'sandbox': function() {
+ },
+
+ 'open': function() {
+ console.log('socket open');
+ },
+
+ 'close': function() {
+ console.log('lost client trying to reconnect');
+ }
+
+ });
+
+ worker.config();
+ worker.start();
+
+}(this));
+
diff --git a/test-agent/package.json b/test-agent/package.json
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test-agent/package.json
diff --git a/test-agent/sandbox.html b/test-agent/sandbox.html
new file mode 100644
index 0000000..8b8fb94
--- /dev/null
+++ b/test-agent/sandbox.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <title>Tests</title>
+ <link rel="stylesheet" type="text/css" href="../vendor/mocha.css" />
+ <style type="text/css" media="all">
+ iframe {
+ border: none;
+ padding: 0px;
+ }
+ </style>
+ <script type="text/javascript" charset="utf-8">
+ </script>
+</head>
+
+<body>
+
+<!--
+For Mocha HTML reporter
+-->
+<div id="mocha">
+</div>
+
+<!--
+A central place to add to the dom then tear that down after your test
+-->
+<div id="test">
+</div>
+
+</body>
+</html>
+
+