multiple-cucumber-html-reporter
Advanced tools
Comparing version 1.2.0 to 1.3.0
CHANGELOG | ||
========= | ||
<a name="1.3.0"></a> | ||
## [1.3.0](https://github.com/wswebcreation/multiple-cucumber-html-reporter/compare/v1.2.0...v1.3.0) (2017-11-19) | ||
### Features | ||
* **feature:** add the possibility to add a custom datablock to the features overview | ||
<a name="1.2.0"></a> | ||
@@ -5,0 +12,0 @@ ## [1.2.0](https://github.com/wswebcreation/multiple-cucumber-html-reporter/compare/v1.1.0...v1.2.0) (2017-11-13) |
@@ -17,2 +17,3 @@ 'use strict'; | ||
const FEATURES_OVERVIEW_INDEX_TEMPLATE = 'features-overview.index.tmpl'; | ||
const CUSTOMDATA_TEMPLATE = 'components/custom-data.tmpl'; | ||
const FEATURES_OVERVIEW_TEMPLATE = 'components/features-overview.tmpl'; | ||
@@ -32,2 +33,3 @@ const FEATURES_OVERVIEW_CHART_TEMPLATE = 'components/features-overview.chart.tmpl'; | ||
}; | ||
const DEFAULT_REPORTNAME = 'Multiple Cucumber HTML Reporter'; | ||
@@ -47,7 +49,8 @@ function generateReport(options) { | ||
const customData = options.customData || null; | ||
const disableLog = options.disableLog; | ||
const openReportInBrowser = options.openReportInBrowser; | ||
const reportName = options.reportName || DEFAULT_REPORTNAME; | ||
const reportPath = path.resolve(process.cwd(), options.reportPath); | ||
const saveCollectedJSON = options.saveCollectedJSON; | ||
const disableLog = options.disableLog; | ||
@@ -61,2 +64,3 @@ fs.ensureDirSync(reportPath); | ||
app: 0, | ||
customData: customData, | ||
browser: 0, | ||
@@ -76,3 +80,3 @@ name: '', | ||
}, | ||
totalTime: 0, | ||
reportName: reportName, | ||
scenarios: { | ||
@@ -86,3 +90,4 @@ passed: 0, | ||
total: 0 | ||
} | ||
}, | ||
totalTime: 0 | ||
}; | ||
@@ -379,8 +384,12 @@ | ||
}), | ||
featuresOverviewChart: _.template(_readTemplateFile(FEATURES_OVERVIEW_CHART_TEMPLATE))({ | ||
featuresScenariosOverviewChart: _.template(_readTemplateFile(SCENARIOS_OVERVIEW_CHART_TEMPLATE))({ | ||
scenarios: suite.scenarios, | ||
_: _ | ||
}), | ||
customDataOverview: _.template(_readTemplateFile(CUSTOMDATA_TEMPLATE))({ | ||
suite: suite, | ||
_: _ | ||
}), | ||
featuresScenariosOverviewChart: _.template(_readTemplateFile(SCENARIOS_OVERVIEW_CHART_TEMPLATE))({ | ||
scenarios: suite.scenarios, | ||
featuresOverviewChart: _.template(_readTemplateFile(FEATURES_OVERVIEW_CHART_TEMPLATE))({ | ||
suite: suite, | ||
_: _ | ||
@@ -387,0 +396,0 @@ }), |
{ | ||
"name": "multiple-cucumber-html-reporter", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Generate beautifull cucumberjs reports for multiple instances (browsers / devices)", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -60,2 +60,12 @@ Multiple Cucumber HTML Reporter | ||
} | ||
}, | ||
customData: { | ||
title: 'Run info', | ||
data: [ | ||
{label: 'Project', value: 'Custom project'}, | ||
{label: 'Release', value: '1.2.3'}, | ||
{label: 'Cycle', value: 'B11221.34321'}, | ||
{label: 'Execution Start Time', value: 'Nov 19th 2017, 02:31 PM EST'}, | ||
{label: 'Execution End Time', value: 'Nov 19th 2017, 02:56 PM EST'} | ||
] | ||
} | ||
@@ -117,2 +127,8 @@ }); | ||
### `reportName` | ||
- **Type:** `string` | ||
- **Mandatory:** No | ||
You can change the report name to a name you want | ||
### `metadata` | ||
@@ -141,2 +157,44 @@ - **Type:** `JSON` | ||
See [metadata](#metadata-1) for more info | ||
### `customData` | ||
- **Type:** `object` | ||
- **Mandatory:** No | ||
You can add a custom data block to the report like this | ||
![Snapshot - Features overview custom data](./docs/images/custom-data.jpg "Snapshot - Features overview custom data") | ||
```js | ||
customData: { | ||
title: 'Run info', | ||
data: [ | ||
{label: 'Project', value: 'Custom project'}, | ||
{label: 'Release', value: '1.2.3'}, | ||
{label: 'Cycle', value: 'B11221.34321'}, | ||
{label: 'Execution Start Time', value: 'Nov 19th 2017, 02:31 PM EST'}, | ||
{label: 'Execution End Time', value: 'Nov 19th 2017, 02:56 PM EST'} | ||
] | ||
} | ||
``` | ||
#### `customData.title` | ||
- **Type:** `string` | ||
- **Mandatory:** No | ||
- **Default:** `Custom data title` | ||
Select a title for the custom data block. If not provided it will be defaulted. | ||
#### `customData.data` | ||
- **Type:** `array` | ||
- **Mandatory:** yes | ||
The data you want to add. This needs to be in the format | ||
```js | ||
data: [ | ||
{label: 'your label', value: 'the represented value'} | ||
] | ||
``` | ||
## Metadata | ||
@@ -143,0 +201,0 @@ The report can also show on which browser / device a feature has been executed. It is shown on the featurs overview in the table as well as on the feature overview in a container. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
85958
16
807
345