Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cucumber-html-reporter

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cucumber-html-reporter - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

86

CHANGELOG.md

@@ -0,1 +1,13 @@

### 0.4.1 (2017-04-27)
##### Enhancement
* Add `brandTitle` to display on report. Checkout README for more details.
##### Fix
* Step duration time in html report always shows 0s [Issue#61](https://github.com/gkushang/cucumber-html-reporter/issues/61) [PR#62](https://github.com/gkushang/cucumber-html-reporter/pull/62)
* Should not count Before/After hooks if they are hidden [Issue#63](https://github.com/gkushang/cucumber-html-reporter/issues/63) [PR#64](https://github.com/gkushang/cucumber-html-reporter/pull/64)
### 0.4.0 (2017-03-24)

@@ -5,3 +17,3 @@

### Revert the change
##### Revert the change

@@ -15,3 +27,3 @@ * Use fs-extra [PR#59](https://github.com/gkushang/cucumber-html-reporter/pull/59)

### Fix
##### Fix

@@ -23,3 +35,3 @@ * Remove support for fs-extra for backward compatibility to support Node versions <0.12

### Fix
##### Fix

@@ -34,3 +46,3 @@ * Use fs-extra instead of node-fs [PR#50](https://github.com/gkushang/cucumber-html-reporter/pull/50)

### Fix
##### Fix

@@ -42,3 +54,3 @@ * 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)

### Fix
##### Fix

@@ -50,3 +62,3 @@ * Failure in Before hook should fail the Feature/Scenario, Add slice to rest of the scenario pie charts [PR#44](https://github.com/gkushang/cucumber-html-reporter/pull/44)

### Enhancements
##### Enhancements

@@ -59,3 +71,3 @@ * Colors

### Enhancements
##### Enhancements

@@ -68,3 +80,3 @@ * Step Duration

### Enhancements
##### Enhancements

@@ -77,3 +89,3 @@ * Ambiguous Steps

### Enhancements
##### Enhancements

@@ -86,3 +98,3 @@ * Show Metadata

### Enhancements
##### Enhancements

@@ -97,3 +109,3 @@ * Adding latest Previews to the readme for all themes

#### Enhancements
##### Enhancements

@@ -112,3 +124,3 @@ * Inline Screenshots

#### Fixes
##### Fixes

@@ -120,3 +132,3 @@ * Fixes [ISSUE#29](https://github.com/gkushang/cucumber-html-reporter/issues/29)

#### Enhancements
##### Enhancements

@@ -131,3 +143,3 @@ * Tags on Report

#### Enhancements
##### Enhancements

@@ -140,3 +152,3 @@ * Scenario Description

#### Fix
##### Fix

@@ -148,3 +160,3 @@ * Fix for older node versions: [ISSUE#30](https://github.com/gkushang/cucumber-html-reporter/issues/30)

#### Enhancements
##### Enhancements

@@ -156,3 +168,3 @@ * Option to add custom name to the project & adds footer: [PR#28](https://github.com/gkushang/cucumber-html-reporter/pull/28)

#### Enhancements
##### Enhancements

@@ -164,3 +176,3 @@ * Show time taken by each steps to complete the execution on report: [PR#17](https://github.com/gkushang/cucumber-html-reporter/pull/17) & [PR#27](https://github.com/gkushang/cucumber-html-reporter/pull/27)

#### Fixes
##### Fixes

@@ -172,3 +184,3 @@ * Show hidden hooks if they fail: [PR#25](https://github.com/gkushang/cucumber-html-reporter/pull/25)

#### Fixes
##### Fixes

@@ -182,3 +194,3 @@ * Fix typo on README: [PR#22](https://github.com/gkushang/cucumber-html-reporter/pull/22)

#### Enhancements
##### Enhancements

@@ -192,3 +204,3 @@ * Conditionally hide hidden steps from the report: [PR#20](https://github.com/gkushang/cucumber-html-reporter/pull/20)

#### Enhancements
##### Enhancements

@@ -200,3 +212,3 @@ * Ignore the bad JSON files when consolidating from the JSON Directory: [PR#13](https://github.com/gkushang/cucumber-html-reporter/pull/13)

#### BugFix
##### BugFix

@@ -208,3 +220,3 @@ * Fixed the issue when report was breaking with the Cucumber's Doc String: [Issue#14](https://github.com/gkushang/cucumber-html-reporter/issues/14)

#### Enhancements
##### Enhancements

@@ -235,3 +247,3 @@ * Generate consolidated report from multiple JSON files: [PR#12](https://github.com/gkushang/cucumber-html-reporter/pull/12)

#### Enhancements
##### Enhancements

@@ -262,3 +274,3 @@ * Launch report automatically after test ends

#### BugFix
##### BugFix

@@ -269,3 +281,3 @@ * Fixed the issue where Error messages were not printing on the report.

#### Enhancements
##### Enhancements

@@ -276,3 +288,3 @@ * trim the text to be printed on report

#### BugFix
##### BugFix

@@ -283,3 +295,3 @@ * https://github.com/mavdi/grunt-cucumberjs/issues/86

#### Enhancements
##### Enhancements

@@ -290,3 +302,3 @@ * Published https://github.com/gkushang/cucumber-html-reporter/pull/10 Set charset as utf-8

#### BugFix
##### BugFix

@@ -297,3 +309,3 @@ * Fixes https://github.com/gkushang/cucumber-html-reporter/issues/7

#### Enhancements
##### Enhancements

@@ -307,3 +319,3 @@ * Recursively create HTML report directory if does not exists

#### Support for Cucumber@1.2.0 version
##### Support for Cucumber@1.2.0 version

@@ -315,3 +327,3 @@ * Screenshot attachment support for Cucumber release >= @1.2.0 (https://github.com/cucumber/cucumber-js/blob/master/CHANGELOG.md#bug-fixes-1)

#### Enhancements
##### Enhancements

@@ -325,3 +337,3 @@ * Format feature descriptions on report

#### Enhancements
##### Enhancements

@@ -332,3 +344,3 @@ * Show feature description on report

#### Bug fixes
##### Bug fixes

@@ -340,3 +352,3 @@ * Fix bug when cucumber error message has kind of html tags as a string, e.g. <object> is not defined.

#### Enhancements
##### Enhancements

@@ -352,3 +364,3 @@ * Using `path` instead of separators to make platform agnostic

#### Bug fixes
##### Bug fixes

@@ -362,3 +374,3 @@ * Fixed a bug in template path

#### New Features
##### New Features

@@ -365,0 +377,0 @@ * Tooltip for Scenarios or Features in the HEADER based on reportSuiteAsScenarios flag

@@ -11,3 +11,3 @@ 'use strict';

var generateReport = function(options) {
var generateReport = function (options) {

@@ -38,2 +38,3 @@ var featureOutput = jsonFile.readFileSync(options.jsonFile);

name: options.name || packageJson && packageJson.name,
brandTitle: options.brandTitle,
version: packageJson && packageJson.version,

@@ -56,3 +57,3 @@ time: new Date(),

var createReportDirectoryIfNotExists = function() {
var createReportDirectoryIfNotExists = function () {
if (!fs.existsSync(options.output)) {

@@ -65,3 +66,3 @@ fs.mkdirsSync(path.dirname(options.output));

var calculateDuration = function(duration) {
var calculateDuration = function (duration) {
var oneNanoSecond = 1000000000;

@@ -71,5 +72,13 @@ var oneMinute = 60 * oneNanoSecond;

function format(min, sec) {
sec = sec + 's';
return min > 0 ? min + 'm ' + sec : sec;
function format(min, sec, ms) {
var MINUTES = 'm ';
var SECONDS = 's ';
var MILLI_SECONDS = 'ms';
var formattedTimeStamp = '';
min > 0 ? formattedTimeStamp += min + MINUTES : '';
sec > 0 ? formattedTimeStamp += sec + SECONDS : '';
ms > 0 ? formattedTimeStamp += ms + MILLI_SECONDS : '';
return formattedTimeStamp;
}

@@ -80,7 +89,8 @@

var sec = _.round((duration % oneMinute) / oneNanoSecond);
return format(min, sec);
var ms = _.round((duration % oneNanoSecond) / 1000000);
return format(min, sec, ms);
}
};
var setStats = function(suite) {
var setStats = function (suite) {
var featureOutput = suite.features;

@@ -93,3 +103,3 @@ var featuresSummary = suite.features.summary;

featureOutput.forEach(function(feature) {
featureOutput.forEach(function (feature) {
feature.scenarios = {};

@@ -110,3 +120,3 @@ feature.scenarios.passed = 0;

feature.elements.forEach(function(element) {
feature.elements.forEach(function (element) {
element.passed = 0;

@@ -120,8 +130,12 @@ element.failed = 0;

element.steps.forEach(function(step) {
if (element.type === 'background') {
return;
}
element.steps.forEach(function (step) {
if (step.embeddings !== undefined) {
var Base64 = require('js-base64').Base64;
step.embeddings.forEach(function(embedding) {
step.embeddings.forEach(function (embedding) {
var sanitizeFileName = function(name) {
var sanitizeFileName = function (name) {
var unsafeCharacters = /[\/\\\|:"\*\?<>]/g;

@@ -155,3 +169,3 @@ name = name.trim();

if (!step.result) {
if (!step.result || (step.hidden && !step.text && !step.image)) {
return 0;

@@ -184,3 +198,3 @@ }

}
if (element.failed > 0) {

@@ -192,7 +206,7 @@ feature.scenarios.failed++;

if (element.ambiguous > 0) {
if (element.ambiguous > 0) {
feature.scenarios.ambiguous++;
featuresSummary.isAmbiguous = true;
featuresSummary.isAmbiguous = true;
return suite.scenarios.ambiguous++;
}
}

@@ -204,3 +218,3 @@ if (element.notdefined > 0) {

if (element.pending > 0) {
if (element.pending > 0) {
feature.scenarios.pending++;

@@ -219,3 +233,3 @@ return suite.scenarios.pending++;

}
});

@@ -239,3 +253,3 @@

suite.reportAs = 'scenarios';
}
}

@@ -245,5 +259,5 @@ if (feature.time) {

}
return suite;
return suite;
});

@@ -250,0 +264,0 @@

{
"name": "cucumber-html-reporter",
"version": "0.4.0",
"version": "0.4.1",
"description": "Generates Cucumber HTML reports in three different themes",

@@ -34,2 +34,6 @@ "main": "index.js",

"url": "https://github.com/AlexandrosD"
},
{
"name": "spujar",
"url": "https://github.com/spujar"
}

@@ -36,0 +40,0 @@ ],

@@ -151,2 +151,7 @@ cucumber-html-reporter

#### `brandTitle`
Type: `String` (optional)
Brand Title is the brand of your report, e.g. Smoke Tests Report, Acceptance Test Report etc as per your need. If not passed, it will be displayed as "Cucumberjs Report"
#### `storeScreenShots`

@@ -153,0 +158,0 @@ Type: `Boolean`

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc