Skip to content

Commit 6825ba1

Browse files
Fix reporter to work with codeceptjs 3.4.0 cucumber update
1 parent aa73c5c commit 6825ba1

File tree

4 files changed

+2310
-25
lines changed

4 files changed

+2310
-25
lines changed

CHANGELOG.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
### 1.0.10
2+
3+
- Fix reporter to work with Codeceptjs 3.4.0 Cucumber update
4+
5+
---
6+
7+
### 1.0.9
8+
9+
- Fix Scenario Outline containing header cell string [PR #9](https://github.com/ktryniszewski-mdsol/codeceptjs-cucumber-json-reporter/pull/9)
10+
11+
---
12+
113
### 1.0.8
214

315
- Capture descriptions written at the Scenario / Scenario Outline Level [PR #6](https://github.com/ktryniszewski-mdsol/codeceptjs-cucumber-json-reporter/pull/6)
@@ -49,4 +61,4 @@
4961

5062
### 1.0.0
5163

52-
- Initial release
64+
- Initial release

index.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ module.exports = function (config) {
117117
// since we parse the whole feature file at start
118118
removeNotExecutedScenarios();
119119

120-
const filename = config.uniqueFileNames ? `cucumber_output_${Math.floor(new Date().getTime() / 1000)}.json` : config.outputFile;
120+
const filename = config.uniqueFileNames
121+
? `cucumber_output_${Math.floor(new Date().getTime() / 1000)}.json`
122+
: config.outputFile;
121123

122124
fs.writeFile(path.join(global.output_dir, filename), JSON.stringify(allFeatures, null, 2), (err) => {
123125
if (err) throw err;
@@ -164,7 +166,8 @@ module.exports = function (config) {
164166
let backgroundSteps = [];
165167

166168
// get all scenarios
167-
feature.children.forEach((codeceptScenarioObject) => {
169+
feature.children.forEach((codeceptObject) => {
170+
const codeceptScenarioObject = codeceptObject.scenario || codeceptObject;
168171
const reportScenarioObject = {
169172
executed: false,
170173
id: codeceptScenarioObject.name.replace(/ /g, '_').replace(/,/g, ''),

0 commit comments

Comments
 (0)