Allow individual specs to be rerun; show skipped tests in gray.
This commit is contained in:
@@ -26,19 +26,22 @@ jasmine.TrivialReporter.prototype.createDom = function(type, attrs, childrenVarA
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) {
|
||||
console.log(runner);
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) {
|
||||
console.log(suite);
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) {
|
||||
var specDiv = this.createDom('div', {
|
||||
className: spec.getResults().passed() ? 'spec passed' : 'spec failed'
|
||||
}, spec.getFullName());
|
||||
var results = spec.getResults();
|
||||
var status = results.passed() ? 'passed' : 'failed';
|
||||
if (results.skipped) {
|
||||
status = 'skipped';
|
||||
}
|
||||
var specDiv = this.createDom('div', { className: 'spec ' + status },
|
||||
this.createDom('a', { className: 'runSpec', href: '?spec=' + encodeURIComponent(spec.getFullName()) }, "run"),
|
||||
spec.getFullName());
|
||||
|
||||
var resultItems = spec.getResults().getItems();
|
||||
var resultItems = results.getItems();
|
||||
for (var i = 0; i < resultItems.length; i++) {
|
||||
var result = resultItems[i];
|
||||
if (!result.passed) {
|
||||
|
||||
@@ -20,12 +20,13 @@ p {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.fail_in_summary {
|
||||
.failInSummary {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.spec {
|
||||
margin: 5px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.passed {
|
||||
@@ -36,6 +37,11 @@ p {
|
||||
background-color: pink;
|
||||
}
|
||||
|
||||
.skipped {
|
||||
color: #777;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.resultMessage {
|
||||
white-space: pre;
|
||||
}
|
||||
@@ -49,3 +55,8 @@ p {
|
||||
border-left: 1px solid red;
|
||||
padding-left: 5em;
|
||||
}
|
||||
|
||||
.runSpec {
|
||||
margin-left: 5px;
|
||||
float: right;
|
||||
}
|
||||
Reference in New Issue
Block a user