Skip to content
Permalink
Browse files

Added visual pass/fail indicator (JUnit/Eclipse style)

  • Loading branch information
jzaefferer committed Nov 15, 2006
1 parent d6ab3c7 commit db621dd8ddf90259d4a170691fdd15574c2c011b
Showing with 10 additions and 5 deletions.
  1. +4 −3 build/test/data/testrunner.js
  2. +6 −2 build/test/data/testsuite.css
@@ -43,10 +43,11 @@ function runTest(tests) {
synchronize(function() {
var runTime = new Date() - startTime;
var result = document.createElement("div");
result.innerHTML = '<p class="result">Tests completed in ' +
runTime + ' milliseconds.<br/>' +
stats.bad + ' tests of ' + stats.all + ' failed.</p>';
result.innerHTML = ['<p class="result">Tests completed in ',
runTime, ' milliseconds.<br/>',
stats.bad, ' tests of ', stats.all, ' failed.</p>'].join('');
document.getElementsByTagName("body")[0].appendChild(result);
$("<div id='banner'>").addClass(stats.bad ? "fail" : "pass").insertAfter("h1");
});
}

@@ -1,8 +1,12 @@
body, div, h1 { font-family: 'trebuchet ms', verdana, arial; margin: 0; padding: 0 }
body { margin: 0; padding: 0; font-size: small; }
h1 { padding: 15px; margin: 0; font-size: large; background-color: #06b; color: white; border-bottom: 1px solid #ccc }
h1 { padding: 15px; margin: 0; font-size: large; background-color: #06b; color: white; }
h2 { padding: 10px; background-color: #eee; color: black; margin: 0; font-size: small; font-weight: normal }

.pass { color: green; }
.fail { color: red; }
p.result { margin-left: 1em; }
p.result { margin-left: 1em; }

#banner { height: 2em; }
#banner.pass { background-color: green }
#banner.fail { background-color: red; }

0 comments on commit db621dd

Please sign in to comment.
You can’t perform that action at this time.