Skip to content

Commit

Permalink
fix: success scenario number
Browse files Browse the repository at this point in the history
  • Loading branch information
deblockt committed Mar 21, 2024
1 parent 16e284d commit 3cdb973
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-jsond.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- run: npm ci
- run: npm run cucumber-message || true
- uses: ./
name: "full report"
name: "JSOND - full report"
with:
name: "full report"
access-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 2 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12268,10 +12268,9 @@ module.exports.reader = (reportString) => {
}
});

// TODO compute it reading file
globalInfo.succeedScenarioNumber = Object.values(testCases)
.filter(it => getTestCaseStatus(it) === 'success')
.reduce((a, b) => a + b, 0)
.length()

return {
get listAllScenarioByFile() {
Expand Down Expand Up @@ -12328,7 +12327,6 @@ module.exports.reader = (reportString) => {
}

function getTestCaseStatus(testCase) {
core.info(`testCase ${Object.keys(testCase)} ${testCase.steps}`)
const steps = testCase.steps;
for (const step of steps) {
if (step.result.status === 'FAILED') {
Expand Down Expand Up @@ -12723,7 +12721,7 @@ function setOutput(core, outputName, summaryScenario, summarySteps) {
},
};

core.info('Creating summary: ' + summary);
core.info('Creating summary:\n' + summary);
await core.summary
.addHeading(checkName + additionnalTitleInfo, 4)
.addRaw("\n" + summary)
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ function setOutput(core, outputName, summaryScenario, summarySteps) {
},
};

core.info('Creating summary: ' + summary);
core.info('Creating summary:\n' + summary);
await core.summary
.addHeading(checkName + additionnalTitleInfo, 4)
.addRaw("\n" + summary)
Expand Down
4 changes: 1 addition & 3 deletions reportReader-jsond.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,9 @@ module.exports.reader = (reportString) => {
}
});

// TODO compute it reading file
globalInfo.succeedScenarioNumber = Object.values(testCases)
.filter(it => getTestCaseStatus(it) === 'success')
.reduce((a, b) => a + b, 0)
.length()

return {
get listAllScenarioByFile() {
Expand Down Expand Up @@ -163,7 +162,6 @@ module.exports.reader = (reportString) => {
}

function getTestCaseStatus(testCase) {
core.info(`testCase ${Object.keys(testCase)} ${testCase.steps}`)
const steps = testCase.steps;
for (const step of steps) {
if (step.result.status === 'FAILED') {
Expand Down

0 comments on commit 3cdb973

Please sign in to comment.