@serenity-js/serenity-bdd 2.32.4 → 3.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/lib/cli/defaults.js +1 -1
- package/lib/cli/defaults.js.map +1 -1
- package/lib/cli/screenplay/questions/Checksum.d.ts +1 -1
- package/lib/cli/screenplay/questions/FileExists.d.ts +1 -1
- package/lib/cli/screenplay/questions/JavaExecutable.d.ts +10 -0
- package/lib/cli/screenplay/questions/JavaExecutable.js +16 -1
- package/lib/cli/screenplay/questions/JavaExecutable.js.map +1 -1
- package/lib/cli/screenplay/questions/SerenityBDDArguments.d.ts +10 -0
- package/lib/cli/screenplay/questions/SerenityBDDArguments.js +18 -11
- package/lib/cli/screenplay/questions/SerenityBDDArguments.js.map +1 -1
- package/lib/stage/crew/serenity-bdd-reporter/processors/transformations/activityFinished.js +1 -1
- package/lib/stage/crew/serenity-bdd-reporter/processors/transformations/activityFinished.js.map +1 -1
- package/lib/stage/crew/serenity-bdd-reporter/processors/transformations/activityRelatedArtifact.js +1 -1
- package/lib/stage/crew/serenity-bdd-reporter/processors/transformations/activityRelatedArtifact.js.map +1 -1
- package/lib/stage/crew/serenity-bdd-reporter/processors/transformations/activityStarted.js +1 -1
- package/lib/stage/crew/serenity-bdd-reporter/processors/transformations/activityStarted.js.map +1 -1
- package/lib/stage/crew/serenity-bdd-reporter/processors/transformations/archivedActivityRelatedArtifact.js +1 -1
- package/lib/stage/crew/serenity-bdd-reporter/processors/transformations/archivedActivityRelatedArtifact.js.map +1 -1
- package/lib/stage/crew/serenity-bdd-reporter/processors/transformations/executionFinishedAt.js +1 -1
- package/lib/stage/crew/serenity-bdd-reporter/processors/transformations/executionFinishedAt.js.map +1 -1
- package/lib/stage/crew/serenity-bdd-reporter/processors/transformations/executionStartedAt.js +1 -1
- package/lib/stage/crew/serenity-bdd-reporter/processors/transformations/executionStartedAt.js.map +1 -1
- package/package.json +11 -10
- package/src/cli/defaults.ts +1 -1
- package/src/cli/screenplay/questions/JavaExecutable.ts +20 -1
- package/src/cli/screenplay/questions/SerenityBDDArguments.ts +21 -11
- package/src/stage/crew/serenity-bdd-reporter/processors/transformations/activityFinished.ts +1 -1
- package/src/stage/crew/serenity-bdd-reporter/processors/transformations/activityRelatedArtifact.ts +1 -1
- package/src/stage/crew/serenity-bdd-reporter/processors/transformations/activityStarted.ts +1 -1
- package/src/stage/crew/serenity-bdd-reporter/processors/transformations/archivedActivityRelatedArtifact.ts +1 -1
- package/src/stage/crew/serenity-bdd-reporter/processors/transformations/executionFinishedAt.ts +1 -1
- package/src/stage/crew/serenity-bdd-reporter/processors/transformations/executionStartedAt.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,56 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.0.0-rc.2](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.1...v3.0.0-rc.2) (2021-12-09)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @serenity-js/serenity-bdd
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.0.0-rc.1](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.0...v3.0.0-rc.1) (2021-12-09)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **serenity-bdd:** upgraded Serenity BDD CLI to 2.6.0 ([93c32f2](https://github.com/serenity-js/serenity-js/commit/93c32f267709e20f5a27a4eed712a233711c8d31))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [3.0.0-rc.0](https://github.com/serenity-js/serenity-js/compare/v2.32.5...v3.0.0-rc.0) (2021-12-08)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* **core:** 3.0 RC ([469d54e](https://github.com/serenity-js/serenity-js/commit/469d54e4f81ef430566b93852e3174826f8ef672)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* **core:** question.about produces "props" that proxy the methods of the underlying model ([f771872](https://github.com/serenity-js/serenity-js/commit/f771872c56b487e404002c3800fc8f3baaed804f))
|
|
36
|
+
* **web:** support for working with cookies ([39cde6d](https://github.com/serenity-js/serenity-js/commit/39cde6de7a36d27a8b1c596493efbec94900af6b)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### BREAKING CHANGES
|
|
40
|
+
|
|
41
|
+
* **core:** Introduced @serenity-js/web - a shared library for Serenity/JS Web integration
|
|
42
|
+
modules such as @serenity-js/protractor and @serenity-js/webdriverio. Dropped support for Node 12.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
## [2.32.5](https://github.com/serenity-js/serenity-js/compare/v2.32.4...v2.32.5) (2021-12-08)
|
|
49
|
+
|
|
50
|
+
**Note:** Version bump only for package @serenity-js/serenity-bdd
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
6
56
|
## [2.32.4](https://github.com/serenity-js/serenity-js/compare/v2.32.3...v2.32.4) (2021-11-25)
|
|
7
57
|
|
|
8
58
|
**Note:** Version bump only for package @serenity-js/serenity-bdd
|
package/lib/cli/defaults.js
CHANGED
|
@@ -18,7 +18,7 @@ exports.defaults = void 0;
|
|
|
18
18
|
* @public
|
|
19
19
|
*/
|
|
20
20
|
exports.defaults = {
|
|
21
|
-
artifact: 'net.serenity-bdd:serenity-cli:jar:2.
|
|
21
|
+
artifact: 'net.serenity-bdd:serenity-cli:jar:2.6.0',
|
|
22
22
|
repository: 'https://repo1.maven.org/maven2/',
|
|
23
23
|
cacheDir: 'node_modules/@serenity-js/serenity-bdd/cache',
|
|
24
24
|
sourceDir: 'target/site/serenity',
|
package/lib/cli/defaults.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/cli/defaults.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;GAeG;AACU,QAAA,QAAQ,GAAG;IACpB,QAAQ,EAAK,
|
|
1
|
+
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/cli/defaults.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;GAeG;AACU,QAAA,QAAQ,GAAG;IACpB,QAAQ,EAAK,yCAAyC;IACtD,UAAU,EAAG,iCAAiC;IAC9C,QAAQ,EAAK,8CAA8C;IAC3D,SAAS,EAAI,sBAAsB;IACnC,SAAS,EAAI,sBAAsB;IACnC,WAAW,EAAE,UAAU;IACvB,GAAG,EAAU,MAAM;CACtB,CAAC"}
|
|
@@ -5,6 +5,6 @@ import { Path } from '@serenity-js/core/lib/io';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const Checksum: {
|
|
7
7
|
of: (destination: Path) => {
|
|
8
|
-
calculatedUsing: (hashingAlgorithm: string) => Question<Promise<string
|
|
8
|
+
calculatedUsing: (hashingAlgorithm: string) => Question<Promise<string>> & import("@serenity-js/core").Adapter<string>;
|
|
9
9
|
};
|
|
10
10
|
};
|
|
@@ -4,8 +4,18 @@ import { Path } from '@serenity-js/core/lib/io';
|
|
|
4
4
|
* @package
|
|
5
5
|
*/
|
|
6
6
|
export declare class JavaExecutable extends Question<Promise<Path>> {
|
|
7
|
+
private subject;
|
|
7
8
|
constructor();
|
|
8
9
|
answeredBy(actor: AnswersQuestions & UsesAbilities): Promise<Path>;
|
|
10
|
+
/**
|
|
11
|
+
* @desc
|
|
12
|
+
* Changes the description of this question's subject.
|
|
13
|
+
*
|
|
14
|
+
* @param {string} subject
|
|
15
|
+
* @returns {Question<T>}
|
|
16
|
+
*/
|
|
17
|
+
describedAs(subject: string): this;
|
|
18
|
+
toString(): string;
|
|
9
19
|
private javaFileName;
|
|
10
20
|
private isWindows;
|
|
11
21
|
}
|
|
@@ -11,13 +11,28 @@ const findJavaHome = (0, util_1.promisify)(require('find-java-home')); // eslint
|
|
|
11
11
|
*/
|
|
12
12
|
class JavaExecutable extends core_1.Question {
|
|
13
13
|
constructor() {
|
|
14
|
-
super(
|
|
14
|
+
super();
|
|
15
|
+
this.subject = `java executable`;
|
|
15
16
|
}
|
|
16
17
|
answeredBy(actor) {
|
|
17
18
|
return findJavaHome({ allowJre: true })
|
|
18
19
|
.then(pathToJavaHome => path.join(pathToJavaHome, 'bin', this.javaFileName()))
|
|
19
20
|
.then(io_1.Path.fromJSON);
|
|
20
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* @desc
|
|
24
|
+
* Changes the description of this question's subject.
|
|
25
|
+
*
|
|
26
|
+
* @param {string} subject
|
|
27
|
+
* @returns {Question<T>}
|
|
28
|
+
*/
|
|
29
|
+
describedAs(subject) {
|
|
30
|
+
this.subject = subject;
|
|
31
|
+
return this;
|
|
32
|
+
}
|
|
33
|
+
toString() {
|
|
34
|
+
return this.subject;
|
|
35
|
+
}
|
|
21
36
|
javaFileName() {
|
|
22
37
|
return this.isWindows()
|
|
23
38
|
? 'java.exe'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JavaExecutable.js","sourceRoot":"","sources":["../../../../src/cli/screenplay/questions/JavaExecutable.ts"],"names":[],"mappings":";;;AAAA,4CAA8E;AAC9E,iDAAgD;AAChD,6BAA6B,CAAG,2CAA2C;AAC3E,+BAAiC;AACjC,MAAM,YAAY,GAAG,IAAA,gBAAS,EAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAE,0DAA0D;AAEtH;;GAEG;AACH,MAAa,cAAe,SAAQ,eAAuB;
|
|
1
|
+
{"version":3,"file":"JavaExecutable.js","sourceRoot":"","sources":["../../../../src/cli/screenplay/questions/JavaExecutable.ts"],"names":[],"mappings":";;;AAAA,4CAA8E;AAC9E,iDAAgD;AAChD,6BAA6B,CAAG,2CAA2C;AAC3E,+BAAiC;AACjC,MAAM,YAAY,GAAG,IAAA,gBAAS,EAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAE,0DAA0D;AAEtH;;GAEG;AACH,MAAa,cAAe,SAAQ,eAAuB;IAGvD;QACI,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC;IACrC,CAAC;IAED,UAAU,CAAC,KAAuC;QAC9C,OAAO,YAAY,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;aAClC,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;aAC7E,IAAI,CAAC,SAAI,CAAC,QAAQ,CAAC,CAAC;IAC7B,CAAC;IAED;;;;;;OAMG;IACH,WAAW,CAAC,OAAe;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,QAAQ;QACJ,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAEO,YAAY;QAChB,OAAO,IAAI,CAAC,SAAS,EAAE;YACnB,CAAC,CAAC,UAAU;YACZ,CAAC,CAAC,MAAM,CAAC;IACjB,CAAC;IAEO,SAAS;QACb,OAAO,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjD,CAAC;CACJ;AAvCD,wCAuCC"}
|
|
@@ -5,8 +5,18 @@ import { Argv } from '../../Argv';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare class SerenityBDDArguments extends Question<string[]> {
|
|
7
7
|
private readonly argv;
|
|
8
|
+
private subject;
|
|
8
9
|
private static Allowed;
|
|
9
10
|
static from(argv: Argv): SerenityBDDArguments;
|
|
10
11
|
constructor(argv: Argv);
|
|
11
12
|
answeredBy(actor: AnswersQuestions & UsesAbilities): string[];
|
|
13
|
+
/**
|
|
14
|
+
* @desc
|
|
15
|
+
* Changes the description of this question's subject.
|
|
16
|
+
*
|
|
17
|
+
* @param {string} subject
|
|
18
|
+
* @returns {Question<T>}
|
|
19
|
+
*/
|
|
20
|
+
describedAs(subject: string): this;
|
|
21
|
+
toString(): string;
|
|
12
22
|
}
|
|
@@ -7,16 +7,31 @@ const core_1 = require("@serenity-js/core");
|
|
|
7
7
|
*/
|
|
8
8
|
class SerenityBDDArguments extends core_1.Question {
|
|
9
9
|
constructor(argv) {
|
|
10
|
-
super(
|
|
10
|
+
super();
|
|
11
11
|
this.argv = argv;
|
|
12
|
+
this.subject = 'Serenity BDD arguments';
|
|
12
13
|
}
|
|
13
14
|
static from(argv) {
|
|
14
15
|
return new SerenityBDDArguments(argv);
|
|
15
16
|
}
|
|
16
17
|
answeredBy(actor) {
|
|
17
|
-
return
|
|
18
|
+
return Object.keys(this.argv)
|
|
18
19
|
.filter(key => !!~SerenityBDDArguments.Allowed.indexOf(key) && !!this.argv[key])
|
|
19
|
-
.
|
|
20
|
+
.flatMap(arg => [`--${arg}`, this.argv[arg]]);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @desc
|
|
24
|
+
* Changes the description of this question's subject.
|
|
25
|
+
*
|
|
26
|
+
* @param {string} subject
|
|
27
|
+
* @returns {Question<T>}
|
|
28
|
+
*/
|
|
29
|
+
describedAs(subject) {
|
|
30
|
+
this.subject = subject;
|
|
31
|
+
return this;
|
|
32
|
+
}
|
|
33
|
+
toString() {
|
|
34
|
+
return this.subject;
|
|
20
35
|
}
|
|
21
36
|
}
|
|
22
37
|
exports.SerenityBDDArguments = SerenityBDDArguments;
|
|
@@ -29,12 +44,4 @@ SerenityBDDArguments.Allowed = [
|
|
|
29
44
|
'project',
|
|
30
45
|
'source',
|
|
31
46
|
];
|
|
32
|
-
function flatten(list) {
|
|
33
|
-
return list.reduce((acc, current) => {
|
|
34
|
-
Array.isArray(current)
|
|
35
|
-
? acc.push(...flatten(current))
|
|
36
|
-
: acc.push(current);
|
|
37
|
-
return acc;
|
|
38
|
-
}, []);
|
|
39
|
-
}
|
|
40
47
|
//# sourceMappingURL=SerenityBDDArguments.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SerenityBDDArguments.js","sourceRoot":"","sources":["../../../../src/cli/screenplay/questions/SerenityBDDArguments.ts"],"names":[],"mappings":";;;AAAA,4CAA8E;AAI9E;;GAEG;AACH,MAAa,oBAAqB,SAAQ,eAAkB;
|
|
1
|
+
{"version":3,"file":"SerenityBDDArguments.js","sourceRoot":"","sources":["../../../../src/cli/screenplay/questions/SerenityBDDArguments.ts"],"names":[],"mappings":";;;AAAA,4CAA8E;AAI9E;;GAEG;AACH,MAAa,oBAAqB,SAAQ,eAAkB;IAiBxD,YAA6B,IAAU;QACnC,KAAK,EAAE,CAAC;QADiB,SAAI,GAAJ,IAAI,CAAM;QAEnC,IAAI,CAAC,OAAO,GAAG,wBAAwB,CAAC;IAC5C,CAAC;IAPD,MAAM,CAAC,IAAI,CAAC,IAAU;QAClB,OAAO,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;IAOD,UAAU,CAAC,KAAuC;QAC9C,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;aACxB,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAE,CAAE,oBAAoB,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aAClF,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,KAAM,GAAI,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACxD,CAAC;IAED;;;;;;OAMG;IACH,WAAW,CAAC,OAAe;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,QAAQ;QACJ,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;;AA1CL,oDA2CC;AAxCkB,4BAAO,GAAI;IACtB,aAAa;IACb,UAAU;IACV,iBAAiB;IACjB,aAAa;IACb,SAAS;IACT,SAAS;IACT,QAAQ;CACX,CAAC"}
|
|
@@ -12,7 +12,7 @@ function activityFinished(activityId, outcome, finishedAt) {
|
|
|
12
12
|
const outcomeReport = (0, mappers_1.outcomeReportFrom)(outcome);
|
|
13
13
|
linkedStep.step.result = outcomeReport.result;
|
|
14
14
|
linkedStep.step.exception = outcomeReport.error;
|
|
15
|
-
linkedStep.step.duration = model_1.Timestamp.
|
|
15
|
+
linkedStep.step.duration = model_1.Timestamp.fromTimestampInMilliseconds(linkedStep.step.startTime).diff(finishedAt).inMilliseconds();
|
|
16
16
|
context.currentActivityId = linkedStep.parentActivityId;
|
|
17
17
|
return context;
|
|
18
18
|
};
|
package/lib/stage/crew/serenity-bdd-reporter/processors/transformations/activityFinished.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activityFinished.js","sourceRoot":"","sources":["../../../../../../src/stage/crew/serenity-bdd-reporter/processors/transformations/activityFinished.ts"],"names":[],"mappings":";;;AAAA,uDAAgF;AAEhF,wCAA+C;AAG/C;;GAEG;AACH,SAAgB,gBAAgB,CAA2C,UAAyB,EAAE,OAAgB,EAAE,UAAqB;IACzI,OAAO,CAAC,OAAgB,EAAW,EAAE;QAEjC,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACvD,MAAM,aAAa,GAAG,IAAA,2BAAiB,EAAC,OAAO,CAAC,CAAC;QAEjD,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC;QAC9C,UAAU,CAAC,IAAI,CAAC,SAAS,GAAG,aAAa,CAAC,KAAK,CAAC;QAChD,UAAU,CAAC,IAAI,CAAC,QAAQ,GAAG,iBAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"activityFinished.js","sourceRoot":"","sources":["../../../../../../src/stage/crew/serenity-bdd-reporter/processors/transformations/activityFinished.ts"],"names":[],"mappings":";;;AAAA,uDAAgF;AAEhF,wCAA+C;AAG/C;;GAEG;AACH,SAAgB,gBAAgB,CAA2C,UAAyB,EAAE,OAAgB,EAAE,UAAqB;IACzI,OAAO,CAAC,OAAgB,EAAW,EAAE;QAEjC,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACvD,MAAM,aAAa,GAAG,IAAA,2BAAiB,EAAC,OAAO,CAAC,CAAC;QAEjD,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC;QAC9C,UAAU,CAAC,IAAI,CAAC,SAAS,GAAG,aAAa,CAAC,KAAK,CAAC;QAChD,UAAU,CAAC,IAAI,CAAC,QAAQ,GAAG,iBAAS,CAAC,2BAA2B,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,cAAc,EAAE,CAAC;QAE9H,OAAO,CAAC,iBAAiB,GAAG,UAAU,CAAC,gBAAgB,CAAC;QAExD,OAAO,OAAO,CAAC;IACnB,CAAC,CAAA;AACL,CAAC;AAdD,4CAcC"}
|
package/lib/stage/crew/serenity-bdd-reporter/processors/transformations/activityRelatedArtifact.js
CHANGED
|
@@ -64,7 +64,7 @@ function arbitraryData(activityId, name, contents, timestamp) {
|
|
|
64
64
|
const id = (0, crypto_1.createHash)('sha1')
|
|
65
65
|
.update(name.value)
|
|
66
66
|
.update(contents)
|
|
67
|
-
.update(`${timestamp.
|
|
67
|
+
.update(`${timestamp.toMilliseconds()}`)
|
|
68
68
|
.digest('hex');
|
|
69
69
|
context.steps.get(activityId.value).step.reportData.push({
|
|
70
70
|
id: `report-data-${id}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activityRelatedArtifact.js","sourceRoot":"","sources":["../../../../../../src/stage/crew/serenity-bdd-reporter/processors/transformations/activityRelatedArtifact.ts"],"names":[],"mappings":";;;AAAA,iDAAiE;AACjE,uDAA+K;AAC/K,mCAAoC;AACpC,2CAAmC;AACnC,+BAA+B;AAI/B;;GAEG;AACH,SAAgB,uBAAuB,CAA2C,UAAyB,EAAE,IAAU,EAAE,QAAkB,EAAE,SAAoB;IAC7J,MAAM,MAAM,GAAG,IAAI,0BAAqB,CAAC;QACrC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,KAAM,IAAK,EAAE;QAC/B,MAAM,EAAI,IAAI,CAAC,EAAE,CAAC,KAAM,IAAK,EAAE;QAC/B,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,KAAM,IAAK,EAAE;KAClC,CAAC,CAAC;IAEH,OAAO,CAAC,MAAe,EAAW,EAAE,CAChC,IAAA,kBAAK,EAAoB,QAAQ,CAAC;SAC7B,IAAI,CAAC,2BAAmB,EAAE,CAAC,CAAC,EAAE,CAC3B,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAC3B,UAAU,EACV,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAC1B,SAAS,CACZ,CAAC,CACL;SACA,IAAI,CAAC,gBAAQ,EAAE,CAAC,CAAC,EAAE,CAChB,MAAM,CAAC,IAAI,CAAC,aAAa,CACrB,UAAU,EACV,IAAI,EACJ,QAAQ,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,EACvD,SAAS,CACZ,CAAC,CACL;SACA,IAAI,CAAC,gBAAQ,EAAE,CAAC,CAAC,EAAE,C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AAE,IAAU,EAAE,QAAgB,EAAE,SAAoB;IAC1I,OAAO,CAAC,OAAgB,EAAW,EAAE;QAEjC,IAAI,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;YACrC,MAAM,EAAE,GAAG,IAAA,mBAAU,EAAC,MAAM,CAAC;iBACxB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;iBAClB,MAAM,CAAC,QAAQ,CAAC;iBAChB,MAAM,CAAC,GAAI,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"activityRelatedArtifact.js","sourceRoot":"","sources":["../../../../../../src/stage/crew/serenity-bdd-reporter/processors/transformations/activityRelatedArtifact.ts"],"names":[],"mappings":";;;AAAA,iDAAiE;AACjE,uDAA+K;AAC/K,mCAAoC;AACpC,2CAAmC;AACnC,+BAA+B;AAI/B;;GAEG;AACH,SAAgB,uBAAuB,CAA2C,UAAyB,EAAE,IAAU,EAAE,QAAkB,EAAE,SAAoB;IAC7J,MAAM,MAAM,GAAG,IAAI,0BAAqB,CAAC;QACrC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,KAAM,IAAK,EAAE;QAC/B,MAAM,EAAI,IAAI,CAAC,EAAE,CAAC,KAAM,IAAK,EAAE;QAC/B,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,KAAM,IAAK,EAAE;KAClC,CAAC,CAAC;IAEH,OAAO,CAAC,MAAe,EAAW,EAAE,CAChC,IAAA,kBAAK,EAAoB,QAAQ,CAAC;SAC7B,IAAI,CAAC,2BAAmB,EAAE,CAAC,CAAC,EAAE,CAC3B,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAC3B,UAAU,EACV,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAC1B,SAAS,CACZ,CAAC,CACL;SACA,IAAI,CAAC,gBAAQ,EAAE,CAAC,CAAC,EAAE,CAChB,MAAM,CAAC,IAAI,CAAC,aAAa,CACrB,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I,EAAE;gBAC9D,YAAY,EAAK,YAAY,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC;aAC/D,CAAC;SACL;QAED,OAAO,OAAO,CAAC;IACnB,CAAC,CAAA;AACL,CAAC;AAED,SAAS,aAAa,CAA2C,UAAyB,EAAE,IAAU,EAAE,QAAgB,EAAE,SAAoB;IAC1I,OAAO,CAAC,OAAgB,EAAW,EAAE;QAEjC,IAAI,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;YACrC,MAAM,EAAE,GAAG,IAAA,mBAAU,EAAC,MAAM,CAAC;iBACxB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;iBAClB,MAAM,CAAC,QAAQ,CAAC;iBAChB,MAAM,CAAC,GAAI,SAAS,CAAC,cAAc,EAAG,EAAE,CAAC;iBACzC,MAAM,CAAC,KAAK,CAAC,CAAC;YAEnB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;gBACrD,EAAE,EAAE,eAAgB,EAAG,EAAE;gBACzB,UAAU,EAAE,KAAK;gBACjB,IAAI,EAAE,EAAE;gBACR,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,QAAQ;aACX,CAAC,CAAC;SACN;QAED,OAAO,OAAO,CAAC;IACnB,CAAC,CAAA;AACL,CAAC"}
|
|
@@ -9,7 +9,7 @@ function activityStarted(activityId, name, startedAt) {
|
|
|
9
9
|
const step = {
|
|
10
10
|
number: context.steps.size + 1,
|
|
11
11
|
description: name.value,
|
|
12
|
-
startTime: startedAt.
|
|
12
|
+
startTime: startedAt.toMilliseconds(),
|
|
13
13
|
children: [],
|
|
14
14
|
reportData: [],
|
|
15
15
|
screenshots: [],
|
package/lib/stage/crew/serenity-bdd-reporter/processors/transformations/activityStarted.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activityStarted.js","sourceRoot":"","sources":["../../../../../../src/stage/crew/serenity-bdd-reporter/processors/transformations/activityStarted.ts"],"names":[],"mappings":";;;AAIA;;GAEG;AACH,SAAgB,eAAe,CAA2C,UAAyB,EAAE,IAAU,EAAE,SAAoB;IACjI,OAAO,CAAC,OAAgB,EAAW,EAAE;QAEjC,MAAM,IAAI,GAAG;YACT,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC;YAC9B,WAAW,EAAE,IAAI,CAAC,KAAK;YACvB,SAAS,EAAE,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"activityStarted.js","sourceRoot":"","sources":["../../../../../../src/stage/crew/serenity-bdd-reporter/processors/transformations/activityStarted.ts"],"names":[],"mappings":";;;AAIA;;GAEG;AACH,SAAgB,eAAe,CAA2C,UAAyB,EAAE,IAAU,EAAE,SAAoB;IACjI,OAAO,CAAC,OAAgB,EAAW,EAAE;QAEjC,MAAM,IAAI,GAAG;YACT,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC;YAC9B,WAAW,EAAE,IAAI,CAAC,KAAK;YACvB,SAAS,EAAE,SAAS,CAAC,cAAc,EAAE;YACrC,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,EAAE;YACd,WAAW,EAAE,EAAE;YACf,QAAQ,EAAE,CAAC;YACX,MAAM,EAAE,SAAS;SACpB,CAAC;QAEF,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,EAAE;YAChC,IAAI;YACJ,gBAAgB,EAAE,OAAO,CAAC,iBAAiB;SAC9C,CAAC,CAAC;QAEH,OAAO,CAAC,iBAAiB,GAAG,UAAU,CAAC;QAEvC,OAAO,OAAO,CAAC;IACnB,CAAC,CAAA;AACL,CAAC;AAvBD,0CAuBC"}
|
|
@@ -10,7 +10,7 @@ function archivedActivityRelatedArtifact(activityId, type, path, timestamp) {
|
|
|
10
10
|
if (type === model_1.Photo && context.steps.has(activityId.value)) {
|
|
11
11
|
context.steps.get(activityId.value).step.screenshots.push({
|
|
12
12
|
screenshot: path.basename(),
|
|
13
|
-
timeStamp: timestamp.
|
|
13
|
+
timeStamp: timestamp.toMilliseconds(),
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
return context;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archivedActivityRelatedArtifact.js","sourceRoot":"","sources":["../../../../../../src/stage/crew/serenity-bdd-reporter/processors/transformations/archivedActivityRelatedArtifact.ts"],"names":[],"mappings":";;;AACA,uDAA4F;AAI5F;;GAEG;AACH,SAAgB,+BAA+B,CAA2C,UAAyB,EAAE,IAAkB,EAAE,IAAU,EAAE,SAAoB;IACrK,OAAO,CAAC,OAAgB,EAAW,EAAE;QAEjC,IAAI,IAAI,KAAK,aAAK,IAAI,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;YACvD,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;gBACtD,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAE;gBAC3B,SAAS,EAAE,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"archivedActivityRelatedArtifact.js","sourceRoot":"","sources":["../../../../../../src/stage/crew/serenity-bdd-reporter/processors/transformations/archivedActivityRelatedArtifact.ts"],"names":[],"mappings":";;;AACA,uDAA4F;AAI5F;;GAEG;AACH,SAAgB,+BAA+B,CAA2C,UAAyB,EAAE,IAAkB,EAAE,IAAU,EAAE,SAAoB;IACrK,OAAO,CAAC,OAAgB,EAAW,EAAE;QAEjC,IAAI,IAAI,KAAK,aAAK,IAAI,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;YACvD,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;gBACtD,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAE;gBAC3B,SAAS,EAAE,SAAS,CAAC,cAAc,EAAE;aACxC,CAAC,CAAC;SACN;QAED,OAAO,OAAO,CAAC;IACnB,CAAC,CAAA;AACL,CAAC;AAZD,0EAYC"}
|
package/lib/stage/crew/serenity-bdd-reporter/processors/transformations/executionFinishedAt.js
CHANGED
|
@@ -7,7 +7,7 @@ const model_1 = require("@serenity-js/core/lib/model");
|
|
|
7
7
|
*/
|
|
8
8
|
function executionFinishedAt(timestamp) {
|
|
9
9
|
return (context) => {
|
|
10
|
-
context.report.duration = model_1.Timestamp.
|
|
10
|
+
context.report.duration = model_1.Timestamp.fromTimestampInMilliseconds(context.report.startTime)
|
|
11
11
|
.diff(timestamp)
|
|
12
12
|
.inMilliseconds();
|
|
13
13
|
return context;
|
package/lib/stage/crew/serenity-bdd-reporter/processors/transformations/executionFinishedAt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executionFinishedAt.js","sourceRoot":"","sources":["../../../../../../src/stage/crew/serenity-bdd-reporter/processors/transformations/executionFinishedAt.ts"],"names":[],"mappings":";;;AAAA,uDAAwD;AAIxD;;GAEG;AACH,SAAgB,mBAAmB,CAA2C,SAAoB;IAC9F,OAAO,CAAC,OAAgB,EAAW,EAAE;QACjC,OAAO,CAAC,MAAM,CAAC,QAAQ,GAAG,iBAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"executionFinishedAt.js","sourceRoot":"","sources":["../../../../../../src/stage/crew/serenity-bdd-reporter/processors/transformations/executionFinishedAt.ts"],"names":[],"mappings":";;;AAAA,uDAAwD;AAIxD;;GAEG;AACH,SAAgB,mBAAmB,CAA2C,SAAoB;IAC9F,OAAO,CAAC,OAAgB,EAAW,EAAE;QACjC,OAAO,CAAC,MAAM,CAAC,QAAQ,GAAG,iBAAS,CAAC,2BAA2B,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC;aACpF,IAAI,CAAC,SAAS,CAAC;aACf,cAAc,EAAE,CAAC;QAEtB,OAAO,OAAO,CAAC;IACnB,CAAC,CAAA;AACL,CAAC;AARD,kDAQC"}
|
package/lib/stage/crew/serenity-bdd-reporter/processors/transformations/executionStartedAt.js
CHANGED
|
@@ -6,7 +6,7 @@ exports.executionStartedAt = void 0;
|
|
|
6
6
|
*/
|
|
7
7
|
function executionStartedAt(timestamp) {
|
|
8
8
|
return (context) => {
|
|
9
|
-
context.report.startTime = context.report.startTime || timestamp.
|
|
9
|
+
context.report.startTime = context.report.startTime || timestamp.toMilliseconds();
|
|
10
10
|
return context;
|
|
11
11
|
};
|
|
12
12
|
}
|
package/lib/stage/crew/serenity-bdd-reporter/processors/transformations/executionStartedAt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executionStartedAt.js","sourceRoot":"","sources":["../../../../../../src/stage/crew/serenity-bdd-reporter/processors/transformations/executionStartedAt.ts"],"names":[],"mappings":";;;AAIA;;GAEG;AACH,SAAgB,kBAAkB,CAA2C,SAAoB;IAC7F,OAAO,CAAC,OAAgB,EAAW,EAAE;QACjC,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,IAAI,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"executionStartedAt.js","sourceRoot":"","sources":["../../../../../../src/stage/crew/serenity-bdd-reporter/processors/transformations/executionStartedAt.ts"],"names":[],"mappings":";;;AAIA;;GAEG;AACH,SAAgB,kBAAkB,CAA2C,SAAoB;IAC7F,OAAO,CAAC,OAAgB,EAAW,EAAE;QACjC,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,IAAI,SAAS,CAAC,cAAc,EAAE,CAAC;QAElF,OAAO,OAAO,CAAC;IACnB,CAAC,CAAA;AACL,CAAC;AAND,gDAMC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serenity-js/serenity-bdd",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-rc.2",
|
|
4
4
|
"description": "Serenity BDD reporter for Serenity/JS",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jan Molak",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
],
|
|
30
30
|
"scripts": {
|
|
31
31
|
"clean": "rimraf .nyc_output lib target",
|
|
32
|
-
"lint": "eslint --ext ts --config ../../.eslintrc.
|
|
32
|
+
"lint": "eslint --ext ts --config ../../.eslintrc.yml .",
|
|
33
33
|
"lint:fix": "npm run lint -- --fix",
|
|
34
34
|
"test": "nyc --report-dir ../../target/coverage/serenity-bdd mocha --config ../../.mocharc.yml 'spec/**/*.spec.*'",
|
|
35
35
|
"compile": "tsc --project tsconfig.json",
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"url": "https://github.com/serenity-js/serenity-js/issues"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
|
-
"node": "^
|
|
46
|
+
"node": "^14 || ^16",
|
|
47
47
|
"npm": "^6 || ^7 || ^8"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@serenity-js/assertions": "
|
|
51
|
-
"@serenity-js/core": "
|
|
52
|
-
"@serenity-js/rest": "
|
|
50
|
+
"@serenity-js/assertions": "3.0.0-rc.2",
|
|
51
|
+
"@serenity-js/core": "3.0.0-rc.1",
|
|
52
|
+
"@serenity-js/rest": "3.0.0-rc.2",
|
|
53
53
|
"axios": "^0.21.4",
|
|
54
54
|
"chalk": "^4.1.2",
|
|
55
55
|
"find-java-home": "^1.2.2",
|
|
@@ -60,11 +60,12 @@
|
|
|
60
60
|
"yargs": "^16.2.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@documentation/esdoc-template": "
|
|
64
|
-
"@integration/testing-tools": "
|
|
65
|
-
"@types/chai": "^4.
|
|
63
|
+
"@documentation/esdoc-template": "3.0.0",
|
|
64
|
+
"@integration/testing-tools": "3.0.0",
|
|
65
|
+
"@types/chai": "^4.3.0",
|
|
66
66
|
"@types/mocha": "^9.0.0",
|
|
67
67
|
"@types/progress": "^2.0.5",
|
|
68
|
+
"if-env": "^1.0.4",
|
|
68
69
|
"memfs": "^3.4.0",
|
|
69
70
|
"mocha": "^9.1.3",
|
|
70
71
|
"ts-node": "^10.4.0",
|
|
@@ -93,5 +94,5 @@
|
|
|
93
94
|
"cache": true,
|
|
94
95
|
"all": true
|
|
95
96
|
},
|
|
96
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "944ff400a3766e75980aea5d3b401d8acca7c6d8"
|
|
97
98
|
}
|
package/src/cli/defaults.ts
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* @public
|
|
16
16
|
*/
|
|
17
17
|
export const defaults = {
|
|
18
|
-
artifact: 'net.serenity-bdd:serenity-cli:jar:2.
|
|
18
|
+
artifact: 'net.serenity-bdd:serenity-cli:jar:2.6.0',
|
|
19
19
|
repository: 'https://repo1.maven.org/maven2/',
|
|
20
20
|
cacheDir: 'node_modules/@serenity-js/serenity-bdd/cache',
|
|
21
21
|
sourceDir: 'target/site/serenity',
|
|
@@ -8,8 +8,11 @@ const findJavaHome = promisify(require('find-java-home')); // eslint-disable-li
|
|
|
8
8
|
* @package
|
|
9
9
|
*/
|
|
10
10
|
export class JavaExecutable extends Question<Promise<Path>> {
|
|
11
|
+
private subject: string;
|
|
12
|
+
|
|
11
13
|
constructor() {
|
|
12
|
-
super(
|
|
14
|
+
super();
|
|
15
|
+
this.subject = `java executable`;
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
answeredBy(actor: AnswersQuestions & UsesAbilities): Promise<Path> {
|
|
@@ -18,6 +21,22 @@ export class JavaExecutable extends Question<Promise<Path>> {
|
|
|
18
21
|
.then(Path.fromJSON);
|
|
19
22
|
}
|
|
20
23
|
|
|
24
|
+
/**
|
|
25
|
+
* @desc
|
|
26
|
+
* Changes the description of this question's subject.
|
|
27
|
+
*
|
|
28
|
+
* @param {string} subject
|
|
29
|
+
* @returns {Question<T>}
|
|
30
|
+
*/
|
|
31
|
+
describedAs(subject: string): this {
|
|
32
|
+
this.subject = subject;
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
toString(): string {
|
|
37
|
+
return this.subject;
|
|
38
|
+
}
|
|
39
|
+
|
|
21
40
|
private javaFileName() {
|
|
22
41
|
return this.isWindows()
|
|
23
42
|
? 'java.exe'
|
|
@@ -6,6 +6,8 @@ import { Argv } from '../../Argv';
|
|
|
6
6
|
* @package
|
|
7
7
|
*/
|
|
8
8
|
export class SerenityBDDArguments extends Question<string[]> {
|
|
9
|
+
private subject: string;
|
|
10
|
+
|
|
9
11
|
private static Allowed = [
|
|
10
12
|
'destination',
|
|
11
13
|
'features',
|
|
@@ -21,21 +23,29 @@ export class SerenityBDDArguments extends Question<string[]> {
|
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
constructor(private readonly argv: Argv) {
|
|
24
|
-
super(
|
|
26
|
+
super();
|
|
27
|
+
this.subject = 'Serenity BDD arguments';
|
|
25
28
|
}
|
|
26
29
|
|
|
27
30
|
answeredBy(actor: AnswersQuestions & UsesAbilities): string[] {
|
|
28
|
-
return
|
|
31
|
+
return Object.keys(this.argv)
|
|
29
32
|
.filter(key => !! ~ SerenityBDDArguments.Allowed.indexOf(key) && !! this.argv[key])
|
|
30
|
-
.
|
|
33
|
+
.flatMap(arg => [`--${ arg }`, this.argv[arg]]);
|
|
31
34
|
}
|
|
32
|
-
}
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
/**
|
|
37
|
+
* @desc
|
|
38
|
+
* Changes the description of this question's subject.
|
|
39
|
+
*
|
|
40
|
+
* @param {string} subject
|
|
41
|
+
* @returns {Question<T>}
|
|
42
|
+
*/
|
|
43
|
+
describedAs(subject: string): this {
|
|
44
|
+
this.subject = subject;
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
toString(): string {
|
|
49
|
+
return this.subject;
|
|
50
|
+
}
|
|
41
51
|
}
|
|
@@ -14,7 +14,7 @@ export function activityFinished<Context extends SerenityBDDReportContext>(activ
|
|
|
14
14
|
|
|
15
15
|
linkedStep.step.result = outcomeReport.result;
|
|
16
16
|
linkedStep.step.exception = outcomeReport.error;
|
|
17
|
-
linkedStep.step.duration = Timestamp.
|
|
17
|
+
linkedStep.step.duration = Timestamp.fromTimestampInMilliseconds(linkedStep.step.startTime).diff(finishedAt).inMilliseconds();
|
|
18
18
|
|
|
19
19
|
context.currentActivityId = linkedStep.parentActivityId;
|
|
20
20
|
|
package/src/stage/crew/serenity-bdd-reporter/processors/transformations/activityRelatedArtifact.ts
CHANGED
|
@@ -109,7 +109,7 @@ function arbitraryData<Context extends SerenityBDDReportContext>(activityId: Cor
|
|
|
109
109
|
const id = createHash('sha1')
|
|
110
110
|
.update(name.value)
|
|
111
111
|
.update(contents)
|
|
112
|
-
.update(`${ timestamp.
|
|
112
|
+
.update(`${ timestamp.toMilliseconds() }`)
|
|
113
113
|
.digest('hex');
|
|
114
114
|
|
|
115
115
|
context.steps.get(activityId.value).step.reportData.push({
|
|
@@ -11,7 +11,7 @@ export function activityStarted<Context extends SerenityBDDReportContext>(activi
|
|
|
11
11
|
const step = {
|
|
12
12
|
number: context.steps.size + 1,
|
|
13
13
|
description: name.value,
|
|
14
|
-
startTime: startedAt.
|
|
14
|
+
startTime: startedAt.toMilliseconds(),
|
|
15
15
|
children: [],
|
|
16
16
|
reportData: [],
|
|
17
17
|
screenshots: [],
|
|
@@ -12,7 +12,7 @@ export function archivedActivityRelatedArtifact<Context extends SerenityBDDRepor
|
|
|
12
12
|
if (type === Photo && context.steps.has(activityId.value)) {
|
|
13
13
|
context.steps.get(activityId.value).step.screenshots.push({
|
|
14
14
|
screenshot: path.basename(),
|
|
15
|
-
timeStamp: timestamp.
|
|
15
|
+
timeStamp: timestamp.toMilliseconds(),
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
|
package/src/stage/crew/serenity-bdd-reporter/processors/transformations/executionFinishedAt.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { SerenityBDDReportContext } from '../SerenityBDDReportContext';
|
|
|
7
7
|
*/
|
|
8
8
|
export function executionFinishedAt<Context extends SerenityBDDReportContext>(timestamp: Timestamp): (context: Context) => Context {
|
|
9
9
|
return (context: Context): Context => {
|
|
10
|
-
context.report.duration = Timestamp.
|
|
10
|
+
context.report.duration = Timestamp.fromTimestampInMilliseconds(context.report.startTime)
|
|
11
11
|
.diff(timestamp)
|
|
12
12
|
.inMilliseconds();
|
|
13
13
|
|
package/src/stage/crew/serenity-bdd-reporter/processors/transformations/executionStartedAt.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { SerenityBDDReportContext } from '../SerenityBDDReportContext';
|
|
|
7
7
|
*/
|
|
8
8
|
export function executionStartedAt<Context extends SerenityBDDReportContext>(timestamp: Timestamp): (context: Context) => Context {
|
|
9
9
|
return (context: Context): Context => {
|
|
10
|
-
context.report.startTime = context.report.startTime || timestamp.
|
|
10
|
+
context.report.startTime = context.report.startTime || timestamp.toMilliseconds();
|
|
11
11
|
|
|
12
12
|
return context;
|
|
13
13
|
}
|