@allurereport/web-awesome 3.0.0-beta.8 → 3.0.0-beta.9
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/multi/{141.app-4375537b.js → 141.app-f32e4213.js} +1 -1
- package/dist/multi/{222.app-4375537b.js → 222.app-f32e4213.js} +1 -1
- package/dist/multi/{335.app-4375537b.js → 335.app-f32e4213.js} +1 -1
- package/dist/multi/{34.app-4375537b.js → 34.app-f32e4213.js} +1 -1
- package/dist/multi/{349.app-4375537b.js → 349.app-f32e4213.js} +1 -1
- package/dist/multi/{378.app-4375537b.js → 378.app-f32e4213.js} +1 -1
- package/dist/multi/{406.app-4375537b.js → 406.app-f32e4213.js} +1 -1
- package/dist/multi/{476.app-4375537b.js → 476.app-f32e4213.js} +1 -1
- package/dist/multi/{53.app-4375537b.js → 53.app-f32e4213.js} +1 -1
- package/dist/multi/{584.app-4375537b.js → 584.app-f32e4213.js} +1 -1
- package/dist/multi/{690.app-4375537b.js → 690.app-f32e4213.js} +1 -1
- package/dist/multi/{747.app-4375537b.js → 747.app-f32e4213.js} +1 -1
- package/dist/multi/{767.app-4375537b.js → 767.app-f32e4213.js} +1 -1
- package/dist/multi/{816.app-4375537b.js → 816.app-f32e4213.js} +1 -1
- package/dist/multi/{83.app-4375537b.js → 83.app-f32e4213.js} +1 -1
- package/dist/multi/{873.app-4375537b.js → 873.app-f32e4213.js} +1 -1
- package/dist/multi/{920.app-4375537b.js → 920.app-f32e4213.js} +1 -1
- package/dist/multi/{991.app-4375537b.js → 991.app-f32e4213.js} +1 -1
- package/dist/multi/app-f32e4213.js +2 -0
- package/dist/multi/manifest.json +20 -20
- package/dist/multi/{styles-4375537b.css → styles-f32e4213.css} +2 -1
- package/dist/single/app-7fa8e43f.js +2 -0
- package/dist/single/manifest.json +1 -1
- package/package.json +5 -4
- package/src/components/BaseLayout/index.tsx +1 -0
- package/src/components/ReportBody/Filters.tsx +1 -3
- package/src/components/ReportBody/index.tsx +4 -3
- package/src/components/Tabs/index.tsx +5 -0
- package/src/components/TestResult/TestResultEmpty/index.tsx +4 -3
- package/src/components/TestResult/TestResultOverview.tsx +7 -4
- package/src/components/TestResult/TestResultSetup/index.tsx +12 -3
- package/src/components/TestResult/TestResultSteps/index.tsx +12 -3
- package/src/components/TestResult/TestResultSteps/testResultStep.tsx +9 -2
- package/src/components/TestResult/TestResultTeardown/index.tsx +13 -3
- package/src/components/TestResult/TestStepsEmpty/index.tsx +23 -0
- package/src/components/TestResult/TestStepsEmpty/styles.scss +25 -0
- package/src/components/Tree/Tree.tsx +10 -3
- package/src/components/Tree/index.tsx +2 -10
- package/src/i18n/locales/am.json +3 -1
- package/src/i18n/locales/az.json +3 -1
- package/src/i18n/locales/de.json +3 -1
- package/src/i18n/locales/en.json +3 -1
- package/src/i18n/locales/es.json +3 -1
- package/src/i18n/locales/fr.json +3 -1
- package/src/i18n/locales/he.json +3 -1
- package/src/i18n/locales/it.json +3 -1
- package/src/i18n/locales/ja.json +3 -1
- package/src/i18n/locales/ka.json +3 -1
- package/src/i18n/locales/kr.json +3 -1
- package/src/i18n/locales/nl.json +3 -1
- package/src/i18n/locales/pl.json +3 -1
- package/src/i18n/locales/pt.json +3 -1
- package/src/i18n/locales/ru.json +3 -1
- package/src/i18n/locales/sv.json +3 -1
- package/src/i18n/locales/tr.json +3 -1
- package/src/i18n/locales/zh.json +3 -1
- package/src/index.html +1 -0
- package/src/stores/tree.ts +42 -11
- package/src/utils/loadFromLocalStorage.ts +8 -0
- package/types.d.ts +15 -2
- package/webpack.config.js +2 -0
- package/dist/multi/app-4375537b.js +0 -2
- package/dist/single/app-f16f6693.js +0 -2
- /package/dist/multi/{app-4375537b.js.LICENSE.txt → app-f32e4213.js.LICENSE.txt} +0 -0
- /package/dist/single/{app-f16f6693.js.LICENSE.txt → app-7fa8e43f.js.LICENSE.txt} +0 -0
package/src/i18n/locales/zh.json
CHANGED
|
@@ -65,7 +65,9 @@
|
|
|
65
65
|
"clear-filters": "清除过滤器",
|
|
66
66
|
"no-attachments-results": "没有附件信息",
|
|
67
67
|
"no-history-results": "没有历史信息",
|
|
68
|
-
"no-retries-results": "没有重试信息"
|
|
68
|
+
"no-retries-results": "没有重试信息",
|
|
69
|
+
"no-test-steps-results": "没有可用的测试步骤信息",
|
|
70
|
+
"no-test-case-results": "没有测试用例结果"
|
|
69
71
|
},
|
|
70
72
|
"severity": {
|
|
71
73
|
"blocker": "阻断",
|
package/src/index.html
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<title>Allure Awesome</title>
|
|
5
|
+
<link rel="icon" href="data:image/svg+xml,%3Csvg width='32' height='32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M22.232 4.662a3.6 3.6 0 0 1 5.09.035c2.855 2.894 4.662 6.885 4.662 11.295a3.6 3.6 0 0 1-7.2 0c0-2.406-.981-4.61-2.587-6.24a3.6 3.6 0 0 1 .035-5.09Z' fill='url(%23a)'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12.392 3.6a3.6 3.6 0 0 1 3.6-3.6c4.41 0 8.401 1.807 11.296 4.662a3.6 3.6 0 1 1-5.056 5.126C20.602 8.18 18.398 7.2 15.992 7.2a3.6 3.6 0 0 1-3.6-3.6Z' fill='url(%23b)'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 15.992C0 7.157 7.157 0 15.992 0a3.6 3.6 0 0 1 0 7.2A8.789 8.789 0 0 0 7.2 15.992c0 2.406.981 4.61 2.588 6.24a3.6 3.6 0 0 1-5.126 5.056C1.807 24.393 0 20.402 0 15.992Z' fill='url(%23c)'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.661 22.232a3.6 3.6 0 0 1 5.091-.035c1.63 1.606 3.834 2.587 6.24 2.587a3.6 3.6 0 0 1 0 7.2c-4.41 0-8.401-1.807-11.295-4.661a3.6 3.6 0 0 1-.036-5.091Z' fill='url(%23d)'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M28.384 12.392a3.6 3.6 0 0 1 3.6 3.6c0 8.835-7.157 15.992-15.992 15.992a3.6 3.6 0 0 1 0-7.2 8.789 8.789 0 0 0 8.792-8.792 3.6 3.6 0 0 1 3.6-3.6Z' fill='url(%23e)'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M28.385 12.392a3.6 3.6 0 0 1 3.6 3.6v12.392a3.6 3.6 0 0 1-7.2 0V15.992a3.6 3.6 0 0 1 3.6-3.6Z' fill='url(%23f)'/%3E%3Cg clip-path='url(%23g)'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M22.232 4.662a3.6 3.6 0 0 1 5.091.035c2.855 2.894 4.662 6.885 4.662 11.295a3.6 3.6 0 0 1-7.2 0c0-2.406-.982-4.61-2.588-6.24a3.6 3.6 0 0 1 .035-5.09Z' fill='url(%23h)'/%3E%3C/g%3E%3Cdefs%3E%3ClinearGradient id='a' x1='26.4' y1='9.6' x2='28.8' y2='15' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%237E22CE'/%3E%3Cstop offset='1' stop-color='%238B5CF6'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' x1='26.8' y1='9.4' x2='17.8' y2='3.6' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23EF4444'/%3E%3Cstop offset='1' stop-color='%23DC2626'/%3E%3C/linearGradient%3E%3ClinearGradient id='c' x1='3.6' y1='14' x2='5.4' y2='24.8' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%2322C55E'/%3E%3Cstop offset='1' stop-color='%2315803D'/%3E%3C/linearGradient%3E%3ClinearGradient id='d' x1='4.8' y1='22.2' x2='14.4' y2='29.2' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%2394A3B8'/%3E%3Cstop offset='.958' stop-color='%2364748B'/%3E%3Cstop offset='1' stop-color='%2364748B'/%3E%3C/linearGradient%3E%3ClinearGradient id='e' x1='28.4' y1='22.173' x2='22.188' y2='28.384' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23D97706'/%3E%3Cstop offset='1' stop-color='%23FBBF24'/%3E%3C/linearGradient%3E%3ClinearGradient id='f' x1='29.2' y1='54.4' x2='30.626' y2='54.256' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23FBBF24'/%3E%3Cstop offset='1' stop-color='%23FBBF24'/%3E%3C/linearGradient%3E%3ClinearGradient id='h' x1='26.4' y1='9.6' x2='28.8' y2='15' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%237E22CE'/%3E%3Cstop offset='1' stop-color='%238B5CF6'/%3E%3C/linearGradient%3E%3CclipPath id='g'%3E%3Cpath fill='%23fff' transform='translate(24.8 12)' d='M0 0h7.2v8H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E" />
|
|
5
6
|
<base href="http://localhost:8080" />
|
|
6
7
|
</head>
|
|
7
8
|
<body>
|
package/src/stores/tree.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { fetchReportJsonData } from "@allurereport/web-commons";
|
|
2
|
-
import { computed, signal } from "@preact/signals";
|
|
2
|
+
import { computed, effect, signal } from "@preact/signals";
|
|
3
3
|
import type { AllureAwesomeStatus, AllureAwesomeTree, AllureAwesomeTreeGroup } from "types";
|
|
4
4
|
import type { StoreSignalState } from "@/stores/types";
|
|
5
|
+
import { loadFromLocalStorage } from "@/utils/loadFromLocalStorage";
|
|
5
6
|
import { createRecursiveTree, isRecursiveTreeEmpty } from "@/utils/treeFilters";
|
|
6
7
|
|
|
7
8
|
export type TreeSortBy = "order" | "duration" | "status" | "alphabet";
|
|
8
9
|
export type TreeDirection = "asc" | "desc";
|
|
9
10
|
export type TreeFilters = "flaky" | "retry" | "new";
|
|
11
|
+
|
|
10
12
|
export type TreeFiltersState = {
|
|
11
13
|
query: string;
|
|
12
14
|
status: AllureAwesomeStatus;
|
|
@@ -23,16 +25,45 @@ export const treeStore = signal<StoreSignalState<AllureAwesomeTree>>({
|
|
|
23
25
|
|
|
24
26
|
export const noTests = computed(() => !Object.keys(treeStore?.value?.data?.leavesById).length);
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
const loadedFromLS = loadFromLocalStorage<string[]>("collapsedTrees", []);
|
|
29
|
+
export const collapsedTrees = signal(new Set(loadedFromLS as string[]));
|
|
30
|
+
|
|
31
|
+
effect(() => {
|
|
32
|
+
localStorage.setItem("collapsedTrees", JSON.stringify([...collapsedTrees.value]));
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export const toggleTree = (id: string) => {
|
|
36
|
+
const newSet = new Set(collapsedTrees.value);
|
|
37
|
+
if (newSet.has(id)) {
|
|
38
|
+
newSet.delete(id);
|
|
39
|
+
} else {
|
|
40
|
+
newSet.add(id);
|
|
41
|
+
}
|
|
42
|
+
collapsedTrees.value = newSet;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const selectedFilters = signal(new Set(loadFromLocalStorage("selectedFilters", []) as []));
|
|
46
|
+
|
|
47
|
+
effect(() => {
|
|
48
|
+
localStorage.setItem("selectedFilters", JSON.stringify([...selectedFilters.value]));
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export const treeFiltersStore = signal<TreeFiltersState>(
|
|
52
|
+
loadFromLocalStorage<TreeFiltersState>("treeFilters", {
|
|
53
|
+
query: "",
|
|
54
|
+
status: "total",
|
|
55
|
+
filter: {
|
|
56
|
+
flaky: false,
|
|
57
|
+
retry: false,
|
|
58
|
+
new: false,
|
|
59
|
+
},
|
|
60
|
+
sortBy: "order",
|
|
61
|
+
direction: "asc",
|
|
62
|
+
}) as TreeFiltersState,
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
effect(() => {
|
|
66
|
+
localStorage.setItem("treeFilters", JSON.stringify(treeFiltersStore.value));
|
|
36
67
|
});
|
|
37
68
|
|
|
38
69
|
export const filteredTree = computed(() => {
|
package/types.d.ts
CHANGED
|
@@ -33,6 +33,15 @@ export type AllureAwesomeTestStepResult = TestStepResult;
|
|
|
33
33
|
|
|
34
34
|
type AllureAwesomeBreadcrumbItem = string[] | string[][];
|
|
35
35
|
|
|
36
|
+
export interface AllureAwesomeCategory {
|
|
37
|
+
name: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
descriptionHtml?: string;
|
|
40
|
+
messageRegex?: string;
|
|
41
|
+
traceRegex?: string;
|
|
42
|
+
matchedStatuses?: TestStatus[];
|
|
43
|
+
flaky?: boolean;
|
|
44
|
+
}
|
|
36
45
|
export type AllureAwesomeTestResult = Omit<
|
|
37
46
|
TestResult,
|
|
38
47
|
| "runSelector"
|
|
@@ -54,10 +63,14 @@ export type AllureAwesomeTestResult = Omit<
|
|
|
54
63
|
order?: number;
|
|
55
64
|
groupOrder?: number;
|
|
56
65
|
retry: boolean;
|
|
66
|
+
categories?: AllureAwesomeCategory[];
|
|
57
67
|
};
|
|
58
68
|
|
|
59
|
-
export type AllureAwesomeTreeLeaf = Pick<
|
|
60
|
-
|
|
69
|
+
export type AllureAwesomeTreeLeaf = Pick<
|
|
70
|
+
AllureAwesomeTestResult,
|
|
71
|
+
"duration" | "name" | "start" | "status" | "groupOrder" | "flaky" | "retry"
|
|
72
|
+
> & {
|
|
73
|
+
nodeId: string;
|
|
61
74
|
};
|
|
62
75
|
|
|
63
76
|
export type AllureAwesomeTreeGroup = WithChildren & DefaultTreeGroup & { nodeId: string };
|