@allurereport/web-summary 3.0.0-beta.16 → 3.0.0-beta.18
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/app-e9de039e5780204bcbb8.js +2 -0
- package/dist/app-e9de039e5780204bcbb8.js.LICENSE.txt +8 -0
- package/dist/manifest.json +1 -1
- package/package.json +6 -6
- package/src/components/IconLabel/index.tsx +37 -0
- package/src/components/IconLabel/styles.scss +17 -0
- package/src/components/ReportCard/index.tsx +23 -4
- package/src/components/ReportCard/styles.scss +7 -0
- package/src/i18n/locales/az.json +4 -1
- package/src/i18n/locales/de.json +4 -1
- package/src/i18n/locales/en.json +4 -1
- package/src/i18n/locales/es.json +4 -1
- package/src/i18n/locales/fr.json +4 -1
- package/src/i18n/locales/he.json +4 -1
- package/src/i18n/locales/hy.json +5 -1
- package/src/i18n/locales/it.json +4 -1
- package/src/i18n/locales/ja.json +4 -1
- package/src/i18n/locales/ka.json +4 -1
- package/src/i18n/locales/kr.json +4 -1
- package/src/i18n/locales/nl.json +4 -1
- package/src/i18n/locales/pl.json +4 -1
- package/src/i18n/locales/pt.json +4 -1
- package/src/i18n/locales/ru.json +4 -1
- package/src/i18n/locales/sv.json +4 -1
- package/src/i18n/locales/tr.json +4 -1
- package/src/i18n/locales/zh.json +4 -1
- package/src/index.html +74 -0
- package/dist/app-b6e0bd53352fd2fa88a3.js +0 -2
- package/dist/app-b6e0bd53352fd2fa88a3.js.LICENSE.txt +0 -15
package/dist/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/web-summary",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.18",
|
|
4
4
|
"description": "The static files for Allure Report Summary",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"IE 11"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@allurereport/core-api": "3.0.0-beta.
|
|
31
|
-
"@allurereport/web-commons": "3.0.0-beta.
|
|
32
|
-
"@allurereport/web-components": "3.0.0-beta.
|
|
30
|
+
"@allurereport/core-api": "3.0.0-beta.18",
|
|
31
|
+
"@allurereport/web-commons": "3.0.0-beta.18",
|
|
32
|
+
"@allurereport/web-components": "3.0.0-beta.18",
|
|
33
33
|
"@preact/signals": "^1.3.0",
|
|
34
34
|
"clsx": "^2.1.1",
|
|
35
35
|
"i18next": "^24.0.2",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"html-webpack-plugin": "^5.6.3",
|
|
73
73
|
"mini-css-extract-plugin": "^2.9.1",
|
|
74
74
|
"npm-run-all2": "^7.0.1",
|
|
75
|
-
"postcss": "^8.5.
|
|
75
|
+
"postcss": "^8.5.6",
|
|
76
76
|
"rimraf": "^6.0.1",
|
|
77
77
|
"sass": "^1.79.1",
|
|
78
78
|
"sass-loader": "^16.0.1",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"typescript-eslint": "^8.6.0",
|
|
83
83
|
"webpack": "^5.99.9",
|
|
84
84
|
"webpack-cli": "^5.1.4",
|
|
85
|
-
"webpack-dev-server": "^5.2.
|
|
85
|
+
"webpack-dev-server": "^5.2.2",
|
|
86
86
|
"webpack-manifest-plugin": "^5.0.0"
|
|
87
87
|
}
|
|
88
88
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { SvgIcon, Text, TooltipWrapper } from "@allurereport/web-components";
|
|
2
|
+
import cx from "clsx";
|
|
3
|
+
import type { FunctionalComponent } from "preact";
|
|
4
|
+
import * as styles from "./styles.scss";
|
|
5
|
+
|
|
6
|
+
export type IconLabelProps = {
|
|
7
|
+
icon: string;
|
|
8
|
+
tooltip?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const IconLabel: FunctionalComponent<IconLabelProps> = ({ icon, children, tooltip, className, ...rest }) => {
|
|
13
|
+
const content = (
|
|
14
|
+
<div className={cx(styles["icon-label-wrapper"], className)}>
|
|
15
|
+
<SvgIcon className={styles["icon-label-icon"]} id={icon} />
|
|
16
|
+
<Text className={styles["icon-label-text"]} type="ui" size="s" bold>
|
|
17
|
+
{children}
|
|
18
|
+
</Text>
|
|
19
|
+
</div>
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
if (tooltip) {
|
|
23
|
+
return (
|
|
24
|
+
<div className={styles["icon-label"]} {...rest}>
|
|
25
|
+
<TooltipWrapper tooltipText={tooltip}>{content}</TooltipWrapper>
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<div className={styles["icon-label"]} {...rest}>
|
|
32
|
+
{content}
|
|
33
|
+
</div>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export default IconLabel;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.icon-label {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.icon-label-wrapper {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: 6px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.icon-label-icon {
|
|
12
|
+
color: var(--on-icon-secondary);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.icon-label-text {
|
|
16
|
+
color: var(--on-text-secondary);
|
|
17
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { type Statistic, type TestStatus, formatDuration } from "@allurereport/core-api";
|
|
1
|
+
import { type Statistic, type TestStatus, formatDuration, getPieChartValues } from "@allurereport/core-api";
|
|
2
2
|
import { capitalize } from "@allurereport/web-commons";
|
|
3
|
-
import { Heading, StatusLabel, SuccessRatePieChart, Text,
|
|
3
|
+
import { Heading, StatusLabel, SuccessRatePieChart, Text, allureIcons } from "@allurereport/web-components";
|
|
4
4
|
import type { FunctionalComponent } from "preact";
|
|
5
|
+
import IconLabel from "@/components/IconLabel";
|
|
5
6
|
import type { MetadataProps } from "@/components/MetadataRow/MetadataItem";
|
|
6
7
|
import MetadataItem, { MetadataTestType } from "@/components/MetadataRow/MetadataItem";
|
|
7
8
|
import { currentLocaleIso, useI18n } from "@/stores";
|
|
@@ -12,6 +13,10 @@ export type ReportCardProps = {
|
|
|
12
13
|
name: string;
|
|
13
14
|
status: TestStatus;
|
|
14
15
|
stats: Statistic;
|
|
16
|
+
// TODO: use SummaryTestResult in the package
|
|
17
|
+
newTests: any[];
|
|
18
|
+
retryTests: any[];
|
|
19
|
+
flakyTests: any[];
|
|
15
20
|
duration: number;
|
|
16
21
|
plugin?: string;
|
|
17
22
|
createdAt?: number;
|
|
@@ -25,9 +30,12 @@ export const ReportCard: FunctionalComponent<ReportCardProps> = ({
|
|
|
25
30
|
duration,
|
|
26
31
|
plugin,
|
|
27
32
|
createdAt,
|
|
33
|
+
newTests,
|
|
34
|
+
flakyTests,
|
|
35
|
+
retryTests,
|
|
28
36
|
}) => {
|
|
29
37
|
const { t } = useI18n("summary");
|
|
30
|
-
const { percentage, slices } =
|
|
38
|
+
const { percentage, slices } = getPieChartValues(stats);
|
|
31
39
|
const formattedDuration = formatDuration(duration);
|
|
32
40
|
const formattedCreatedAt = new Date(createdAt as number).toLocaleDateString(currentLocaleIso.value as string, {
|
|
33
41
|
month: "long",
|
|
@@ -46,7 +54,7 @@ export const ReportCard: FunctionalComponent<ReportCardProps> = ({
|
|
|
46
54
|
target={"_blank"}
|
|
47
55
|
rel="noreferrer"
|
|
48
56
|
>
|
|
49
|
-
<div
|
|
57
|
+
<div>
|
|
50
58
|
{plugin && (
|
|
51
59
|
<Text type={"ui"} tag={"div"} size={"s"} className={styles["report-card-plugin"]}>
|
|
52
60
|
{plugin}
|
|
@@ -71,6 +79,17 @@ export const ReportCard: FunctionalComponent<ReportCardProps> = ({
|
|
|
71
79
|
{formattedDuration}
|
|
72
80
|
</Text>
|
|
73
81
|
</div>
|
|
82
|
+
<div className={styles["report-card-metadata-icons"]}>
|
|
83
|
+
<IconLabel tooltip={capitalize(t("new"))} icon={allureIcons.testNew}>
|
|
84
|
+
{newTests?.length ?? 0}
|
|
85
|
+
</IconLabel>
|
|
86
|
+
<IconLabel tooltip={capitalize(t("flaky"))} icon={allureIcons.lineIconBomb2}>
|
|
87
|
+
{flakyTests?.length ?? 0}
|
|
88
|
+
</IconLabel>
|
|
89
|
+
<IconLabel tooltip={capitalize(t("retry"))} icon={allureIcons.lineGeneralZap}>
|
|
90
|
+
{retryTests?.length ?? 0}
|
|
91
|
+
</IconLabel>
|
|
92
|
+
</div>
|
|
74
93
|
<div className={styles["report-card-metadata"]}>
|
|
75
94
|
{[
|
|
76
95
|
{ label: "total", value: stats?.total },
|
package/src/i18n/locales/az.json
CHANGED
package/src/i18n/locales/de.json
CHANGED
package/src/i18n/locales/en.json
CHANGED
package/src/i18n/locales/es.json
CHANGED
package/src/i18n/locales/fr.json
CHANGED
package/src/i18n/locales/he.json
CHANGED
package/src/i18n/locales/hy.json
CHANGED
|
@@ -5,7 +5,11 @@
|
|
|
5
5
|
"broken": "կոտրված",
|
|
6
6
|
"skipped": "բաց թողնված",
|
|
7
7
|
"unknown": "անհայտ",
|
|
8
|
-
"
|
|
8
|
+
"total": "ընդհանուր",
|
|
9
|
+
"in": "մեջ",
|
|
10
|
+
"new": "նոր թեստեր",
|
|
11
|
+
"flaky": "անկայուն թեստեր",
|
|
12
|
+
"retry": "կրկնվող թեստեր"
|
|
9
13
|
},
|
|
10
14
|
"empty": {
|
|
11
15
|
"no-reports": "Ոչ մի հաշվետվություն չի գտնվել"
|
package/src/i18n/locales/it.json
CHANGED
package/src/i18n/locales/ja.json
CHANGED
package/src/i18n/locales/ka.json
CHANGED
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
"skipped": "გამოტოვებული",
|
|
7
7
|
"unknown": "უცნობი",
|
|
8
8
|
"total": "ჯამი",
|
|
9
|
-
"in": "ში"
|
|
9
|
+
"in": "ში",
|
|
10
|
+
"new": "ახალი ტესტები",
|
|
11
|
+
"flaky": "არასტაბილური ტესტები",
|
|
12
|
+
"retry": "განმეორებითი ტესტები"
|
|
10
13
|
},
|
|
11
14
|
"empty": {
|
|
12
15
|
"no-reports": "არ მოიძებნა არცერთი ანგარიში"
|
package/src/i18n/locales/kr.json
CHANGED
package/src/i18n/locales/nl.json
CHANGED
package/src/i18n/locales/pl.json
CHANGED
package/src/i18n/locales/pt.json
CHANGED
package/src/i18n/locales/ru.json
CHANGED
package/src/i18n/locales/sv.json
CHANGED
package/src/i18n/locales/tr.json
CHANGED
package/src/i18n/locales/zh.json
CHANGED
package/src/index.html
CHANGED
|
@@ -35,6 +35,48 @@
|
|
|
35
35
|
},
|
|
36
36
|
duration: 1240812,
|
|
37
37
|
status: "failed",
|
|
38
|
+
newTests: [
|
|
39
|
+
{
|
|
40
|
+
name: "New test 1",
|
|
41
|
+
id: "1",
|
|
42
|
+
status: "passed",
|
|
43
|
+
duration: 100
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "New test 2",
|
|
47
|
+
id: "2",
|
|
48
|
+
status: "passed",
|
|
49
|
+
duration: 100
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "New test 3",
|
|
53
|
+
id: "3",
|
|
54
|
+
status: "passed",
|
|
55
|
+
duration: 100
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
flakyTests: [
|
|
59
|
+
{
|
|
60
|
+
name: "New test 1",
|
|
61
|
+
id: "1",
|
|
62
|
+
status: "passed",
|
|
63
|
+
duration: 100
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
retryTests: [
|
|
67
|
+
{
|
|
68
|
+
name: "New test 1",
|
|
69
|
+
id: "1",
|
|
70
|
+
status: "passed",
|
|
71
|
+
duration: 100
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: "New test 2",
|
|
75
|
+
id: "2",
|
|
76
|
+
status: "passed",
|
|
77
|
+
duration: 100
|
|
78
|
+
},
|
|
79
|
+
]
|
|
38
80
|
},
|
|
39
81
|
{
|
|
40
82
|
name: "Second sample report with longer title",
|
|
@@ -45,6 +87,16 @@
|
|
|
45
87
|
},
|
|
46
88
|
duration: 31290,
|
|
47
89
|
status: "passed",
|
|
90
|
+
newTests: [
|
|
91
|
+
{
|
|
92
|
+
name: "New test 1",
|
|
93
|
+
id: "1",
|
|
94
|
+
status: "failed",
|
|
95
|
+
duration: 100
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
flakyTests: [],
|
|
99
|
+
retryTests: [],
|
|
48
100
|
},
|
|
49
101
|
{
|
|
50
102
|
name: "Third report",
|
|
@@ -56,6 +108,9 @@
|
|
|
56
108
|
},
|
|
57
109
|
duration: 512341,
|
|
58
110
|
status: "broken",
|
|
111
|
+
newTests: [],
|
|
112
|
+
flakyTests: [],
|
|
113
|
+
retryTests: [],
|
|
59
114
|
},
|
|
60
115
|
{
|
|
61
116
|
name: "Fourth report",
|
|
@@ -68,6 +123,9 @@
|
|
|
68
123
|
},
|
|
69
124
|
duration: 12341,
|
|
70
125
|
status: "broken",
|
|
126
|
+
newTests: [],
|
|
127
|
+
flakyTests: [],
|
|
128
|
+
retryTests: [],
|
|
71
129
|
},
|
|
72
130
|
{
|
|
73
131
|
name: "Fifth report with a very long title that should not be truncated and should be displayed in full",
|
|
@@ -79,6 +137,22 @@
|
|
|
79
137
|
},
|
|
80
138
|
duration: 0,
|
|
81
139
|
status: "unknown",
|
|
140
|
+
newTests: [
|
|
141
|
+
{
|
|
142
|
+
name: "New test 1",
|
|
143
|
+
id: "1",
|
|
144
|
+
status: "passed",
|
|
145
|
+
duration: 100
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: "New test 2",
|
|
149
|
+
id: "2",
|
|
150
|
+
status: "failed",
|
|
151
|
+
duration: 100
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
flakyTests: [],
|
|
155
|
+
retryTests: [],
|
|
82
156
|
},
|
|
83
157
|
]
|
|
84
158
|
</script>
|