cucumber-html-reporter
Advanced tools
Comparing version 0.3.6 to 0.3.7
@@ -0,1 +1,8 @@ | ||
### 0.3.7 (2016-12-09) | ||
### Fix | ||
* Sanitize Screenshot filename [Issue#45](https://github.com/gkushang/cucumber-html-reporter/issues/45) [PR#46](https://github.com/gkushang/cucumber-html-reporter/pull/46) | ||
### 0.3.6 (2016-12-06) | ||
@@ -2,0 +9,0 @@ |
@@ -117,2 +117,11 @@ 'use strict'; | ||
step.embeddings.forEach(function(embedding) { | ||
var sanitizeFileName = function(name) { | ||
var unsafeCharacters = /[\/\\\|:"\*\?<>]/g; | ||
name = name.trim(); | ||
name = name.replace(unsafeCharacters, ' '); | ||
name = name.split(' ').join('_'); | ||
return name; | ||
}; | ||
if (embedding.mime_type === 'text/plain') { | ||
@@ -125,3 +134,3 @@ if (!step.text) { | ||
} else if (options.storeScreenShots && options.storeScreenShots === true) { | ||
var name = step.name && step.name.split(' ').join('_') || step.keyword.trim(); | ||
var name = sanitizeFileName(step.name || step.keyword); | ||
if (!fs.existsSync(screenShotDirectory)) { | ||
@@ -128,0 +137,0 @@ fs.mkdirSync(screenShotDirectory); |
{ | ||
"name": "cucumber-html-reporter", | ||
"version": "0.3.6", | ||
"version": "0.3.7", | ||
"description": "Generates Cucumber HTML reports in three different themes", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1607012
2154