Merge branch '5.99' into 6.0
This commit is contained in:
@@ -528,7 +528,6 @@ describe('HtmlReporter', function() {
|
||||
|
||||
let specResult = {
|
||||
id: 123,
|
||||
parentSuiteId: 1,
|
||||
description: 'with a spec',
|
||||
fullName: 'A Suite with a spec',
|
||||
status: 'passed',
|
||||
@@ -606,9 +605,7 @@ describe('HtmlReporter', function() {
|
||||
const suiteDetail = outerSuite.childNodes[0];
|
||||
const suiteLink = suiteDetail.childNodes[0];
|
||||
expect(suiteLink.innerHTML).toEqual('A Suite');
|
||||
expect(suiteLink.getAttribute('href')).toEqual(
|
||||
'/?foo=bar&spec=["A Suite"]'
|
||||
);
|
||||
expect(suiteLink.getAttribute('href')).toEqual('/?foo=bar&spec=A Suite');
|
||||
|
||||
const specs = outerSuite.childNodes[1];
|
||||
const spec = specs.childNodes[0];
|
||||
@@ -618,7 +615,7 @@ describe('HtmlReporter', function() {
|
||||
const specLink = spec.childNodes[0];
|
||||
expect(specLink.innerHTML).toEqual('with a spec');
|
||||
expect(specLink.getAttribute('href')).toEqual(
|
||||
'/?foo=bar&spec=["A Suite","with a spec"]'
|
||||
'/?foo=bar&spec=A Suite with a spec'
|
||||
);
|
||||
|
||||
const specDuration = spec.childNodes[1];
|
||||
@@ -1368,11 +1365,6 @@ describe('HtmlReporter', function() {
|
||||
},
|
||||
createTextNode: function() {
|
||||
return document.createTextNode.apply(document, arguments);
|
||||
},
|
||||
queryString: {
|
||||
getParam(name) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
};
|
||||
specStatus = {
|
||||
@@ -1387,12 +1379,7 @@ describe('HtmlReporter', function() {
|
||||
|
||||
describe('when the specs are not filtered', function() {
|
||||
beforeEach(function() {
|
||||
reporterConfig.queryString.getParam = function(name) {
|
||||
if (name !== 'spec') {
|
||||
throw new Error('Unexpected query param ' + name);
|
||||
}
|
||||
return '';
|
||||
};
|
||||
reporterConfig.filterSpecs = false;
|
||||
reporter = new jasmineUnderTest.HtmlReporter(reporterConfig);
|
||||
reporter.initialize();
|
||||
reporter.jasmineStarted({ totalSpecsDefined: 1 });
|
||||
@@ -1410,12 +1397,7 @@ describe('HtmlReporter', function() {
|
||||
|
||||
describe('when the specs are filtered', function() {
|
||||
beforeEach(function() {
|
||||
reporterConfig.queryString.getParam = function(name) {
|
||||
if (name !== 'spec') {
|
||||
throw new Error('Unexpected query param ' + name);
|
||||
}
|
||||
return 'not the empty string';
|
||||
};
|
||||
reporterConfig.filterSpecs = true;
|
||||
reporter = new jasmineUnderTest.HtmlReporter(reporterConfig);
|
||||
reporter.initialize();
|
||||
reporter.jasmineStarted({ totalSpecsDefined: 1 });
|
||||
@@ -1559,7 +1541,6 @@ describe('HtmlReporter', function() {
|
||||
|
||||
const failingSpecResult = {
|
||||
id: 124,
|
||||
parentSuiteId: 2,
|
||||
status: 'failed',
|
||||
description: 'a failing spec',
|
||||
fullName: 'a suite inner suite a failing spec',
|
||||
@@ -1683,18 +1664,16 @@ describe('HtmlReporter', function() {
|
||||
expect(links.length).toEqual(3);
|
||||
expect(links[0].textContent).toEqual('A suite');
|
||||
|
||||
expect(links[0].getAttribute('href')).toEqual(
|
||||
'/?foo=bar&spec=["A suite"]'
|
||||
);
|
||||
expect(links[0].getAttribute('href')).toMatch(/\?foo=bar&spec=A suite/);
|
||||
|
||||
expect(links[1].textContent).toEqual('inner suite');
|
||||
expect(links[1].getAttribute('href')).toEqual(
|
||||
'/?foo=bar&spec=["A suite","inner suite"]'
|
||||
expect(links[1].getAttribute('href')).toMatch(
|
||||
/\?foo=bar&spec=A suite inner suite/
|
||||
);
|
||||
|
||||
expect(links[2].textContent).toEqual('a failing spec');
|
||||
expect(links[2].getAttribute('href')).toEqual(
|
||||
'/?foo=bar&spec=["A suite","inner suite","a failing spec"]'
|
||||
expect(links[2].getAttribute('href')).toMatch(
|
||||
/\?foo=bar&spec=a suite inner suite a failing spec/
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user