diff --git a/lib/protractor-xml2html-reporter.js b/lib/protractor-xml2html-reporter.js index adedf44..9c63238 100644 --- a/lib/protractor-xml2html-reporter.js +++ b/lib/protractor-xml2html-reporter.js @@ -150,7 +150,7 @@ var HTMLReport = function() { screenshotName+=(report.browser + ' '); } if (report.testSuitePrefix){ - screenshotName+=(suite.name + ' '); + screenshotName+=(suite.name.replace(/\./g,' ') + ' '); } screenshotName+=testCasesNames[j] + '.png'; @@ -161,13 +161,13 @@ var HTMLReport = function() { if ( !report.browserPrefix && !report.testSuitePrefix && !report.fileNameSeparator ) { //For those still using the legacy/default naming - screenshotsNamesOnFailure.push(report.browser +'-'+ suite.name.substring(suite.name.indexOf(".")+1) + ' ' + testCasesNames[j] + '.png'); + screenshotsNamesOnFailure.push(encodeURIComponent(report.browser +'-'+ suite.name.substring(suite.name.indexOf(".")+1) + ' ' + testCasesNames[j] + '.png')); } else { - screenshotsNamesOnFailure.push(screenshotName); + screenshotsNamesOnFailure.push(encodeURIComponent(screenshotName)); } } else { - screenshotsNamesOnFailure.push(report.browser +'-'+ suite.name + ' ' + testCasesNames[j] + '.png'); + screenshotsNamesOnFailure.push(encodeURIComponent(report.browser +'-'+ suite.name.replace(/\./g,' ') + ' ' + testCasesNames[j] + '.png')); } } }