Merge pull request #356 from sheelc/spec_titles
Add titles to specs in HtmlReporter
This commit is contained in:
@@ -87,7 +87,8 @@ jasmine.HtmlReporter = function(options) {
|
|||||||
|
|
||||||
symbols.appendChild(createDom("li", {
|
symbols.appendChild(createDom("li", {
|
||||||
className: result.status,
|
className: result.status,
|
||||||
id: "spec_" + result.id}
|
id: "spec_" + result.id,
|
||||||
|
title: result.fullName}
|
||||||
));
|
));
|
||||||
|
|
||||||
if (result.status == "failed") {
|
if (result.status == "failed") {
|
||||||
|
|||||||
@@ -46,12 +46,13 @@ describe("New HtmlReporter", function() {
|
|||||||
});
|
});
|
||||||
reporter.initialize();
|
reporter.initialize();
|
||||||
|
|
||||||
reporter.specDone({id: 789, status: "disabled"});
|
reporter.specDone({id: 789, status: "disabled", fullName: "symbols should have titles"});
|
||||||
|
|
||||||
var statuses = container.getElementsByClassName('symbol-summary')[0];
|
var statuses = container.getElementsByClassName('symbol-summary')[0];
|
||||||
var specEl = statuses.getElementsByTagName('li')[0];
|
var specEl = statuses.getElementsByTagName('li')[0];
|
||||||
expect(specEl.getAttribute("class")).toEqual("disabled");
|
expect(specEl.getAttribute("class")).toEqual("disabled");
|
||||||
expect(specEl.getAttribute("id")).toEqual("spec_789");
|
expect(specEl.getAttribute("id")).toEqual("spec_789");
|
||||||
|
expect(specEl.getAttribute("title")).toEqual("symbols should have titles");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("reports the status symbol of a pending spec", function() {
|
it("reports the status symbol of a pending spec", function() {
|
||||||
|
|||||||
@@ -65,7 +65,8 @@ jasmine.HtmlReporter = function(options) {
|
|||||||
|
|
||||||
symbols.appendChild(createDom("li", {
|
symbols.appendChild(createDom("li", {
|
||||||
className: result.status,
|
className: result.status,
|
||||||
id: "spec_" + result.id}
|
id: "spec_" + result.id,
|
||||||
|
title: result.fullName}
|
||||||
));
|
));
|
||||||
|
|
||||||
if (result.status == "failed") {
|
if (result.status == "failed") {
|
||||||
|
|||||||
Reference in New Issue
Block a user