Add new HTMLReporter

This commit is contained in:
Davis W. Frank & Sean Durham
2011-11-04 14:41:42 -07:00
parent de9e2abad5
commit ad4f48dcd4
22 changed files with 1793 additions and 339 deletions

22
src/html/SuiteView.js Normal file
View File

@@ -0,0 +1,22 @@
jasmine.HtmlReporter.SuiteView = function(suite, dom, views) {
this.suite = suite;
this.dom = dom;
this.views = views;
this.element = this.createDom('div', { className: 'suite' },
this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(this.suite.getFullName()) }, this.suite.description)
);
this.appendToSummary(this.suite, this.element);
};
jasmine.HtmlReporter.SuiteView.prototype.status = function() {
return this.getSpecStatus(this.suite);
};
jasmine.HtmlReporter.SuiteView.prototype.refresh = function() {
this.element.className += " " + this.status();
};
jasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.SuiteView);