@allurereport/plugin-classic 3.0.0-beta.3 → 3.0.0-beta.5

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.
@@ -20,7 +20,7 @@ const convertStageResult = (context, result) => {
20
20
  const convertStep = (context, step) => {
21
21
  if (isStep(step)) {
22
22
  const name = step.name;
23
- const steps = step.steps.map((step) => convertStep(context, step));
23
+ const steps = step.steps.map((child) => convertStep(context, child));
24
24
  const stepsCount = steps.length;
25
25
  const parameters = step.parameters;
26
26
  const parametersCount = parameters.length;
@@ -46,9 +46,9 @@ const convertStep = (context, step) => {
46
46
  attachmentStep: false,
47
47
  };
48
48
  }
49
- const name = step.link.name;
49
+ const stepName = step.link.name;
50
50
  return {
51
- name,
51
+ name: stepName,
52
52
  time: {},
53
53
  status: "unknown",
54
54
  steps: [],
@@ -31,7 +31,7 @@ export declare const generateEnvironmentJson: (writer: Allure2DataWriter, env: {
31
31
  values: string[];
32
32
  }[]) => Promise<void>;
33
33
  export declare const generateExecutorJson: (writer: Allure2DataWriter, executor?: Partial<Allure2ExecutorInfo>) => Promise<void>;
34
- export declare const generateDefaultWidgetData: (writer: Allure2DataWriter, tests: Array<Allure2TestResult>, ...fileNames: string[]) => Promise<void>;
34
+ export declare const generateDefaultWidgetData: (writer: Allure2DataWriter, tests: Allure2TestResult[], ...fileNames: string[]) => Promise<void>;
35
35
  export declare const generateEmptyTrendData: (writer: Allure2DataWriter, ...fileNames: string[]) => Promise<void>;
36
36
  export declare const generateTrendData: (writer: Allure2DataWriter, reportName: string, tests: Allure2TestResult[], historyDataPoints: HistoryDataPoint[]) => Promise<void>;
37
37
  export declare const generateAttachmentsData: (writer: Allure2DataWriter, attachmentLinks: AttachmentLink[], contentFunction: (id: string) => Promise<ResultFile | undefined>) => Promise<Map<string, string>>;
package/dist/plugin.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { AllureStore, Plugin, PluginContext } from "@allurereport/plugin-api";
2
- import { Allure2PluginOptions } from "./model.js";
2
+ import type { Allure2PluginOptions } from "./model.js";
3
3
  export declare class Allure2Plugin implements Plugin {
4
4
  #private;
5
5
  readonly options: Allure2PluginOptions;
package/dist/plugin.js CHANGED
@@ -19,7 +19,7 @@ export class Allure2Plugin {
19
19
  const environmentItems = (await store.metadataByKey("allure_environment")) ?? [];
20
20
  const tests = await store.allTestResults({ includeHidden: true });
21
21
  const allTr = [];
22
- for (let value of tests) {
22
+ for (const value of tests) {
23
23
  const fixtures = await store.fixturesByTrId(value.id);
24
24
  const retries = await store.retriesByTrId(value.id);
25
25
  const history = await store.historyByTrId(value.id);
@@ -42,10 +42,10 @@ export class Allure2Plugin {
42
42
  await generateSummaryJson(writer, reportName, displayedTr);
43
43
  await generateEnvironmentJson(writer, environmentItems);
44
44
  const executor = await store.metadataByKey("allure2_executor");
45
- const history = await store.allHistoryDataPoints();
45
+ const historyDataPoints = await store.allHistoryDataPoints();
46
46
  await generateExecutorJson(writer, executor);
47
47
  await generateDefaultWidgetData(writer, displayedTr, "duration.json", "status-chart.json", "severity.json");
48
- await generateTrendData(writer, reportName, displayedTr, history);
48
+ await generateTrendData(writer, reportName, displayedTr, historyDataPoints);
49
49
  await generateEmptyTrendData(writer, "duration-trend.json", "categories-trend.json", "retry-trend.json");
50
50
  const reportDataFiles = singleFile ? writer.reportFiles() : [];
51
51
  await generateStaticFiles({
package/dist/tree.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Statistic } from "@allurereport/core-api";
1
+ import type { Statistic } from "@allurereport/core-api";
2
2
  import type { Allure2Status, Allure2TestResult, Allure2Time } from "./model.js";
3
3
  export interface TreeNode {
4
4
  name: string;
package/dist/utils.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { Statistic } from "@allurereport/core-api";
2
- import { Allure2Status, Allure2TestResult, GroupTime } from "./model.js";
3
- import { TreeGroup } from "./tree.js";
1
+ import type { Statistic } from "@allurereport/core-api";
2
+ import type { Allure2Status, Allure2TestResult, GroupTime } from "./model.js";
3
+ import type { TreeGroup } from "./tree.js";
4
4
  export declare const updateStatistic: (statistic: Statistic, test: {
5
5
  status: Allure2Status;
6
6
  }) => undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allurereport/plugin-classic",
3
- "version": "3.0.0-beta.3",
3
+ "version": "3.0.0-beta.5",
4
4
  "description": "The classic version of Allure HTML report",
5
5
  "keywords": [
6
6
  "allure",
@@ -25,13 +25,15 @@
25
25
  "scripts": {
26
26
  "build": "run clean && tsc --project ./tsconfig.json",
27
27
  "clean": "rimraf ./dist",
28
+ "eslint": "eslint ./src/**/*.{js,jsx,ts,tsx}",
29
+ "eslint:format": "eslint --fix ./src/**/*.{js,jsx,ts,tsx}",
28
30
  "test": "rimraf ./out && vitest run"
29
31
  },
30
32
  "dependencies": {
31
- "@allurereport/core-api": "3.0.0-beta.3",
32
- "@allurereport/plugin-api": "3.0.0-beta.3",
33
- "@allurereport/web-classic": "3.0.0-beta.3",
34
- "@allurereport/web-commons": "3.0.0-beta.3",
33
+ "@allurereport/core-api": "3.0.0-beta.5",
34
+ "@allurereport/plugin-api": "3.0.0-beta.5",
35
+ "@allurereport/web-classic": "3.0.0-beta.5",
36
+ "@allurereport/web-commons": "3.0.0-beta.5",
35
37
  "handlebars": "^4.7.8"
36
38
  },
37
39
  "devDependencies": {