@allurereport/plugin-classic 3.13.0 → 3.13.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.
@@ -1,4 +1,4 @@
1
- import type { TestFixtureResult, TestResult, TestStepResult } from "@allurereport/core-api";
1
+ import { type TestFixtureResult, type TestResult, type TestStepResult } from "@allurereport/core-api";
2
2
  import type { ClassicFixtureResult, ClassicTestResult, ClassicTestStepResult } from "@allurereport/web-classic";
3
3
  export declare const convertTestResult: (tr: TestResult) => ClassicTestResult;
4
4
  export declare const convertTestStepResult: (tsr: TestStepResult) => ClassicTestStepResult;
@@ -1,3 +1,4 @@
1
+ import { isStep, redactParameters, } from "@allurereport/core-api";
1
2
  import MarkdownIt from "markdown-it";
2
3
  const md = new MarkdownIt();
3
4
  const markdownToHtml = (value) => (value ? md.render(value) : undefined);
@@ -26,9 +27,9 @@ export const convertTestResult = (tr) => {
26
27
  isRetry: tr.isRetry,
27
28
  labels: tr.labels,
28
29
  groupedLabels: mapLabelsByName(tr.labels),
29
- parameters: tr.parameters,
30
+ parameters: redactParameters(tr.parameters),
30
31
  links: tr.links,
31
- steps: tr.steps,
32
+ steps: (tr.steps ?? []).map(convertTestStepResult),
32
33
  error: tr.error,
33
34
  testCase: tr.testCase,
34
35
  descriptionHtml: tr.descriptionHtml ?? markdownToHtml(tr.description),
@@ -42,6 +43,13 @@ export const convertTestResult = (tr) => {
42
43
  };
43
44
  };
44
45
  export const convertTestStepResult = (tsr) => {
46
+ if (isStep(tsr)) {
47
+ return {
48
+ ...tsr,
49
+ parameters: redactParameters(tsr.parameters),
50
+ steps: (tsr.steps ?? []).map(convertTestStepResult),
51
+ };
52
+ }
45
53
  return tsr;
46
54
  };
47
55
  export const convertFixtureResult = (fr) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allurereport/plugin-classic",
3
- "version": "3.13.0",
3
+ "version": "3.13.2",
4
4
  "description": "The classic version of Allure HTML report",
5
5
  "keywords": [
6
6
  "allure",
@@ -30,11 +30,11 @@
30
30
  "lint:fix": "oxlint --import-plugin --fix src test features stories"
31
31
  },
32
32
  "dependencies": {
33
- "@allurereport/core-api": "3.13.0",
34
- "@allurereport/plugin-api": "3.13.0",
35
- "@allurereport/web-awesome": "3.13.0",
36
- "@allurereport/web-classic": "3.13.0",
37
- "@allurereport/web-commons": "3.13.0",
33
+ "@allurereport/core-api": "3.13.2",
34
+ "@allurereport/plugin-api": "3.13.2",
35
+ "@allurereport/web-awesome": "3.13.2",
36
+ "@allurereport/web-classic": "3.13.2",
37
+ "@allurereport/web-commons": "3.13.2",
38
38
  "d3-shape": "^3.2.0",
39
39
  "handlebars": "^4.7.9",
40
40
  "markdown-it": "^14.2.0"