@serenity-js/serenity-bdd 3.31.5 → 3.31.7

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 CHANGED
@@ -3,6 +3,26 @@
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.31.7](https://github.com/serenity-js/serenity-js/compare/v3.31.6...v3.31.7) (2025-01-24)
7
+
8
+ **Note:** Version bump only for package @serenity-js/serenity-bdd
9
+
10
+
11
+
12
+
13
+
14
+ ## [3.31.6](https://github.com/serenity-js/serenity-js/compare/v3.31.5...v3.31.6) (2025-01-16)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **serenity-bdd:** correctly escape HTML entities in activity descriptions ([386c8ae](https://github.com/serenity-js/serenity-js/commit/386c8aef1805d795c4bf2771f49c40c4c2e0c705)), closes [#2695](https://github.com/serenity-js/serenity-js/issues/2695)
20
+ * **serenity-bdd:** upgraded Serenity BDD CLI to 4.2.12 ([243729d](https://github.com/serenity-js/serenity-js/commit/243729d8b2eb03f24827a88818044efde58b43c8))
21
+
22
+
23
+
24
+
25
+
6
26
  ## [3.31.5](https://github.com/serenity-js/serenity-js/compare/v3.31.4...v3.31.5) (2025-01-11)
7
27
 
8
28
 
@@ -17,7 +17,7 @@ exports.defaults = void 0;
17
17
  * @public
18
18
  */
19
19
  exports.defaults = {
20
- artifact: 'net.serenity-bdd:serenity-cli:jar:4.2.11',
20
+ artifact: 'net.serenity-bdd:serenity-cli:jar:4.2.12',
21
21
  repository: 'https://repo1.maven.org/maven2/',
22
22
  cacheDir: 'node_modules/@serenity-js/serenity-bdd/cache',
23
23
  sourceDir: 'target/site/serenity',
@@ -10,7 +10,7 @@ function activityFinished(activityId, name, outcome, finishedAt) {
10
10
  return (context) => {
11
11
  const linkedStep = context.steps.get(activityId.value);
12
12
  const outcomeReport = (0, mappers_1.outcomeReportFrom)(outcome);
13
- linkedStep.step.description = name.value;
13
+ linkedStep.step.description = (0, mappers_1.escapeHtml)(name.value);
14
14
  linkedStep.step.result = outcomeReport.result;
15
15
  linkedStep.step.exception = outcomeReport.error;
16
16
  linkedStep.step.duration = core_1.Timestamp.fromJSON(linkedStep.step.startTime).diff(finishedAt).inMilliseconds();
@@ -1 +1 @@
1
- {"version":3,"file":"activityFinished.js","sourceRoot":"","sources":["../../../../../../src/stage/crew/serenity-bdd-reporter/processors/transformations/activityFinished.ts"],"names":[],"mappings":";;AASA,4CAeC;AAxBD,4CAA8C;AAG9C,wCAA+C;AAG/C;;GAEG;AACH,SAAgB,gBAAgB,CAA2C,UAAyB,EAAE,IAAU,EAAE,OAAgB,EAAE,UAAqB;IACrJ,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,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC;QACzC,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,gBAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,cAAc,EAAE,CAAC;QAE3G,OAAO,CAAC,iBAAiB,GAAG,UAAU,CAAC,gBAAgB,CAAC;QAExD,OAAO,OAAO,CAAC;IACnB,CAAC,CAAA;AACL,CAAC"}
1
+ {"version":3,"file":"activityFinished.js","sourceRoot":"","sources":["../../../../../../src/stage/crew/serenity-bdd-reporter/processors/transformations/activityFinished.ts"],"names":[],"mappings":";;AASA,4CAeC;AAxBD,4CAA8C;AAG9C,wCAA2D;AAG3D;;GAEG;AACH,SAAgB,gBAAgB,CAA2C,UAAyB,EAAE,IAAU,EAAE,OAAgB,EAAE,UAAqB;IACrJ,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,WAAW,GAAG,IAAA,oBAAU,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACrD,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,gBAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,cAAc,EAAE,CAAC;QAE3G,OAAO,CAAC,iBAAiB,GAAG,UAAU,CAAC,gBAAgB,CAAC;QAExD,OAAO,OAAO,CAAC;IACnB,CAAC,CAAA;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"activityStarted.d.ts","sourceRoot":"","sources":["../../../../../../src/stage/crew/serenity-bdd-reporter/processors/transformations/activityStarted.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAGvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAE5E;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,SAAS,wBAAwB,EAAE,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CA6BpK"}
1
+ {"version":3,"file":"activityStarted.d.ts","sourceRoot":"","sources":["../../../../../../src/stage/crew/serenity-bdd-reporter/processors/transformations/activityStarted.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAIvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAE5E;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,SAAS,wBAAwB,EAAE,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CA6BpK"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.activityStarted = activityStarted;
4
+ const mappers_1 = require("../mappers");
4
5
  /**
5
6
  * @package
6
7
  */
@@ -14,7 +15,7 @@ function activityStarted(activityId, name, startedAt) {
14
15
  */
15
16
  // level: 0,
16
17
  // precondition: false,
17
- description: name.value,
18
+ description: (0, mappers_1.escapeHtml)(name.value),
18
19
  startTime: startedAt.toISOString(),
19
20
  children: [],
20
21
  reportData: [],
@@ -1 +1 @@
1
- {"version":3,"file":"activityStarted.js","sourceRoot":"","sources":["../../../../../../src/stage/crew/serenity-bdd-reporter/processors/transformations/activityStarted.ts"],"names":[],"mappings":";;AASA,0CA6BC;AAhCD;;GAEG;AACH,SAAgB,eAAe,CAA2C,UAAyB,EAAE,IAAU,EAAE,SAAoB;IACjI,OAAO,CAAC,OAAgB,EAAW,EAAE;QAEjC,MAAM,IAAI,GAAmB;YACzB,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC;YAC9B;;;eAGG;YACH,YAAY;YACZ,uBAAuB;YACvB,WAAW,EAAE,IAAI,CAAC,KAAK;YACvB,SAAS,EAAE,SAAS,CAAC,WAAW,EAAE;YAClC,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"}
1
+ {"version":3,"file":"activityStarted.js","sourceRoot":"","sources":["../../../../../../src/stage/crew/serenity-bdd-reporter/processors/transformations/activityStarted.ts"],"names":[],"mappings":";;AAUA,0CA6BC;AAnCD,wCAAwC;AAGxC;;GAEG;AACH,SAAgB,eAAe,CAA2C,UAAyB,EAAE,IAAU,EAAE,SAAoB;IACjI,OAAO,CAAC,OAAgB,EAAW,EAAE;QAEjC,MAAM,IAAI,GAAmB;YACzB,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC;YAC9B;;;eAGG;YACH,YAAY;YACZ,uBAAuB;YACvB,WAAW,EAAE,IAAA,oBAAU,EAAC,IAAI,CAAC,KAAK,CAAC;YACnC,SAAS,EAAE,SAAS,CAAC,WAAW,EAAE;YAClC,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serenity-js/serenity-bdd",
3
- "version": "3.31.5",
3
+ "version": "3.31.7",
4
4
  "description": "Serenity/JS reporting module that produces detailed Serenity BDD test reports and living documentation, enhancing transparency and traceability of test results",
5
5
  "author": {
6
6
  "name": "Jan Molak",
@@ -37,7 +37,7 @@
37
37
  "scripts": {
38
38
  "clean": "rimraf target",
39
39
  "test": "c8 npm run test:no-coverage",
40
- "test:no-coverage": "mocha --config ../../.mocharc.yml 'spec/**/*.spec.*'",
40
+ "test:no-coverage": "mocha --config ../../.mocharc.yml --spec='spec/**/*.spec.*'",
41
41
  "compile": "rimraf lib && tsc --project tsconfig.build.json",
42
42
  "postcompile": "npm run populate-cache",
43
43
  "populate-cache": "node ./bin/serenity-bdd update --ignoreSSL --cacheDir './cache'"
@@ -54,9 +54,9 @@
54
54
  "node": "^18.12 || ^20 || ^22"
55
55
  },
56
56
  "dependencies": {
57
- "@serenity-js/assertions": "3.31.5",
58
- "@serenity-js/core": "3.31.5",
59
- "@serenity-js/rest": "3.31.5",
57
+ "@serenity-js/assertions": "3.31.7",
58
+ "@serenity-js/core": "3.31.7",
59
+ "@serenity-js/rest": "3.31.7",
60
60
  "ansi-regex": "5.0.1",
61
61
  "axios": "1.7.9",
62
62
  "chalk": "4.1.2",
@@ -74,10 +74,10 @@
74
74
  "c8": "10.1.3",
75
75
  "if-env": "1.0.4",
76
76
  "memfs": "4.17.0",
77
- "mocha": "11.0.1",
77
+ "mocha": "11.1.0",
78
78
  "mocha-multi": "1.1.7",
79
79
  "ts-node": "10.9.2",
80
80
  "typescript": "5.7.3"
81
81
  },
82
- "gitHead": "152bb2ad53ac23f30ea450be019b59cbcd24de7c"
82
+ "gitHead": "0b6294a9788c36747c746772ecff277526c67fd4"
83
83
  }
@@ -14,7 +14,7 @@
14
14
  * @public
15
15
  */
16
16
  export const defaults = {
17
- artifact: 'net.serenity-bdd:serenity-cli:jar:4.2.11',
17
+ artifact: 'net.serenity-bdd:serenity-cli:jar:4.2.12',
18
18
  repository: 'https://repo1.maven.org/maven2/',
19
19
  cacheDir: 'node_modules/@serenity-js/serenity-bdd/cache',
20
20
  sourceDir: 'target/site/serenity',
@@ -1,7 +1,7 @@
1
1
  import { Timestamp } from '@serenity-js/core';
2
2
  import type { CorrelationId, Name, Outcome } from '@serenity-js/core/lib/model';
3
3
 
4
- import { outcomeReportFrom } from '../mappers';
4
+ import { escapeHtml, outcomeReportFrom } from '../mappers';
5
5
  import type { SerenityBDDReportContext } from '../SerenityBDDReportContext';
6
6
 
7
7
  /**
@@ -13,7 +13,7 @@ export function activityFinished<Context extends SerenityBDDReportContext>(activ
13
13
  const linkedStep = context.steps.get(activityId.value);
14
14
  const outcomeReport = outcomeReportFrom(outcome);
15
15
 
16
- linkedStep.step.description = name.value;
16
+ linkedStep.step.description = escapeHtml(name.value);
17
17
  linkedStep.step.result = outcomeReport.result;
18
18
  linkedStep.step.exception = outcomeReport.error;
19
19
  linkedStep.step.duration = Timestamp.fromJSON(linkedStep.step.startTime).diff(finishedAt).inMilliseconds();
@@ -2,6 +2,7 @@ import type { Timestamp } from '@serenity-js/core';
2
2
  import type { CorrelationId, Name } from '@serenity-js/core/lib/model';
3
3
 
4
4
  import type { TestStepSchema } from '../../serenity-bdd-report-schema';
5
+ import { escapeHtml } from '../mappers';
5
6
  import type { SerenityBDDReportContext } from '../SerenityBDDReportContext';
6
7
 
7
8
  /**
@@ -18,7 +19,7 @@ export function activityStarted<Context extends SerenityBDDReportContext>(activi
18
19
  */
19
20
  // level: 0,
20
21
  // precondition: false,
21
- description: name.value,
22
+ description: escapeHtml(name.value),
22
23
  startTime: startedAt.toISOString(),
23
24
  children: [],
24
25
  reportData: [],