Skip to content

Commit

Permalink
Merge pull request #330 from adessoSE/dev
Browse files Browse the repository at this point in the history
Bugfix: Reports did not show up in Report History
  • Loading branch information
dsorna authored Sep 8, 2022
2 parents 35d83be + 0333cd5 commit 4a1a309
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions backend/src/serverHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,9 @@ function analyzeGroupReport(grpName, stories, reportOptions) {
* @param scenarioReports
*/
function featureResult(featureReport, feature){
const featureId = feature._id
console.log(` Story ID: ${featureId}`);
const featureStatus = { featureId, status: false, scenarioStatuses: [],featureTestResults:{} ,scenariosTested: { passed: 0, failed: 0 }};
const storyId = feature._id
console.log(` Story ID: ${storyId}`);
const featureStatus = { storyId, status: false, scenarioStatuses: [],featureTestResults:{} ,scenariosTested: { passed: 0, failed: 0 }};

let featurePassedSteps = 0;
let featureFailedSteps = 0;
Expand Down Expand Up @@ -380,6 +380,7 @@ function analyzeScenarioReport(stories, reportName, scenarioId, reportOptions) {

const scenario = story.scenarios.find(scen => scen.scenario_id == scenarioId)
let result = scenarioResult(scenarioReport, scenario)
reportResults.scenarioId = result.scenarioId
reportResults.featureTestResults = result.stepResults
reportResults.scenariosTested = {passed: +result.status, failed: +!result.status}
reportResults.status = result.status
Expand Down Expand Up @@ -658,7 +659,7 @@ function executeTest(req, _res, mode, story) {
let jsonPath = `../../features/${reportName}.json`;
if (mode === 'group') {
const grpDir = req.body.name;
jsonPath = `./features/${grpDir}/${reportName}.json`;
jsonPath = `../../features/${grpDir}/${reportName}.json`;
}

const jsParam = JSON.stringify(parameters);
Expand Down

0 comments on commit 4a1a309

Please sign in to comment.