@allurereport/plugin-api 3.18.0 → 3.19.1

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/config.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { AllureServiceConfig, CategoriesConfig, DefaultLabelsConfig, EnvironmentsConfig, PerformanceConfig, ReportVariables, ResolutionsConfig } from "@allurereport/core-api";
1
+ import type { AllureServiceConfig, CategoriesConfig, DefaultLabelsConfig, EnvironmentsConfig, FlakyDetectionConfig, PerformanceConfig, ReportVariables, ResolutionsConfig } from "@allurereport/core-api";
2
2
  import type { PluginDescriptor } from "./plugin.js";
3
3
  import type { QualityGateConfig } from "./qualityGate.js";
4
4
  export interface Config {
@@ -10,6 +10,7 @@ export interface Config {
10
10
  historyPath?: string;
11
11
  historyBaseUrl?: string;
12
12
  historyLimit?: number;
13
+ flakyDetection?: FlakyDetectionConfig;
13
14
  resolutions?: ResolutionsConfig;
14
15
  defaultLabels?: DefaultLabelsConfig;
15
16
  dump?: string;
package/dist/report.d.ts CHANGED
@@ -104,7 +104,7 @@ export type ReportSearchDocument = {
104
104
  nodeId: string;
105
105
  name: string;
106
106
  fullName?: string;
107
- historyId?: string;
107
+ retryHash?: string | null;
108
108
  labels?: string;
109
109
  owner?: string;
110
110
  tags?: string;
package/dist/store.d.ts CHANGED
@@ -80,11 +80,12 @@ 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[];
86
87
  indexAttachmentByTestResult: Record<string, string[]>;
87
- indexTestResultByHistoryId: Record<string, string[]>;
88
+ indexTestResultByRetryHash: Record<string, string[]>;
88
89
  indexTestResultByTestCase: Record<string, string[]>;
89
90
  indexTestResultByResolutionIssue: Record<string, string[]>;
90
91
  indexAttachmentByFixture: Record<string, string[]>;
@@ -101,9 +102,10 @@ 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
- IndexTestResultsByHistoryId = "index-test-results-by-history-id.json",
108
+ IndexTestResultsByRetryHash = "index-test-results-by-retry-hash.json",
107
109
  IndexTestResultsByTestCase = "index-test-results-by-test-case.json",
108
110
  IndexTestResultsByResolutionIssue = "index-test-results-by-resolution-issue.json",
109
111
  IndexAttachmentsByFixture = "index-attachments-by-fixture.json",
package/dist/store.js CHANGED
@@ -9,9 +9,10 @@ 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
- AllureStoreDumpFiles["IndexTestResultsByHistoryId"] = "index-test-results-by-history-id.json";
15
+ AllureStoreDumpFiles["IndexTestResultsByRetryHash"] = "index-test-results-by-retry-hash.json";
15
16
  AllureStoreDumpFiles["IndexTestResultsByTestCase"] = "index-test-results-by-test-case.json";
16
17
  AllureStoreDumpFiles["IndexTestResultsByResolutionIssue"] = "index-test-results-by-resolution-issue.json";
17
18
  AllureStoreDumpFiles["IndexAttachmentsByFixture"] = "index-attachments-by-fixture.json";
@@ -35,6 +35,7 @@ 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 currentIds = new Set(allTrs.map(({ id }) => id));
38
39
  const mainBranchHistory = (await history?.readHistory?.({ branch: "" })) ?? [];
39
40
  const newTrs = await store.allNewTestResults(filter, mainBranchHistory);
40
41
  const retryFlags = await Promise.all(allTrs.map(async (tr) => (await store.retriesByTr(tr)).length > 0));
@@ -46,7 +47,7 @@ export const createPluginSummary = async (params) => {
46
47
  return {
47
48
  stats: await store.testsStatistic(filter),
48
49
  status: worstStatus ?? "passed",
49
- newTests: newTrs.map(({ id }) => id),
50
+ newTests: newTrs.filter(({ id }) => currentIds.has(id)).map(({ id }) => id),
50
51
  flakyTests: flakyTrs.map(({ id }) => id),
51
52
  retryTests: retryTrs.map(({ id }) => id),
52
53
  checks: allChecks.map(convertToSummaryCheckResult),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allurereport/plugin-api",
3
- "version": "3.18.0",
3
+ "version": "3.19.1",
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.18.0",
32
+ "@allurereport/core-api": "3.19.1",
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",