Permalink
Browse files

fix(serenity-mocha): Pending scenarios with no steps are correctly ma…

…rked as pending instead of passing.
  • Loading branch information...
jan-molak committed Feb 10, 2017
1 parent 3b7efb8 commit a593a84d699b6ef9c919ba921566df403df92b0d
@@ -72,7 +72,7 @@ describe('When reporting on what happened during the rehearsal', () => {
expect(producedReport()).to.deep.equal(expectedReportWith({
startTime,
duration,
result: Result[Result.SUCCESS],
result: Result[Result.SUCCESS],
})));
});
@@ -391,6 +391,7 @@ describe('When reporting on what happened during the rehearsal', () => {
},
} ],
result: 'ERROR',
annotatedResult: 'ERROR',
testFailureCause: {
errorType: 'Error',
message: "We're sorry, something happened",
@@ -435,6 +436,7 @@ describe('When reporting on what happened during the rehearsal', () => {
},
} ],
result: 'ERROR',
annotatedResult: 'ERROR',
testFailureCause: {
errorType: 'Error',
message: 'Timeout of 1000ms exceeded.',
@@ -632,7 +634,8 @@ describe('When reporting on what happened during the rehearsal', () => {
manual: false,
startTime,
duration: undefined,
result: 'SUCCESS',
result: 'SUCCESS',
annotatedResult: 'SUCCESS',
testSource: 'cucumber',
};
@@ -3,11 +3,11 @@ import * as path from 'path';
import { parse, StackFrame } from 'stack-trace';
import { Md5 } from 'ts-md5/dist/md5';
import { ActivityPeriod, RehearsalPeriod, ReportExporter, ScenePeriod } from '../../serenity/reporting';
import { Stage, StageCrewMember } from '../../serenity/stage';
import { DomainEvent, Photo, Result, Scene, SceneFinished, Tag } from '../domain';
import { FileSystem, JSONObject } from '../io';
import { Default_Path_To_Reports } from '../serenity';
import { ActivityPeriod, RehearsalPeriod, ReportExporter, ScenePeriod } from './index';
import { RehearsalReport } from './rehearsal_report';
import {
ActivityReport,
@@ -94,6 +94,7 @@ export class SerenityBDDReportExporter implements ReportExporter<JSONObject> {
issues: this.issuesCoveredBy(node.value),
testSteps: children,
annotatedResult: Result[node.outcome.result],
testFailureCause: this.errorExporter.tryToExport(node.outcome.error),
}));
}

0 comments on commit a593a84

Please sign in to comment.