cucumber-html-reporter
Advanced tools
Comparing version 5.1.0 to 5.2.0
@@ -35,4 +35,22 @@ 'use strict'; | ||
function addTimestamp(featureItem) { | ||
if (featureItem["elements"] && featureItem["elements"][0] && | ||
featureItem["elements"][0]["steps"] && featureItem["elements"][0]["steps"][0] && | ||
featureItem["elements"][0]["steps"][0]["output"] && featureItem["elements"][0]["steps"][0]["output"][0]) { | ||
if (typeof featureItem["elements"][0]["steps"][0]["output"][0] !== 'undefined') { | ||
var timestamp = featureItem["elements"][0]["steps"][0]["output"][0]; | ||
featureItem["timestamp"] = Date.parse(timestamp.match(/[0-9]{4}-.+:[0-9]{2}/g)); | ||
} | ||
} | ||
return featureItem; | ||
} | ||
files.map(mergeJSONS); | ||
jsonOutput.map(addTimestamp); | ||
jsonOutput.sort(function (feature, nextFeature) { | ||
return feature.timestamp - nextFeature.timestamp; | ||
}); | ||
jsonFile.writeFileSync(options.output + '.json', jsonOutput, {spaces: 2}); | ||
@@ -39,0 +57,0 @@ |
{ | ||
"name": "cucumber-html-reporter", | ||
"version": "5.1.0", | ||
"version": "5.2.0", | ||
"description": "Generates Cucumber HTML reports in three different themes", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,9 +0,12 @@ | ||
$('a.toggle').on('click', function() { | ||
$('a.toggle').on('click', function(e) { | ||
e.preventDefault(); | ||
if ($(this).text() === 'Screenshot -') { | ||
// $(this).text('Screenshot +'); | ||
$(this).next('a.screenshot').find('img').hide(); | ||
} else if($(this).text() === 'Screenshot +') { | ||
// $(this).text('Screenshot -'); | ||
$(this).next('a.screenshot').find('img').show(); | ||
if (!$(this).hasClass('collapse')) { | ||
if ($(this).text() === 'Screenshot -') { | ||
// $(this).text('Screenshot +'); | ||
$(this).next('a.screenshot').find('img').hide(); | ||
} else if($(this).text() === 'Screenshot +') { | ||
// $(this).text('Screenshot -'); | ||
$(this).next('a.screenshot').find('img').show(); | ||
} | ||
} | ||
@@ -10,0 +13,0 @@ |
Sorry, the diff of this file is not supported yet
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
1986404
2573