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) {
|
jasmine.TrivialReporter.prototype.reportRunnerStarting = function(runner) {
|
||||||
var suites = runner.getAllSuites();
|
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);
|
this.document.body.appendChild(this.runnerDiv);
|
||||||
|
|
||||||
for (var i = 0; i < suites.length; i++) {
|
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";
|
var className = (results.failedCount > 0) ? "runner failed" : "runner passed";
|
||||||
this.runnerDiv.setAttribute("class", className);
|
this.runnerDiv.setAttribute("class", className);
|
||||||
var message = results.failedCount + " failure" + ((results.failedCount == 1) ? "" : "s");
|
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) {
|
jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) {
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ p {
|
|||||||
border: 1px outset gray;
|
border: 1px outset gray;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
padding-left: 1em;
|
padding-left: 1em;
|
||||||
|
padding-right: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.runner.running {
|
.runner.running {
|
||||||
|
|||||||
Reference in New Issue
Block a user