Skip to content

Commit

Permalink
Fix reporter to work with codeceptjs 3.4.0 cucumber update
Browse files Browse the repository at this point in the history
  • Loading branch information
ktryniszewski-mdsol committed Feb 23, 2023
1 parent aa73c5c commit 6825ba1
Show file tree
Hide file tree
Showing 4 changed files with 2,310 additions and 25 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
### 1.0.10

- Fix reporter to work with Codeceptjs 3.4.0 Cucumber update

---

### 1.0.9

- Fix Scenario Outline containing header cell string [PR #9](https://github.com/ktryniszewski-mdsol/codeceptjs-cucumber-json-reporter/pull/9)

---

### 1.0.8

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

### 1.0.0

- Initial release
- Initial release
7 changes: 5 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ module.exports = function (config) {
// since we parse the whole feature file at start
removeNotExecutedScenarios();

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

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

// get all scenarios
feature.children.forEach((codeceptScenarioObject) => {
feature.children.forEach((codeceptObject) => {
const codeceptScenarioObject = codeceptObject.scenario || codeceptObject;
const reportScenarioObject = {
executed: false,
id: codeceptScenarioObject.name.replace(/ /g, '_').replace(/,/g, ''),
Expand Down
Loading

0 comments on commit 6825ba1

Please sign in to comment.