From f4c3d873f92a4b81f7dd6990bfbba4519f95f2e6 Mon Sep 17 00:00:00 2001 From: Paul Joseph Davis Date: Sat, 11 Jul 2009 20:48:02 +0000 Subject: Create tests in Futon. On the test suite page there is now a button that will give you a page to create a custom test that can then be submitted along with JIRA tickets. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@793214 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/couch_tests.html | 4 ++ share/www/custom_test.html | 86 +++++++++++++++++++++++++++++++++++++++++ share/www/script/test/basics.js | 3 +- share/www/style/layout.css | 8 ++-- 4 files changed, 95 insertions(+), 6 deletions(-) create mode 100644 share/www/custom_test.html diff --git a/share/www/couch_tests.html b/share/www/couch_tests.html index 0d2e4c3d..d9bde916 100644 --- a/share/www/couch_tests.html +++ b/share/www/couch_tests.html @@ -32,6 +32,9 @@ specific language governing permissions and limitations under the License. $("#toolbar button.load").click(function() { location.reload(true); }); + $("#toolbar button.add").click(function() { + location = "custom_test.html"; + }); }); var testsPath = document.location.toString().split('?')[1]; loadScript(testsPath||"script/couch_tests.js") @@ -46,6 +49,7 @@ specific language governing permissions and limitations under the License.

Note: Each of the tests will block the browser. If the diff --git a/share/www/custom_test.html b/share/www/custom_test.html new file mode 100644 index 00000000..4515ca0f --- /dev/null +++ b/share/www/custom_test.html @@ -0,0 +1,86 @@ + + + + + New Test + + + + + + + + + + + +

+

+ Overview + Test Suite + Custom Test +

+ +
+
+
+ Test Function +
+ + +
+ +
+
+ +    +
+
+
+
+ diff --git a/share/www/script/test/basics.js b/share/www/script/test/basics.js index 231f57ff..911972ba 100644 --- a/share/www/script/test/basics.js +++ b/share/www/script/test/basics.js @@ -181,8 +181,7 @@ couchTests.basics = function(debug) { ["tastyfish", {"_bing": {"wha?": "soda can"}}] ] var test_doc = function(info) { - var data = JSON.stringify(info[1]); - + var data = JSON.stringify(info[1]); xhr = CouchDB.request("PUT", "/test_suite_db/" + info[0], {body: data}); T(xhr.status == 500); result = JSON.parse(xhr.responseText); diff --git a/share/www/style/layout.css b/share/www/style/layout.css index 24348f2a..c9f8cc50 100644 --- a/share/www/style/layout.css +++ b/share/www/style/layout.css @@ -486,11 +486,11 @@ ul.suggest-dropdown li.selected { cursor: pointer; background: Highlight; #tests tbody.content td.running { background-image: url(../image/running.png); color: #333; } -#tests tbody.content td.success { - background-image: url(../image/test_success.gif); color: #060; +#tests tbody.content td.success, span.success { + background-image: url(../image/test_success.gif) no-repeat; color: #060; } -#tests tbody.content td.error, #tests tbody.content td.failure { - background-image: url(../image/test_failure.gif); color: #c00; +#tests tbody.content td.error, #tests tbody.content td.failure, span.failure { + background-image: url(../image/test_failure.gif) no-repeat; color: #c00; } /* Configuration */ -- cgit v1.2.3