@serenity-js/serenity-bdd
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -6,2 +6,13 @@ # Change Log | ||
## [2.1.2](https://github.com/serenity-js/serenity-js/compare/v2.1.1...v2.1.2) (2020-02-08) | ||
### Bug Fixes | ||
* **protractor:** distinguish between regular and 'mobile emulation' test runs ([fcd7101](https://github.com/serenity-js/serenity-js/commit/fcd7101939fddd855f45aa99b75e309b382b6b73)), closes [#323](https://github.com/serenity-js/serenity-js/issues/323) | ||
## [2.1.1](https://github.com/serenity-js/serenity-js/compare/v2.1.0...v2.1.1) (2020-02-08) | ||
@@ -8,0 +19,0 @@ |
@@ -8,3 +8,2 @@ import { Path } from '@serenity-js/core/lib/io'; | ||
private static outcomeMapper; | ||
private static idGenerator; | ||
private readonly report; | ||
@@ -11,0 +10,0 @@ private readonly activities; |
@@ -7,4 +7,4 @@ "use strict"; | ||
var util_1 = require("util"); | ||
var IDGenerator_1 = require("./IDGenerator"); | ||
var OutcomeMapper_1 = require("./OutcomeMapper"); | ||
var SceneReportId_1 = require("./SceneReportId"); | ||
/** @access private */ | ||
@@ -24,3 +24,3 @@ function extractValues(dictionary) { | ||
title: this.scenarioDetails.name.value, | ||
id: SceneReport.idGenerator.generateFrom(this.scenarioDetails.category, this.scenarioDetails.name), | ||
id: new SceneReportId_1.SceneReportId(this.scenarioDetails.category.value).append(this.scenarioDetails.name.value).value, | ||
manual: false, | ||
@@ -34,3 +34,3 @@ testSteps: [], | ||
userStory: { | ||
id: SceneReport.idGenerator.generateFrom(this.scenarioDetails.category), | ||
id: new SceneReportId_1.SceneReportId(this.scenarioDetails.category.value).value, | ||
storyName: this.scenarioDetails.category.value, | ||
@@ -82,2 +82,3 @@ path: this.scenarioDetails.location.path.value, | ||
report.driver = browserTag.browserName; | ||
report.id = new SceneReportId_1.SceneReportId(browserTag.name, report.id).value; | ||
}) | ||
@@ -87,2 +88,3 @@ .when(model_1.PlatformTag, function (platformTag) { | ||
// report.context = [report.context, platformTag.name].filter(part => !! part).join(','); | ||
report.id = new SceneReportId_1.SceneReportId(platformTag.name, report.id).value; | ||
}) | ||
@@ -275,3 +277,2 @@ .when(model_1.ContextTag, function (_) { return (report.context = tag.name); }) | ||
SceneReport.outcomeMapper = new OutcomeMapper_1.OutcomeMapper(); | ||
SceneReport.idGenerator = new IDGenerator_1.IDGenerator(); | ||
return SceneReport; | ||
@@ -278,0 +279,0 @@ }()); |
@@ -5,3 +5,2 @@ import { ScenarioDetails } from '@serenity-js/core/lib/model'; | ||
export declare class SceneReports { | ||
private static idGenerator; | ||
private readonly reports; | ||
@@ -8,0 +7,0 @@ for(scenarioDetails: ScenarioDetails): SceneReport; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var IDGenerator_1 = require("./IDGenerator"); | ||
var SceneReport_1 = require("./SceneReport"); | ||
var SceneReportId_1 = require("./SceneReportId"); | ||
/** @package */ | ||
@@ -33,5 +33,7 @@ var SceneReports = /** @class */ (function () { | ||
SceneReports.prototype.correlationIdFor = function (scenarioDetails) { | ||
return SceneReports.idGenerator.generateFrom(scenarioDetails.category, scenarioDetails.name, scenarioDetails.location.path); | ||
return new SceneReportId_1.SceneReportId(scenarioDetails.category.value) | ||
.append(scenarioDetails.name.value) | ||
.append(scenarioDetails.location.path.value) // todo: should this include the line? | ||
.value; | ||
}; | ||
SceneReports.idGenerator = new IDGenerator_1.IDGenerator(); | ||
return SceneReports; | ||
@@ -38,0 +40,0 @@ }()); |
{ | ||
"name": "@serenity-js/serenity-bdd", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "Serenity BDD reporter for Serenity/JS", | ||
@@ -61,6 +61,6 @@ "author": { | ||
"@documentation/esdoc-template": "2.0.7", | ||
"@integration/testing-tools": "2.1.1", | ||
"@serenity-js/assertions": "2.1.1", | ||
"@serenity-js/core": "2.1.1", | ||
"@serenity-js/rest": "2.1.1", | ||
"@integration/testing-tools": "2.1.2", | ||
"@serenity-js/assertions": "2.1.2", | ||
"@serenity-js/core": "2.1.2", | ||
"@serenity-js/rest": "2.1.2", | ||
"@types/mocha": "^7.0.1", | ||
@@ -93,3 +93,3 @@ "@types/progress": "^2.0.3", | ||
}, | ||
"gitHead": "033490d55f400e84dd3bd2f3e136d1b7c1d8f764" | ||
"gitHead": "af2d4b530765574119ae0b70c49bca4f67f0d22a" | ||
} |
@@ -27,4 +27,4 @@ import { Path } from '@serenity-js/core/lib/io'; | ||
import { DataTable, DataTableDataSetDescriptor, ErrorDetails, SerenityBDDReport, TestStep } from '../SerenityBDDJsonSchema'; | ||
import { IDGenerator } from './IDGenerator'; | ||
import { OutcomeMapper } from './OutcomeMapper'; | ||
import { SceneReportId } from './SceneReportId'; | ||
@@ -47,3 +47,2 @@ /** @access private */ | ||
private static outcomeMapper = new OutcomeMapper(); | ||
private static idGenerator = new IDGenerator(); | ||
@@ -60,3 +59,3 @@ private readonly report: Partial<SerenityBDDReport> & { children?: Array<Partial<TestStep>> }; | ||
title: this.scenarioDetails.name.value, | ||
id: SceneReport.idGenerator.generateFrom(this.scenarioDetails.category, this.scenarioDetails.name), | ||
id: new SceneReportId(this.scenarioDetails.category.value).append(this.scenarioDetails.name.value).value, | ||
manual: false, | ||
@@ -70,3 +69,3 @@ testSteps: [], | ||
userStory: { | ||
id: SceneReport.idGenerator.generateFrom(this.scenarioDetails.category), | ||
id: new SceneReportId(this.scenarioDetails.category.value).value, | ||
storyName: this.scenarioDetails.category.value, | ||
@@ -122,2 +121,3 @@ path: this.scenarioDetails.location.path.value, | ||
report.driver = browserTag.browserName; | ||
report.id = new SceneReportId(browserTag.name, report.id).value; | ||
}) | ||
@@ -127,2 +127,3 @@ .when(PlatformTag, (platformTag: PlatformTag) => { | ||
// report.context = [report.context, platformTag.name].filter(part => !! part).join(','); | ||
report.id = new SceneReportId(platformTag.name, report.id).value; | ||
}) | ||
@@ -129,0 +130,0 @@ .when(ContextTag, _ => (report.context = tag.name)) |
import { ScenarioDetails } from '@serenity-js/core/lib/model'; | ||
import { IDGenerator } from './IDGenerator'; | ||
import { SceneReport } from './SceneReport'; | ||
import { SceneReportId } from './SceneReportId'; | ||
/** @package */ | ||
export class SceneReports { | ||
private static idGenerator = new IDGenerator(); | ||
private readonly reports: { [entryId: string]: SceneReport } = {}; | ||
@@ -39,8 +38,7 @@ | ||
private correlationIdFor(scenarioDetails: ScenarioDetails): string { | ||
return SceneReports.idGenerator.generateFrom( | ||
scenarioDetails.category, | ||
scenarioDetails.name, | ||
scenarioDetails.location.path, // todo: should this include the line? | ||
); | ||
return new SceneReportId(scenarioDetails.category.value) | ||
.append(scenarioDetails.name.value) | ||
.append(scenarioDetails.location.path.value) // todo: should this include the line? | ||
.value; | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
268463
4473