Add a "run all" link.
This commit is contained in:
parent
027b28ecb0
commit
1c9607ec33
|
@ -30,7 +30,9 @@ jasmine.TrivialReporter.prototype.createDom = function(type, attrs, childrenVarA
|
|||
jasmine.TrivialReporter.prototype.reportRunnerStarting = function(runner) {
|
||||
var suites = runner.getAllSuites();
|
||||
|
||||
this.runnerDiv = this.createDom('div', { className: 'runner running' }, "Running...");
|
||||
this.runnerDiv = this.createDom('div', { className: 'runner running' },
|
||||
this.createDom('a', { className: 'runSpec', href: '?' }, "run all"),
|
||||
this.runnerMessageSpan = this.createDom('span', {}, "Running..."));
|
||||
this.document.body.appendChild(this.runnerDiv);
|
||||
|
||||
for (var i = 0; i < suites.length; i++) {
|
||||
|
@ -54,7 +56,7 @@ jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) {
|
|||
var className = (results.failedCount > 0) ? "runner failed" : "runner passed";
|
||||
this.runnerDiv.setAttribute("class", className);
|
||||
var message = results.failedCount + " failure" + ((results.failedCount == 1) ? "" : "s");
|
||||
this.runnerDiv.replaceChild(this.document.createTextNode(message), this.runnerDiv.firstChild);
|
||||
this.runnerMessageSpan.replaceChild(this.document.createTextNode(message), this.runnerDiv.firstChild);
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) {
|
||||
|
|
|
@ -27,6 +27,7 @@ p {
|
|||
border: 1px outset gray;
|
||||
margin: 5px;
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
.runner.running {
|
||||
|
|
Loading…
Reference in New Issue