@allurereport/plugin-api 3.19.0 → 3.20.0

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/dist/report.d.ts CHANGED
@@ -90,6 +90,7 @@ export type ReportTreeLeaf = Pick<ReportTestResult, "duration" | "name" | "start
90
90
  tags?: string[];
91
91
  categories?: string[];
92
92
  severity?: string;
93
+ resolutionStatus?: ResolutionCategory | "none";
93
94
  };
94
95
  export type ReportTreeGroup = WithChildren & DefaultTreeGroup & {
95
96
  nodeId: string;
package/dist/store.d.ts CHANGED
@@ -80,6 +80,7 @@ export interface AllureStoreDump {
80
80
  fixtures: Record<string, TestFixtureResult>;
81
81
  environments: Array<string | EnvironmentIdentity>;
82
82
  reportVariables: ReportVariables;
83
+ metadata?: Record<string, any>;
83
84
  resolutionIssues: Record<string, ResolutionIssue>;
84
85
  qualityGateResults: QualityGateValidationResult[];
85
86
  metrics?: MetricSample[];
@@ -101,6 +102,7 @@ export declare enum AllureStoreDumpFiles {
101
102
  CheckResults = "check-results.json",
102
103
  Environments = "environments.json",
103
104
  ReportVariables = "report-variables.json",
105
+ Metadata = "metadata.json",
104
106
  ResolutionIssues = "resolution-issues.json",
105
107
  IndexAttachmentsByTestResults = "index-attachments-by-test-results.json",
106
108
  IndexTestResultsByRetryHash = "index-test-results-by-retry-hash.json",
package/dist/store.js CHANGED
@@ -9,6 +9,7 @@ export var AllureStoreDumpFiles;
9
9
  AllureStoreDumpFiles["CheckResults"] = "check-results.json";
10
10
  AllureStoreDumpFiles["Environments"] = "environments.json";
11
11
  AllureStoreDumpFiles["ReportVariables"] = "report-variables.json";
12
+ AllureStoreDumpFiles["Metadata"] = "metadata.json";
12
13
  AllureStoreDumpFiles["ResolutionIssues"] = "resolution-issues.json";
13
14
  AllureStoreDumpFiles["IndexAttachmentsByTestResults"] = "index-attachments-by-test-results.json";
14
15
  AllureStoreDumpFiles["IndexTestResultsByRetryHash"] = "index-test-results-by-retry-hash.json";
@@ -35,11 +35,12 @@ export const createPluginSummary = async (params) => {
35
35
  const { name, filter, plugin, store, history, meta } = params;
36
36
  const allChecks = await store.allCheckResults();
37
37
  const allTrs = await store.allTestResults({ filter });
38
+ const allTrsWithRetries = await store.allTestResults({ includeRetries: true });
38
39
  const currentIds = new Set(allTrs.map(({ id }) => id));
39
40
  const mainBranchHistory = (await history?.readHistory?.({ branch: "" })) ?? [];
40
41
  const newTrs = await store.allNewTestResults(filter, mainBranchHistory);
41
- const retryFlags = await Promise.all(allTrs.map(async (tr) => (await store.retriesByTr(tr)).length > 0));
42
- const retryTrs = allTrs.filter((_, index) => retryFlags[index]);
42
+ const retryHashesWithRetries = new Set(allTrsWithRetries.flatMap((tr) => (tr.isRetry && tr.retryHash ? [tr.retryHash] : [])));
43
+ const retryTrs = allTrs.filter(({ retryHash }) => retryHash && retryHashesWithRetries.has(retryHash));
43
44
  const flakyTrs = allTrs.filter((tr) => !!tr?.flaky);
44
45
  const duration = calculateRunDuration(allTrs);
45
46
  const worstStatus = getWorstStatus(allTrs.map(({ status }) => status));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allurereport/plugin-api",
3
- "version": "3.19.0",
3
+ "version": "3.20.0",
4
4
  "description": "Allure Plugin API",
5
5
  "keywords": [
6
6
  "allure"
@@ -29,14 +29,14 @@
29
29
  "lint:fix": "oxlint --import-plugin --fix src test features stories"
30
30
  },
31
31
  "dependencies": {
32
- "@allurereport/core-api": "3.19.0",
32
+ "@allurereport/core-api": "3.20.0",
33
33
  "tar-stream": "3.1.7"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^20",
37
37
  "@types/tar-stream": "^3.1.4",
38
38
  "@vitest/runner": "^2",
39
- "@vitest/snapshot": "^2.1.9",
39
+ "@vitest/snapshot": "^5.0.1",
40
40
  "allure-js-commons": "^3",
41
41
  "allure-vitest": "^3",
42
42
  "rimraf": "^6",