@allurereport/web-awesome 3.14.1 → 3.14.3
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/{509.app-79195c047a7d3d69106d.js → 573.app-225efc203ca9260d018d.js} +1 -1
- package/dist/multi/{513.app-79195c047a7d3d69106d.js → 894.app-225efc203ca9260d018d.js} +1 -1
- package/dist/multi/{894.app-79195c047a7d3d69106d.js → 954.app-225efc203ca9260d018d.js} +1 -1
- package/dist/multi/app-225efc203ca9260d018d.js +2 -0
- package/dist/multi/{app-79195c047a7d3d69106d.js.LICENSE.txt → app-225efc203ca9260d018d.js.LICENSE.txt} +1 -1
- package/dist/multi/manifest.json +24 -24
- package/dist/single/app-97d4c81e44ac2854f0d3.js +2 -0
- package/dist/single/{app-6301d272d7e742f4dc45.js.LICENSE.txt → app-97d4c81e44ac2854f0d3.js.LICENSE.txt} +1 -1
- package/dist/single/manifest.json +1 -1
- package/package.json +9 -9
- package/src/components/ReportGlobalAttachments/index.tsx +29 -27
- package/src/components/ReportGlobalErrors/index.tsx +29 -27
- package/test/components/ReportGlobals.test.tsx +78 -2
- package/dist/multi/app-79195c047a7d3d69106d.js +0 -2
- package/dist/single/app-6301d272d7e742f4dc45.js +0 -2
- /package/dist/multi/{173.app-79195c047a7d3d69106d.js → 173.app-225efc203ca9260d018d.js} +0 -0
- /package/dist/multi/{174.app-79195c047a7d3d69106d.js → 174.app-225efc203ca9260d018d.js} +0 -0
- /package/dist/multi/{252.app-79195c047a7d3d69106d.js → 252.app-225efc203ca9260d018d.js} +0 -0
- /package/dist/multi/{282.app-79195c047a7d3d69106d.js → 282.app-225efc203ca9260d018d.js} +0 -0
- /package/dist/multi/{29.app-79195c047a7d3d69106d.js → 29.app-225efc203ca9260d018d.js} +0 -0
- /package/dist/multi/{310.app-79195c047a7d3d69106d.js → 310.app-225efc203ca9260d018d.js} +0 -0
- /package/dist/multi/{416.app-79195c047a7d3d69106d.js → 416.app-225efc203ca9260d018d.js} +0 -0
- /package/dist/multi/{507.app-79195c047a7d3d69106d.js → 507.app-225efc203ca9260d018d.js} +0 -0
- /package/dist/multi/{527.app-79195c047a7d3d69106d.js → 527.app-225efc203ca9260d018d.js} +0 -0
- /package/dist/multi/{600.app-79195c047a7d3d69106d.js → 600.app-225efc203ca9260d018d.js} +0 -0
- /package/dist/multi/{605.app-79195c047a7d3d69106d.js → 605.app-225efc203ca9260d018d.js} +0 -0
- /package/dist/multi/{638.app-79195c047a7d3d69106d.js → 638.app-225efc203ca9260d018d.js} +0 -0
- /package/dist/multi/{672.app-79195c047a7d3d69106d.js → 672.app-225efc203ca9260d018d.js} +0 -0
- /package/dist/multi/{686.app-79195c047a7d3d69106d.js → 686.app-225efc203ca9260d018d.js} +0 -0
- /package/dist/multi/{725.app-79195c047a7d3d69106d.js → 725.app-225efc203ca9260d018d.js} +0 -0
- /package/dist/multi/{741.app-79195c047a7d3d69106d.js → 741.app-225efc203ca9260d018d.js} +0 -0
- /package/dist/multi/{749.app-79195c047a7d3d69106d.js → 749.app-225efc203ca9260d018d.js} +0 -0
- /package/dist/multi/{755.app-79195c047a7d3d69106d.js → 755.app-225efc203ca9260d018d.js} +0 -0
- /package/dist/multi/{943.app-79195c047a7d3d69106d.js → 943.app-225efc203ca9260d018d.js} +0 -0
- /package/dist/multi/{980.app-79195c047a7d3d69106d.js → 980.app-225efc203ca9260d018d.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @license DOMPurify 3.4.
|
|
1
|
+
/*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/web-awesome",
|
|
3
|
-
"version": "3.14.
|
|
3
|
+
"version": "3.14.3",
|
|
4
4
|
"description": "The static files for Allure Awesome Report",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"lint:fix": "oxlint --import-plugin --fix src test features stories"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@allurereport/charts-api": "3.14.
|
|
34
|
-
"@allurereport/core-api": "3.14.
|
|
35
|
-
"@allurereport/plugin-api": "3.14.
|
|
36
|
-
"@allurereport/web-commons": "3.14.
|
|
37
|
-
"@allurereport/web-components": "3.14.
|
|
33
|
+
"@allurereport/charts-api": "3.14.3",
|
|
34
|
+
"@allurereport/core-api": "3.14.3",
|
|
35
|
+
"@allurereport/plugin-api": "3.14.3",
|
|
36
|
+
"@allurereport/web-commons": "3.14.3",
|
|
37
|
+
"@allurereport/web-components": "3.14.3",
|
|
38
38
|
"@preact/signals": "^2.6.1",
|
|
39
39
|
"clsx": "^2.1.1",
|
|
40
40
|
"d3-shape": "^3.2.0",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@babel/core": "^7.27.4",
|
|
49
49
|
"@babel/plugin-transform-react-jsx": "^7.27.1",
|
|
50
|
-
"@babel/preset-env": "^
|
|
50
|
+
"@babel/preset-env": "^8.0.2",
|
|
51
51
|
"@babel/preset-typescript": "^7.27.1",
|
|
52
52
|
"@floating-ui/dom": "^1.6.12",
|
|
53
53
|
"@preact/compat": "^18.3.1",
|
|
54
54
|
"@preact/preset-vite": "^2.10.2",
|
|
55
|
-
"@testing-library/jest-dom": "^6.1
|
|
55
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
56
56
|
"@testing-library/preact": "^3.2.3",
|
|
57
57
|
"@testing-library/user-event": "^14.5.1",
|
|
58
58
|
"@types/babel__core": "^7.20.5",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"allure-js-commons": "^3",
|
|
66
66
|
"allure-vitest": "^3",
|
|
67
67
|
"autoprefixer": "^10.4.20",
|
|
68
|
-
"babel-loader": "^
|
|
68
|
+
"babel-loader": "^10.1.1",
|
|
69
69
|
"babel-plugin-prismjs": "^2.1.0",
|
|
70
70
|
"css-loader": "^7.1.4",
|
|
71
71
|
"diff": "^8.0.3",
|
|
@@ -39,6 +39,33 @@ export const ReportGlobalAttachments = () => {
|
|
|
39
39
|
<div className={styles["report-global-attachments"]}>{renderAttachmentList(attachments)}</div>
|
|
40
40
|
);
|
|
41
41
|
|
|
42
|
+
const renderAttachmentSections = (entries: Array<[string, PluginGlobalAttachment[]]>) => (
|
|
43
|
+
<div className={styles["report-global-attachments"]}>
|
|
44
|
+
{entries.map(([environmentId, envAttachments]) => {
|
|
45
|
+
const isOpened = !collapsedEnvs.includes(environmentId);
|
|
46
|
+
const toggleEnv = () => {
|
|
47
|
+
setCollapsedEnvs((prev) =>
|
|
48
|
+
isOpened ? prev.concat(environmentId) : prev.filter((currentId) => currentId !== environmentId),
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<div key={environmentId} className={styles["report-global-attachments-section"]}>
|
|
54
|
+
<MetadataButton
|
|
55
|
+
isOpened={isOpened}
|
|
56
|
+
setIsOpen={toggleEnv}
|
|
57
|
+
title={`${tEnvironments("environment", { count: 1 })}: "${environmentNameById(environmentId)}"`}
|
|
58
|
+
titleTooltipText={environmentNameById(environmentId)}
|
|
59
|
+
truncateTitle
|
|
60
|
+
counter={envAttachments.length}
|
|
61
|
+
/>
|
|
62
|
+
{isOpened ? renderAttachmentList(envAttachments) : null}
|
|
63
|
+
</div>
|
|
64
|
+
);
|
|
65
|
+
})}
|
|
66
|
+
</div>
|
|
67
|
+
);
|
|
68
|
+
|
|
42
69
|
return (
|
|
43
70
|
<Loadable
|
|
44
71
|
source={globalsStore}
|
|
@@ -50,7 +77,7 @@ export const ReportGlobalAttachments = () => {
|
|
|
50
77
|
return <div className={styles["report-global-attachments-empty"]}>{t("no-attachments-results")}</div>;
|
|
51
78
|
}
|
|
52
79
|
|
|
53
|
-
return
|
|
80
|
+
return renderAttachmentSections([[currentEnvironment.value, currentEnvAttachments]]);
|
|
54
81
|
}
|
|
55
82
|
|
|
56
83
|
const entries = Object.entries(attachmentsByEnv).filter(([, envAttachments]) => envAttachments.length > 0);
|
|
@@ -71,32 +98,7 @@ export const ReportGlobalAttachments = () => {
|
|
|
71
98
|
return <div className={styles["report-global-attachments-empty"]}>{t("no-attachments-results")}</div>;
|
|
72
99
|
}
|
|
73
100
|
|
|
74
|
-
return (
|
|
75
|
-
<div className={styles["report-global-attachments"]}>
|
|
76
|
-
{entries.map(([environmentId, envAttachments]) => {
|
|
77
|
-
const isOpened = !collapsedEnvs.includes(environmentId);
|
|
78
|
-
const toggleEnv = () => {
|
|
79
|
-
setCollapsedEnvs((prev) =>
|
|
80
|
-
isOpened ? prev.concat(environmentId) : prev.filter((currentId) => currentId !== environmentId),
|
|
81
|
-
);
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
return (
|
|
85
|
-
<div key={environmentId} className={styles["report-global-attachments-section"]}>
|
|
86
|
-
<MetadataButton
|
|
87
|
-
isOpened={isOpened}
|
|
88
|
-
setIsOpen={toggleEnv}
|
|
89
|
-
title={`${tEnvironments("environment", { count: 1 })}: "${environmentNameById(environmentId)}"`}
|
|
90
|
-
titleTooltipText={environmentNameById(environmentId)}
|
|
91
|
-
truncateTitle
|
|
92
|
-
counter={envAttachments.length}
|
|
93
|
-
/>
|
|
94
|
-
{isOpened ? renderAttachmentList(envAttachments) : null}
|
|
95
|
-
</div>
|
|
96
|
-
);
|
|
97
|
-
})}
|
|
98
|
-
</div>
|
|
99
|
-
);
|
|
101
|
+
return renderAttachmentSections(entries);
|
|
100
102
|
}}
|
|
101
103
|
/>
|
|
102
104
|
);
|
|
@@ -30,6 +30,33 @@ export const ReportGlobalErrors = () => {
|
|
|
30
30
|
<div className={styles["report-global-errors-container"]}>{renderErrors(errors)}</div>
|
|
31
31
|
);
|
|
32
32
|
|
|
33
|
+
const renderErrorSections = (entries: Array<[string, PluginGlobalError[]]>) => (
|
|
34
|
+
<div className={styles["report-global-errors-container"]}>
|
|
35
|
+
{entries.map(([environmentId, envErrors]) => {
|
|
36
|
+
const isOpened = !collapsedEnvs.includes(environmentId);
|
|
37
|
+
const toggleEnv = () => {
|
|
38
|
+
setCollapsedEnvs((prev) =>
|
|
39
|
+
isOpened ? prev.concat(environmentId) : prev.filter((currentId) => currentId !== environmentId),
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<div key={environmentId} className={styles["report-global-errors-section"]}>
|
|
45
|
+
<MetadataButton
|
|
46
|
+
isOpened={isOpened}
|
|
47
|
+
setIsOpen={toggleEnv}
|
|
48
|
+
title={`${tEnvironments("environment", { count: 1 })}: "${environmentNameById(environmentId)}"`}
|
|
49
|
+
titleTooltipText={environmentNameById(environmentId)}
|
|
50
|
+
truncateTitle
|
|
51
|
+
counter={envErrors.length}
|
|
52
|
+
/>
|
|
53
|
+
{isOpened ? renderErrors(envErrors) : null}
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
})}
|
|
57
|
+
</div>
|
|
58
|
+
);
|
|
59
|
+
|
|
33
60
|
return (
|
|
34
61
|
<Loadable
|
|
35
62
|
source={globalsStore}
|
|
@@ -41,7 +68,7 @@ export const ReportGlobalErrors = () => {
|
|
|
41
68
|
return <div className={styles["report-global-errors-empty"]}>{t("no-global-errors-results")}</div>;
|
|
42
69
|
}
|
|
43
70
|
|
|
44
|
-
return
|
|
71
|
+
return renderErrorSections([[currentEnvironment.value, currentEnvErrors]]);
|
|
45
72
|
}
|
|
46
73
|
|
|
47
74
|
const entries = Object.entries(errorsByEnv).filter(([, envErrors]) => envErrors.length > 0);
|
|
@@ -62,32 +89,7 @@ export const ReportGlobalErrors = () => {
|
|
|
62
89
|
return <div className={styles["report-global-errors-empty"]}>{t("no-global-errors-results")}</div>;
|
|
63
90
|
}
|
|
64
91
|
|
|
65
|
-
return (
|
|
66
|
-
<div className={styles["report-global-errors-container"]}>
|
|
67
|
-
{entries.map(([environmentId, envErrors]) => {
|
|
68
|
-
const isOpened = !collapsedEnvs.includes(environmentId);
|
|
69
|
-
const toggleEnv = () => {
|
|
70
|
-
setCollapsedEnvs((prev) =>
|
|
71
|
-
isOpened ? prev.concat(environmentId) : prev.filter((currentId) => currentId !== environmentId),
|
|
72
|
-
);
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
return (
|
|
76
|
-
<div key={environmentId} className={styles["report-global-errors-section"]}>
|
|
77
|
-
<MetadataButton
|
|
78
|
-
isOpened={isOpened}
|
|
79
|
-
setIsOpen={toggleEnv}
|
|
80
|
-
title={`${tEnvironments("environment", { count: 1 })}: "${environmentNameById(environmentId)}"`}
|
|
81
|
-
titleTooltipText={environmentNameById(environmentId)}
|
|
82
|
-
truncateTitle
|
|
83
|
-
counter={envErrors.length}
|
|
84
|
-
/>
|
|
85
|
-
{isOpened ? renderErrors(envErrors) : null}
|
|
86
|
-
</div>
|
|
87
|
-
);
|
|
88
|
-
})}
|
|
89
|
-
</div>
|
|
90
|
-
);
|
|
92
|
+
return renderErrorSections(entries);
|
|
91
93
|
}}
|
|
92
94
|
/>
|
|
93
95
|
);
|
|
@@ -15,10 +15,10 @@ const environmentNames: Record<string, string> = {
|
|
|
15
15
|
qa_env: "QA",
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
const setupGlobalsComponent = async (data: Record<string, unknown
|
|
18
|
+
const setupGlobalsComponent = async (data: Record<string, unknown>, selectedEnvironment = "") => {
|
|
19
19
|
vi.resetModules();
|
|
20
20
|
|
|
21
|
-
const currentEnvironment = signal(
|
|
21
|
+
const currentEnvironment = signal(selectedEnvironment);
|
|
22
22
|
const globalsStore = signal({
|
|
23
23
|
loading: false,
|
|
24
24
|
error: undefined,
|
|
@@ -164,4 +164,80 @@ describe("components > Report globals", () => {
|
|
|
164
164
|
expect(screen.getByText('environment: "QA" (1)')).toBeInTheDocument();
|
|
165
165
|
expect(screen.getByText('environment: "Prod" (1)')).toBeInTheDocument();
|
|
166
166
|
}, 15000);
|
|
167
|
+
|
|
168
|
+
it("should keep only selected attachment bucket", async () => {
|
|
169
|
+
await setupGlobalsComponent(
|
|
170
|
+
{
|
|
171
|
+
attachments: [],
|
|
172
|
+
attachmentsByEnv: {
|
|
173
|
+
default: [
|
|
174
|
+
{
|
|
175
|
+
id: "default",
|
|
176
|
+
name: "default.log",
|
|
177
|
+
originalFileName: "default.log",
|
|
178
|
+
ext: ".log",
|
|
179
|
+
used: true,
|
|
180
|
+
missed: false,
|
|
181
|
+
environment: "default",
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
qa_env: [
|
|
185
|
+
{
|
|
186
|
+
id: "qa",
|
|
187
|
+
name: "qa.log",
|
|
188
|
+
originalFileName: "qa.log",
|
|
189
|
+
ext: ".log",
|
|
190
|
+
used: true,
|
|
191
|
+
missed: false,
|
|
192
|
+
environment: "QA",
|
|
193
|
+
},
|
|
194
|
+
],
|
|
195
|
+
prod_env: [
|
|
196
|
+
{
|
|
197
|
+
id: "prod",
|
|
198
|
+
name: "prod.log",
|
|
199
|
+
originalFileName: "prod.log",
|
|
200
|
+
ext: ".log",
|
|
201
|
+
used: true,
|
|
202
|
+
missed: false,
|
|
203
|
+
environment: "Prod",
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
"qa_env",
|
|
209
|
+
);
|
|
210
|
+
|
|
211
|
+
const { ReportGlobalAttachments } = await import("@/components/ReportGlobalAttachments");
|
|
212
|
+
|
|
213
|
+
render(<ReportGlobalAttachments />);
|
|
214
|
+
|
|
215
|
+
expect(screen.getByText('environment: "QA" (1)')).toBeInTheDocument();
|
|
216
|
+
expect(screen.queryByText('environment: "default" (1)')).not.toBeInTheDocument();
|
|
217
|
+
expect(screen.queryByText('environment: "Prod" (1)')).not.toBeInTheDocument();
|
|
218
|
+
expect(screen.getByText("qa.log")).toBeInTheDocument();
|
|
219
|
+
}, 15000);
|
|
220
|
+
|
|
221
|
+
it("should keep only selected error bucket", async () => {
|
|
222
|
+
await setupGlobalsComponent(
|
|
223
|
+
{
|
|
224
|
+
errors: [],
|
|
225
|
+
errorsByEnv: {
|
|
226
|
+
default: [{ message: "Default failure", environment: "default" }],
|
|
227
|
+
qa_env: [{ message: "QA failure", environment: "QA" }],
|
|
228
|
+
prod_env: [{ message: "Prod failure", environment: "Prod" }],
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
"qa_env",
|
|
232
|
+
);
|
|
233
|
+
|
|
234
|
+
const { ReportGlobalErrors } = await import("@/components/ReportGlobalErrors");
|
|
235
|
+
|
|
236
|
+
render(<ReportGlobalErrors />);
|
|
237
|
+
|
|
238
|
+
expect(screen.getByText('environment: "QA" (1)')).toBeInTheDocument();
|
|
239
|
+
expect(screen.queryByText('environment: "default" (1)')).not.toBeInTheDocument();
|
|
240
|
+
expect(screen.queryByText('environment: "Prod" (1)')).not.toBeInTheDocument();
|
|
241
|
+
expect(screen.getByText("QA failure")).toBeInTheDocument();
|
|
242
|
+
}, 15000);
|
|
167
243
|
});
|