Fix HTML reporter display for excluded specs

This commit is contained in:
Gregg Van Hove
2018-01-29 10:00:15 -08:00
parent 3df9cc26d4
commit 341c6df6ea
3 changed files with 14 additions and 14 deletions

View File

@@ -65,7 +65,7 @@ jasmineRequire.HtmlReporter = function(j$) {
ResultsStateBuilder.prototype.specDone = function(result) {
this.currentParent.addChild(result, 'spec');
if (result.status !== 'disabled') {
if (result.status !== 'excluded') {
this.specsExecuted++;
}
@@ -469,7 +469,7 @@ jasmineRequire.HtmlReporter = function(j$) {
}
function hasActiveSpec(resultNode) {
if (resultNode.type == 'spec' && resultNode.result.status != 'disabled') {
if (resultNode.type == 'spec' && resultNode.result.status != 'excluded') {
return true;
}

View File

@@ -92,7 +92,7 @@ describe("HtmlReporter", function() {
expect(specEl.getAttribute("class")).toEqual("jasmine-empty");
});
it("reports the status symbol of a disabled spec", function() {
it("reports the status symbol of a excluded spec", function() {
var env = new jasmineUnderTest.Env(),
container = document.createElement("div"),
getContainer = function() { return container; },
@@ -104,10 +104,10 @@ describe("HtmlReporter", function() {
});
reporter.initialize();
reporter.specDone({id: 789, status: "disabled", fullName: "symbols should have titles", passedExpectations: [], failedExpectations: []});
reporter.specDone({id: 789, status: "excluded", fullName: "symbols should have titles", passedExpectations: [], failedExpectations: []});
var specEl = container.querySelector('.jasmine-symbol-summary li');
expect(specEl.getAttribute("class")).toEqual("jasmine-disabled");
expect(specEl.getAttribute("class")).toEqual("jasmine-excluded");
expect(specEl.getAttribute("id")).toEqual("spec_789");
expect(specEl.getAttribute("title")).toEqual("symbols should have titles");
});
@@ -802,7 +802,7 @@ describe("HtmlReporter", function() {
});
});
describe("and there are disabled specs", function() {
describe("and there are excluded specs", function() {
var env, container, reporter, reporterConfig, specStatus;
beforeEach(function() {
env = new jasmineUnderTest.Env();
@@ -815,9 +815,9 @@ describe("HtmlReporter", function() {
};
specStatus = {
id: 123,
description: "with a disabled spec",
fullName: "A Suite with a disabled spec",
status: "disabled",
description: "with a excluded spec",
fullName: "A Suite with a excluded spec",
status: "excluded",
passedExpectations: [],
failedExpectations: []
};
@@ -834,10 +834,10 @@ describe("HtmlReporter", function() {
reporter.jasmineDone({});
});
it("shows the disabled spec in the spec list", function() {
it("shows the excluded spec in the spec list", function() {
var specList = container.querySelector(".jasmine-summary");
expect(specList.innerHTML).toContain('with a disabled spec');
expect(specList.innerHTML).toContain('with a excluded spec');
});
});
@@ -852,7 +852,7 @@ describe("HtmlReporter", function() {
reporter.jasmineDone({});
});
it("doesn't show the disabled spec in the spec list", function() {
it("doesn't show the excluded spec in the spec list", function() {
var specList = container.querySelector(".jasmine-summary");
expect(specList.innerHTML).toEqual('');

View File

@@ -35,7 +35,7 @@ jasmineRequire.HtmlReporter = function(j$) {
ResultsStateBuilder.prototype.specDone = function(result) {
this.currentParent.addChild(result, 'spec');
if (result.status !== 'disabled') {
if (result.status !== 'excluded') {
this.specsExecuted++;
}
@@ -439,7 +439,7 @@ jasmineRequire.HtmlReporter = function(j$) {
}
function hasActiveSpec(resultNode) {
if (resultNode.type == 'spec' && resultNode.result.status != 'disabled') {
if (resultNode.type == 'spec' && resultNode.result.status != 'excluded') {
return true;
}