@allurereport/web-awesome 3.0.0 → 3.1.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/multi/173.app-79c65c7bff941abcbc51.js +1 -0
- package/dist/multi/174.app-79c65c7bff941abcbc51.js +1 -0
- package/dist/multi/252.app-79c65c7bff941abcbc51.js +1 -0
- package/dist/multi/282.app-79c65c7bff941abcbc51.js +1 -0
- package/dist/multi/29.app-79c65c7bff941abcbc51.js +1 -0
- package/dist/multi/416.app-79c65c7bff941abcbc51.js +1 -0
- package/dist/multi/527.app-79c65c7bff941abcbc51.js +1 -0
- package/dist/multi/600.app-79c65c7bff941abcbc51.js +1 -0
- package/dist/multi/605.app-79c65c7bff941abcbc51.js +1 -0
- package/dist/multi/638.app-79c65c7bff941abcbc51.js +1 -0
- package/dist/multi/672.app-79c65c7bff941abcbc51.js +1 -0
- package/dist/multi/686.app-79c65c7bff941abcbc51.js +1 -0
- package/dist/multi/725.app-79c65c7bff941abcbc51.js +1 -0
- package/dist/multi/741.app-79c65c7bff941abcbc51.js +1 -0
- package/dist/multi/755.app-79c65c7bff941abcbc51.js +1 -0
- package/dist/multi/894.app-79c65c7bff941abcbc51.js +1 -0
- package/dist/multi/91.app-79c65c7bff941abcbc51.js +1 -0
- package/dist/multi/943.app-79c65c7bff941abcbc51.js +1 -0
- package/dist/multi/980.app-79c65c7bff941abcbc51.js +1 -0
- package/dist/multi/app-79c65c7bff941abcbc51.js +2 -0
- package/dist/multi/{app-9931797d1602fc52db5b.js.LICENSE.txt → app-79c65c7bff941abcbc51.js.LICENSE.txt} +7 -0
- package/dist/multi/manifest.json +21 -21
- package/dist/multi/styles-9e390bad7ce54a807a8e.css +49 -0
- package/dist/single/app-3ca67f29d0f1166c08ca.js +2 -0
- package/dist/single/{app-6199dc1c2fd3bddc2526.js.LICENSE.txt → app-3ca67f29d0f1166c08ca.js.LICENSE.txt} +7 -0
- package/dist/single/manifest.json +1 -1
- package/package.json +8 -8
- package/src/assets/scss/palette.scss +102 -102
- package/src/assets/scss/vars.scss +3 -0
- package/src/components/BaseLayout/index.tsx +25 -21
- package/src/components/BaseLayout/styles.scss +1 -0
- package/src/components/Charts/index.tsx +5 -2
- package/src/components/Footer/FooterVersion.tsx +14 -8
- package/src/components/Header/index.tsx +9 -7
- package/src/components/HeaderControls/index.tsx +5 -2
- package/src/components/MainReport/styles.scss +1 -0
- package/src/components/Metadata/index.tsx +24 -7
- package/src/components/ReportBody/HeaderActions.tsx +4 -13
- package/src/components/ReportBody/SortBy.tsx +28 -17
- package/src/components/ReportBody/index.tsx +12 -17
- package/src/components/ReportBody/styles.scss +4 -1
- package/src/components/ReportFilters/BaseFilters.tsx +345 -0
- package/src/components/ReportFilters/RetryFlaky.tsx +29 -0
- package/src/components/ReportFilters/TagsFilter.tsx +41 -0
- package/src/components/ReportFilters/TransitionFilter.tsx +49 -0
- package/src/components/ReportFilters/index.tsx +44 -0
- package/src/components/ReportFilters/styles.scss +55 -0
- package/src/components/ReportSearch/index.tsx +29 -0
- package/src/components/ReportTabs/index.tsx +37 -0
- package/src/components/SectionPicker/index.tsx +1 -1
- package/src/components/SplitLayout/index.tsx +7 -5
- package/src/components/TestResult/TestStepsEmpty/index.tsx +1 -7
- package/src/components/TestResult/TrEmpty/index.tsx +1 -7
- package/src/components/TestResult/TrEnvironmentItem/index.tsx +2 -2
- package/src/components/TestResult/TrError/index.tsx +9 -2
- package/src/components/TestResult/TrHeader/TrBreadcrumbs.tsx +2 -2
- package/src/components/TestResult/TrHistory/TrHistoryItem.tsx +38 -7
- package/src/components/TestResult/TrHistory/index.tsx +18 -8
- package/src/components/TestResult/TrHistory/styles.scss +4 -7
- package/src/components/TestResult/TrInfo/styles.scss +1 -0
- package/src/components/TestResult/TrNavigation/index.tsx +109 -68
- package/src/components/TestResult/TrNavigation/styles.scss +15 -25
- package/src/components/TestResult/TrPwTraces/PwTraceButton.tsx +1 -8
- package/src/components/TestResult/TrRetriesView/TrRetriesItem.tsx +2 -3
- package/src/components/TestResult/TrRetriesView/index.tsx +4 -3
- package/src/components/TestResult/TrSteps/TrAttachment.tsx +5 -3
- package/src/components/TestResult/TrSteps/TrAttachmentInfo.tsx +10 -3
- package/src/components/TestResult/TrSteps/TrStep.tsx +3 -3
- package/src/components/TestResult/TrTabs/index.tsx +7 -23
- package/src/components/TestResult/index.tsx +9 -4
- package/src/components/TestResult/styles.scss +1 -0
- package/src/components/Tree/index.tsx +22 -25
- package/src/index.html +19 -18
- package/src/index.tsx +20 -28
- package/src/locales/az.json +42 -12
- package/src/locales/de.json +42 -12
- package/src/locales/en.json +42 -12
- package/src/locales/es.json +42 -12
- package/src/locales/fr.json +42 -12
- package/src/locales/he.json +42 -12
- package/src/locales/hy.json +42 -12
- package/src/locales/it.json +42 -12
- package/src/locales/ja.json +42 -12
- package/src/locales/ka.json +42 -12
- package/src/locales/kr.json +42 -12
- package/src/locales/nl.json +42 -12
- package/src/locales/pl.json +42 -12
- package/src/locales/pt.json +42 -12
- package/src/locales/ru.json +42 -12
- package/src/locales/sv.json +42 -12
- package/src/locales/tr.json +42 -12
- package/src/locales/ua.json +42 -12
- package/src/locales/zh.json +42 -12
- package/src/stores/chart.ts +2 -2
- package/src/stores/env.ts +6 -6
- package/src/stores/envInfo.ts +2 -2
- package/src/stores/globals.ts +1 -1
- package/src/stores/index.ts +0 -1
- package/src/stores/layout.ts +20 -11
- package/src/stores/locale.ts +2 -1
- package/src/stores/qualityGate.ts +2 -2
- package/src/stores/router.ts +25 -91
- package/src/stores/sections.ts +32 -45
- package/src/stores/stats.ts +4 -4
- package/src/stores/testResult.ts +5 -0
- package/src/stores/testResults.ts +7 -5
- package/src/stores/tree.ts +49 -126
- package/src/stores/treeFilters/actions.ts +63 -0
- package/src/stores/treeFilters/constants.ts +13 -0
- package/src/stores/treeFilters/model.ts +51 -0
- package/src/stores/treeFilters/store.ts +273 -0
- package/src/stores/treeFilters/utils.ts +132 -0
- package/src/stores/treeSort.ts +71 -0
- package/src/stores/variables.ts +3 -3
- package/src/utils/persist.ts +23 -0
- package/src/utils/tree.ts +12 -5
- package/src/utils/treeFilters.ts +48 -54
- package/test/components/Header.test.tsx +49 -58
- package/test/utils/treeFilters.test.ts +18 -176
- package/types.d.ts +4 -1
- package/dist/multi/173.app-9931797d1602fc52db5b.js +0 -1
- package/dist/multi/174.app-9931797d1602fc52db5b.js +0 -1
- package/dist/multi/252.app-9931797d1602fc52db5b.js +0 -1
- package/dist/multi/282.app-9931797d1602fc52db5b.js +0 -1
- package/dist/multi/29.app-9931797d1602fc52db5b.js +0 -1
- package/dist/multi/416.app-9931797d1602fc52db5b.js +0 -1
- package/dist/multi/527.app-9931797d1602fc52db5b.js +0 -1
- package/dist/multi/600.app-9931797d1602fc52db5b.js +0 -1
- package/dist/multi/605.app-9931797d1602fc52db5b.js +0 -1
- package/dist/multi/638.app-9931797d1602fc52db5b.js +0 -1
- package/dist/multi/672.app-9931797d1602fc52db5b.js +0 -1
- package/dist/multi/686.app-9931797d1602fc52db5b.js +0 -1
- package/dist/multi/725.app-9931797d1602fc52db5b.js +0 -1
- package/dist/multi/741.app-9931797d1602fc52db5b.js +0 -1
- package/dist/multi/755.app-9931797d1602fc52db5b.js +0 -1
- package/dist/multi/894.app-9931797d1602fc52db5b.js +0 -1
- package/dist/multi/91.app-9931797d1602fc52db5b.js +0 -1
- package/dist/multi/943.app-9931797d1602fc52db5b.js +0 -1
- package/dist/multi/980.app-9931797d1602fc52db5b.js +0 -1
- package/dist/multi/app-9931797d1602fc52db5b.js +0 -2
- package/dist/multi/styles-8fe37354d1c2270c691e.css +0 -48
- package/dist/single/app-6199dc1c2fd3bddc2526.js +0 -2
- package/src/components/ReportBody/Filters.tsx +0 -71
- package/src/components/Tabs/index.tsx +0 -62
- package/src/stores/theme.ts +0 -30
- /package/src/components/{Tabs → ReportTabs}/styles.scss +0 -0
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
.
|
|
1
|
+
.nav {
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: space-between;
|
|
4
4
|
margin-bottom: 12px;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
.
|
|
8
|
-
font-weight: 400;
|
|
7
|
+
.fullName {
|
|
9
8
|
display: flex;
|
|
10
9
|
gap: 4px;
|
|
11
10
|
align-items: center;
|
|
@@ -13,36 +12,27 @@
|
|
|
13
12
|
text-overflow: ellipsis;
|
|
14
13
|
overflow: hidden;
|
|
15
14
|
min-height: 32px;
|
|
16
|
-
|
|
15
|
+
margin-left: -4px;
|
|
17
16
|
|
|
18
|
-
.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.test-result-fullName-icon {
|
|
28
|
-
--allure-btn-icon-color: var(--on-icon-secondary);
|
|
17
|
+
& .text {
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
white-space: nowrap;
|
|
20
|
+
text-overflow: ellipsis;
|
|
21
|
+
width: 100%;
|
|
22
|
+
color: var(--on-text-secondary);
|
|
23
|
+
}
|
|
29
24
|
}
|
|
30
25
|
|
|
31
|
-
.
|
|
26
|
+
.controls {
|
|
32
27
|
display: flex;
|
|
33
28
|
gap: 4px;
|
|
34
29
|
align-items: center;
|
|
35
30
|
margin-left: auto;
|
|
31
|
+
margin-right: -18px;
|
|
36
32
|
}
|
|
37
33
|
|
|
38
|
-
.
|
|
34
|
+
.counter {
|
|
39
35
|
color: var(--on-text-secondary);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
.test-result-nav-prev {
|
|
44
|
-
transform: rotate(-180deg);
|
|
45
|
-
&:active {
|
|
46
|
-
transform: scale(var(--allure-btn-pressed-scale)) rotate(-180deg);
|
|
47
|
-
}
|
|
36
|
+
padding-left: 4px;
|
|
37
|
+
padding-right: 4px;
|
|
48
38
|
}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import type { AttachmentTestStepResult } from "@allurereport/core-api";
|
|
2
|
-
import
|
|
3
|
-
import { fetchReportAttachment } from "@allurereport/web-commons";
|
|
2
|
+
import { fetchFromUrl } from "@allurereport/web-commons";
|
|
4
3
|
import { IconButton, TooltipWrapper, allureIcons } from "@allurereport/web-components";
|
|
5
4
|
import { PwTrace } from "@/components/TestResult/TrPwTraces/PwTrace";
|
|
6
5
|
import { useI18n } from "@/stores";
|
|
7
6
|
import { openModal } from "@/stores/modal";
|
|
8
7
|
|
|
9
|
-
export const fetchFromUrl = async ({ id, ext, contentType }: Attachments) => {
|
|
10
|
-
const fileName = `${id || "-"}${ext || ""}`;
|
|
11
|
-
|
|
12
|
-
return fetchReportAttachment(`data/attachments/${fileName}?attachment`, contentType);
|
|
13
|
-
};
|
|
14
|
-
|
|
15
8
|
export const PwTraceButton = ({ link }: Pick<AttachmentTestStepResult, "link">) => {
|
|
16
9
|
const { t } = useI18n("ui");
|
|
17
10
|
const openPw = async () => {
|
|
@@ -6,7 +6,7 @@ import type { AwesomeTestResult } from "types";
|
|
|
6
6
|
import { TrError } from "@/components/TestResult/TrError";
|
|
7
7
|
import * as styles from "@/components/TestResult/TrRetriesView/styles.scss";
|
|
8
8
|
import { useI18n } from "@/stores/locale";
|
|
9
|
-
import {
|
|
9
|
+
import { navigateToTestResult } from "@/stores/router";
|
|
10
10
|
import { timestampToDate } from "@/utils/time";
|
|
11
11
|
|
|
12
12
|
export type TrRetriesItemProps = {
|
|
@@ -26,7 +26,6 @@ export const TrRetriesItem: FunctionalComponent<TrRetriesItemProps> = ({ testRes
|
|
|
26
26
|
const retryTitle = convertedStop ? `${retryTitlePrefix} – ${convertedStop}` : retryTitlePrefix;
|
|
27
27
|
|
|
28
28
|
const formattedDuration = typeof duration === "number" ? formatDuration(duration) : undefined;
|
|
29
|
-
const navigateUrl = id;
|
|
30
29
|
|
|
31
30
|
return (
|
|
32
31
|
<div data-testid="test-result-retries-item">
|
|
@@ -55,7 +54,7 @@ export const TrRetriesItem: FunctionalComponent<TrRetriesItemProps> = ({ testRes
|
|
|
55
54
|
size={"s"}
|
|
56
55
|
className={styles["test-result-retries-item-link"]}
|
|
57
56
|
data-testid="test-result-retries-item-open-button"
|
|
58
|
-
onClick={() =>
|
|
57
|
+
onClick={() => navigateToTestResult({ testResultId: id })}
|
|
59
58
|
/>
|
|
60
59
|
</div>
|
|
61
60
|
</div>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { EmptyView } from "@allurereport/web-components";
|
|
1
2
|
import type { FunctionalComponent } from "preact";
|
|
2
3
|
import type { AwesomeTestResult } from "types";
|
|
3
|
-
import * as styles from "@/components/TestResult/TrHistory/styles.scss";
|
|
4
4
|
import { TrRetriesItem } from "@/components/TestResult/TrRetriesView/TrRetriesItem";
|
|
5
5
|
import { useI18n } from "@/stores";
|
|
6
|
+
import * as styles from "./styles.scss";
|
|
6
7
|
|
|
7
8
|
export const TrRetriesView: FunctionalComponent<{
|
|
8
9
|
testResult: AwesomeTestResult;
|
|
@@ -11,7 +12,7 @@ export const TrRetriesView: FunctionalComponent<{
|
|
|
11
12
|
const { t } = useI18n("empty");
|
|
12
13
|
|
|
13
14
|
return (
|
|
14
|
-
<div className={styles["test-result-
|
|
15
|
+
<div className={styles["test-result-retries"]}>
|
|
15
16
|
{retries.length ? (
|
|
16
17
|
retries?.map((item, key) => (
|
|
17
18
|
<TrRetriesItem
|
|
@@ -22,7 +23,7 @@ export const TrRetriesView: FunctionalComponent<{
|
|
|
22
23
|
/>
|
|
23
24
|
))
|
|
24
25
|
) : (
|
|
25
|
-
<
|
|
26
|
+
<EmptyView description={t("no-retries-results")} />
|
|
26
27
|
)}
|
|
27
28
|
</div>
|
|
28
29
|
);
|
|
@@ -6,6 +6,7 @@ import type { FunctionComponent } from "preact";
|
|
|
6
6
|
import { useState } from "preact/hooks";
|
|
7
7
|
import { TrAttachmentInfo } from "@/components/TestResult/TrSteps/TrAttachmentInfo";
|
|
8
8
|
import * as styles from "@/components/TestResult/TrSteps/styles.scss";
|
|
9
|
+
import { useI18n } from "@/stores";
|
|
9
10
|
import { openModal } from "@/stores/modal";
|
|
10
11
|
|
|
11
12
|
const { lineImagesImage, lineFilesFileAttachment2, playwrightLogo } = allureIcons;
|
|
@@ -56,14 +57,15 @@ export const TrAttachment: FunctionComponent<{
|
|
|
56
57
|
className?: string;
|
|
57
58
|
}> = ({ item, stepIndex }) => {
|
|
58
59
|
const [isOpened, setIsOpen] = useState(false);
|
|
60
|
+
const { t: tAttachments } = useI18n("attachments");
|
|
59
61
|
const { link } = item;
|
|
60
62
|
const { missed } = link;
|
|
61
63
|
const componentType = attachmentType(link.contentType);
|
|
62
|
-
const isValidComponentType = !["archive", null].includes(componentType
|
|
64
|
+
const isValidComponentType = !["archive", null].includes(componentType);
|
|
63
65
|
|
|
64
66
|
const expandAttachment = (event: Event) => {
|
|
65
67
|
event.stopPropagation();
|
|
66
|
-
if (componentType
|
|
68
|
+
if (componentType !== "image") {
|
|
67
69
|
return;
|
|
68
70
|
}
|
|
69
71
|
openModal({
|
|
@@ -109,7 +111,7 @@ export const TrAttachment: FunctionComponent<{
|
|
|
109
111
|
{isOpened && isValidComponentType && (
|
|
110
112
|
<div className={styles["test-result-attachment-content-wrapper"]}>
|
|
111
113
|
<div className={styles["test-result-attachment-content"]} role={"button"} onClick={expandAttachment}>
|
|
112
|
-
<Attachment item={item} />
|
|
114
|
+
<Attachment item={item} i18n={{ imageDiff: (key: string) => tAttachments(`imageDiff.${key}`) }} />
|
|
113
115
|
</div>
|
|
114
116
|
</div>
|
|
115
117
|
)}
|
|
@@ -16,6 +16,7 @@ interface TrAttachmentInfo {
|
|
|
16
16
|
|
|
17
17
|
export const TrAttachmentInfo: FunctionalComponent<TrAttachmentInfo> = ({ item, shouldExpand }) => {
|
|
18
18
|
const { t: tooltip } = useI18n("controls");
|
|
19
|
+
const { t: tAttachments } = useI18n("attachments");
|
|
19
20
|
const { id, ext, contentType } = item.link;
|
|
20
21
|
const isPwTrace = contentType === "application/vnd.allure.playwright-trace";
|
|
21
22
|
const contentLength = item.link.missed === false ? item.link.contentLength : undefined;
|
|
@@ -30,7 +31,13 @@ export const TrAttachmentInfo: FunctionalComponent<TrAttachmentInfo> = ({ item,
|
|
|
30
31
|
event.stopPropagation();
|
|
31
32
|
openModal({
|
|
32
33
|
data: item,
|
|
33
|
-
component:
|
|
34
|
+
component: (
|
|
35
|
+
<Attachment
|
|
36
|
+
item={item}
|
|
37
|
+
previewable={true}
|
|
38
|
+
i18n={{ imageDiff: (key: string) => tAttachments(`imageDiff.${key}`) }}
|
|
39
|
+
/>
|
|
40
|
+
),
|
|
34
41
|
});
|
|
35
42
|
};
|
|
36
43
|
|
|
@@ -39,10 +46,10 @@ export const TrAttachmentInfo: FunctionalComponent<TrAttachmentInfo> = ({ item,
|
|
|
39
46
|
openModal({
|
|
40
47
|
isModalOpen: true,
|
|
41
48
|
data: item,
|
|
42
|
-
component: <Attachment item={item} />,
|
|
49
|
+
component: <Attachment item={item} i18n={{ imageDiff: (key: string) => tAttachments(`imageDiff.${key}`) }} />,
|
|
43
50
|
});
|
|
44
51
|
}
|
|
45
|
-
}, [item]);
|
|
52
|
+
}, [item, tAttachments]);
|
|
46
53
|
|
|
47
54
|
const downloadData = async (e: MouseEvent) => {
|
|
48
55
|
e.stopPropagation();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DefaultTestStepResult,
|
|
2
|
-
import { ArrowButton, Code,
|
|
1
|
+
import type { DefaultTestStepResult, TestStepResult } from "@allurereport/core-api";
|
|
2
|
+
import { ArrowButton, Code, Text, TreeItemIcon, allureIcons } from "@allurereport/web-components";
|
|
3
3
|
import type { FunctionComponent } from "preact";
|
|
4
4
|
import { useState } from "preact/hooks";
|
|
5
5
|
import { MetadataList } from "@/components/Metadata";
|
|
@@ -26,7 +26,7 @@ export const TrStepsContent = (props: { item: DefaultTestStepResult }) => {
|
|
|
26
26
|
return (
|
|
27
27
|
<div data-testid={"test-result-step-content"} className={styles["test-result-step-content"]}>
|
|
28
28
|
{Boolean(item?.parameters?.length) && <TrStepParameters parameters={item.parameters} />}
|
|
29
|
-
{Boolean(item?.message
|
|
29
|
+
{Boolean((item?.message || item?.trace) && !item?.hasSimilarErrorInSubSteps) && <TrError {...item} />}
|
|
30
30
|
{Boolean(item?.steps?.length) && (
|
|
31
31
|
<>
|
|
32
32
|
{item.steps?.map((subItem, key) => {
|
|
@@ -1,38 +1,22 @@
|
|
|
1
1
|
import { type ComponentChildren } from "preact";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { NavTab, NavTabs, NavTabsList } from "@/components/NavTabs";
|
|
3
|
+
import { navigateToTestResultTab } from "@/stores/router";
|
|
4
|
+
import { currentTrId, trCurrentTab } from "@/stores/testResult";
|
|
5
5
|
|
|
6
6
|
export const TrTabs = NavTabs;
|
|
7
7
|
export const TrTabsList = NavTabsList;
|
|
8
|
-
export const useTestResultTabsContext = useNavTabsContext;
|
|
9
8
|
|
|
10
9
|
export const TrTab = (props: { id: string; children: ComponentChildren }) => {
|
|
11
|
-
const { testResultId } = route.value.params;
|
|
12
|
-
const { currentTab, setCurrentTab } = useNavTabsContext();
|
|
13
10
|
const { id, children } = props;
|
|
14
|
-
const
|
|
11
|
+
const isCurrentTab = trCurrentTab.value === id;
|
|
12
|
+
|
|
15
13
|
const handleTabClick = () => {
|
|
16
|
-
const isCurrentTab = isActiveFromUrl ? isActiveFromUrl : currentTab === id;
|
|
17
14
|
if (isCurrentTab) {
|
|
18
15
|
return;
|
|
19
16
|
}
|
|
20
|
-
setCurrentTab(id);
|
|
21
|
-
navigateTo({
|
|
22
|
-
...route.value,
|
|
23
|
-
params: {
|
|
24
|
-
testResultId,
|
|
25
|
-
subTab: id || null,
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
const isCurrentTab = isActiveFromUrl ? isActiveFromUrl : currentTab === id;
|
|
30
17
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
setCurrentTab(id);
|
|
34
|
-
}
|
|
35
|
-
}, [activeSubTab.value, id, setCurrentTab]);
|
|
18
|
+
navigateToTestResultTab({ testResultId: currentTrId.value, tab: id });
|
|
19
|
+
};
|
|
36
20
|
|
|
37
21
|
return (
|
|
38
22
|
<NavTab id={id} onClick={handleTabClick} data-testid={`test-result-tab-${id}`} isCurrentTab={isCurrentTab}>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { computed } from "@preact/signals";
|
|
1
2
|
import clsx from "clsx";
|
|
2
3
|
import type { FunctionComponent, FunctionalComponent } from "preact";
|
|
3
4
|
import { useEffect } from "preact/hooks";
|
|
@@ -9,9 +10,10 @@ import TrHistoryView from "@/components/TestResult/TrHistory";
|
|
|
9
10
|
import { TrInfo } from "@/components/TestResult/TrInfo";
|
|
10
11
|
import { TrOverview } from "@/components/TestResult/TrOverview";
|
|
11
12
|
import { TrRetriesView } from "@/components/TestResult/TrRetriesView";
|
|
12
|
-
import { TrTabs
|
|
13
|
+
import { TrTabs } from "@/components/TestResult/TrTabs";
|
|
13
14
|
import { fetchTestEnvGroup } from "@/stores/env";
|
|
14
15
|
import { isSplitMode } from "@/stores/layout";
|
|
16
|
+
import { trCurrentTab } from "@/stores/testResult";
|
|
15
17
|
import * as styles from "./styles.scss";
|
|
16
18
|
|
|
17
19
|
export type TrViewProps = {
|
|
@@ -26,8 +28,7 @@ export type TrProps = {
|
|
|
26
28
|
testResult?: AwesomeTestResult;
|
|
27
29
|
};
|
|
28
30
|
|
|
29
|
-
const
|
|
30
|
-
const { currentTab } = useTestResultTabsContext();
|
|
31
|
+
const view = computed(() => {
|
|
31
32
|
const viewMap: Record<string, any> = {
|
|
32
33
|
overview: TrOverview,
|
|
33
34
|
history: TrHistoryView,
|
|
@@ -35,7 +36,11 @@ const TrView: FunctionalComponent<TrViewProps> = ({ testResult }) => {
|
|
|
35
36
|
retries: TrRetriesView,
|
|
36
37
|
environments: TrEnvironmentsView,
|
|
37
38
|
};
|
|
38
|
-
|
|
39
|
+
return viewMap[trCurrentTab.value];
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
const TrView: FunctionalComponent<TrViewProps> = ({ testResult }) => {
|
|
43
|
+
const ViewComponent = view.value;
|
|
39
44
|
|
|
40
45
|
return <ViewComponent testResult={testResult} />;
|
|
41
46
|
};
|
|
@@ -1,34 +1,31 @@
|
|
|
1
1
|
import { Button, Loadable, PageLoader, Text, Tree, TreeStatusBar } from "@allurereport/web-components";
|
|
2
2
|
import { useMemo } from "preact/hooks";
|
|
3
|
-
import type { AwesomeStatus } from "types";
|
|
4
3
|
import { MetadataButton } from "@/components/MetadataButton";
|
|
5
|
-
import { useTabsContext } from "@/components/Tabs";
|
|
6
4
|
import { reportStatsStore, statsByEnvStore } from "@/stores";
|
|
7
5
|
import { collapsedEnvironments, currentEnvironment, environmentsStore } from "@/stores/env";
|
|
8
6
|
import { useI18n } from "@/stores/locale";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
filteredTree,
|
|
14
|
-
noTests,
|
|
15
|
-
noTestsFound,
|
|
16
|
-
toggleTree,
|
|
17
|
-
treeStore,
|
|
18
|
-
} from "@/stores/tree";
|
|
7
|
+
import { navigateToTestResult } from "@/stores/router";
|
|
8
|
+
import { currentTrId } from "@/stores/testResult";
|
|
9
|
+
import { collapsedTrees, filteredTree, noTests, noTestsFound, toggleTree, treeStore } from "@/stores/tree";
|
|
10
|
+
import { clearTreeFilters, treeStatus } from "@/stores/treeFilters/store";
|
|
19
11
|
import { createTreeLocalizer } from "@/utils/tree";
|
|
20
12
|
import * as styles from "./styles.scss";
|
|
21
13
|
|
|
14
|
+
const treeNavigateTo = (id: string) => {
|
|
15
|
+
navigateToTestResult({ testResultId: id });
|
|
16
|
+
};
|
|
17
|
+
|
|
22
18
|
export const TreeList = () => {
|
|
23
19
|
const { t } = useI18n("empty");
|
|
24
20
|
const { t: tEnvironments } = useI18n("environments");
|
|
25
21
|
const { t: tooltip } = useI18n("transitions");
|
|
26
|
-
const
|
|
27
|
-
|
|
22
|
+
const trId = currentTrId.value;
|
|
23
|
+
|
|
24
|
+
const currentTreeStatus = treeStatus.value;
|
|
28
25
|
|
|
29
26
|
const localizers = useMemo(
|
|
30
27
|
() => ({
|
|
31
|
-
tooltip: (key: string) =>
|
|
28
|
+
tooltip: (key: string, options: Record<string, string>) => tooltip(`description.${key}`, options),
|
|
32
29
|
}),
|
|
33
30
|
[tooltip],
|
|
34
31
|
);
|
|
@@ -80,10 +77,10 @@ export const TreeList = () => {
|
|
|
80
77
|
statistic={statsByEnvStore.value.data[currentEnvironment.value]}
|
|
81
78
|
collapsedTrees={collapsedTrees.value}
|
|
82
79
|
toggleTree={toggleTree}
|
|
83
|
-
navigateTo={
|
|
80
|
+
navigateTo={treeNavigateTo}
|
|
84
81
|
tree={treeLocalizer(filteredTree.value.default)}
|
|
85
|
-
statusFilter={
|
|
86
|
-
routeId={
|
|
82
|
+
statusFilter={currentTreeStatus}
|
|
83
|
+
routeId={trId}
|
|
87
84
|
root
|
|
88
85
|
/>
|
|
89
86
|
</div>
|
|
@@ -100,10 +97,10 @@ export const TreeList = () => {
|
|
|
100
97
|
statistic={statsByEnvStore.value.data[currentEnvironment.value]}
|
|
101
98
|
collapsedTrees={collapsedTrees.value}
|
|
102
99
|
toggleTree={toggleTree}
|
|
103
|
-
navigateTo={
|
|
100
|
+
navigateTo={treeNavigateTo}
|
|
104
101
|
tree={treeLocalizer(currentTree)}
|
|
105
|
-
statusFilter={
|
|
106
|
-
routeId={
|
|
102
|
+
statusFilter={currentTreeStatus}
|
|
103
|
+
routeId={trId}
|
|
107
104
|
root
|
|
108
105
|
/>
|
|
109
106
|
</div>
|
|
@@ -141,7 +138,7 @@ export const TreeList = () => {
|
|
|
141
138
|
<TreeStatusBar
|
|
142
139
|
statistic={stats}
|
|
143
140
|
reportStatistic={reportStatsStore.value.data}
|
|
144
|
-
statusFilter={
|
|
141
|
+
statusFilter={currentTreeStatus}
|
|
145
142
|
/>
|
|
146
143
|
</div>
|
|
147
144
|
{isOpened && (
|
|
@@ -151,10 +148,10 @@ export const TreeList = () => {
|
|
|
151
148
|
reportStatistic={reportStatsStore.value.data}
|
|
152
149
|
collapsedTrees={collapsedTrees.value}
|
|
153
150
|
toggleTree={toggleTree}
|
|
154
|
-
statusFilter={
|
|
155
|
-
navigateTo={
|
|
151
|
+
statusFilter={currentTreeStatus}
|
|
152
|
+
navigateTo={treeNavigateTo}
|
|
156
153
|
tree={treeLocalizer(value)}
|
|
157
|
-
routeId={
|
|
154
|
+
routeId={trId}
|
|
158
155
|
root
|
|
159
156
|
/>
|
|
160
157
|
</div>
|
package/src/index.html
CHANGED
|
@@ -4,33 +4,18 @@
|
|
|
4
4
|
<title>Allure Awesome</title>
|
|
5
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" />
|
|
6
6
|
<base href="http://localhost:8080" />
|
|
7
|
-
</head>
|
|
8
|
-
<body>
|
|
9
|
-
<div id="app"></div>
|
|
10
|
-
<script>
|
|
11
|
-
window.allure = window.allure || {};
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<script>
|
|
15
|
-
const { origin, pathname } = window.location;
|
|
16
|
-
const url = new URL(pathname, origin);
|
|
17
|
-
const baseEl = document.createElement("base");
|
|
18
|
-
|
|
19
|
-
baseEl.href = url.toString();
|
|
20
|
-
|
|
21
|
-
window.document.head.appendChild(baseEl);
|
|
22
|
-
</script>
|
|
23
7
|
<script>
|
|
24
8
|
window.allureReportOptions = {
|
|
25
9
|
"reportName": "Allure Report",
|
|
26
10
|
"logo": "",
|
|
27
|
-
"theme": "
|
|
11
|
+
"theme": "auto",
|
|
28
12
|
"reportLanguage": "en",
|
|
29
13
|
"createdAt": 1739819870336,
|
|
30
14
|
"reportUuid": "51b36daf-614b-409c-b6a1-e8e401b2c144",
|
|
31
15
|
"groupBy": ["parentSuite", "suite", "subSuite"],
|
|
32
16
|
"layout": "split",
|
|
33
|
-
"allureVersion": "3.0.
|
|
17
|
+
"allureVersion": "3.0.1-develop",
|
|
18
|
+
"sections": ["charts", "timeline"],
|
|
34
19
|
"ci": {
|
|
35
20
|
"type": "github",
|
|
36
21
|
"detected": true,
|
|
@@ -46,6 +31,22 @@
|
|
|
46
31
|
}
|
|
47
32
|
};
|
|
48
33
|
</script>
|
|
34
|
+
</head>
|
|
35
|
+
<body>
|
|
36
|
+
<div id="app"></div>
|
|
37
|
+
<script>
|
|
38
|
+
window.allure = window.allure || {};
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<script>
|
|
42
|
+
const { origin, pathname } = window.location;
|
|
43
|
+
const url = new URL(pathname, origin);
|
|
44
|
+
const baseEl = document.createElement("base");
|
|
45
|
+
|
|
46
|
+
baseEl.href = url.toString();
|
|
47
|
+
|
|
48
|
+
window.document.head.appendChild(baseEl);
|
|
49
|
+
</script>
|
|
49
50
|
<script async>
|
|
50
51
|
window.allureReportDataReady = true;
|
|
51
52
|
</script>
|
package/src/index.tsx
CHANGED
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
import { ensureReportDataReady } from "@allurereport/web-commons";
|
|
2
2
|
import { Spinner, SvgIcon, allureIcons } from "@allurereport/web-components";
|
|
3
3
|
import "@allurereport/web-components/index.css";
|
|
4
|
+
import { computed, useSignalEffect } from "@preact/signals";
|
|
4
5
|
import clsx from "clsx";
|
|
5
6
|
import { render } from "preact";
|
|
6
|
-
import "preact/debug";
|
|
7
7
|
import { useEffect, useState } from "preact/hooks";
|
|
8
8
|
import "@/assets/scss/index.scss";
|
|
9
9
|
import { Footer } from "@/components/Footer";
|
|
10
10
|
import { Header } from "@/components/Header";
|
|
11
11
|
import { ModalComponent } from "@/components/Modal";
|
|
12
12
|
import { SectionSwitcher } from "@/components/SectionSwitcher";
|
|
13
|
-
import { fetchEnvStats, fetchReportStats, getLocale,
|
|
13
|
+
import { fetchEnvStats, fetchReportStats, getLocale, waitForI18next } from "@/stores";
|
|
14
14
|
import { fetchPieChartData } from "@/stores/chart";
|
|
15
15
|
import { currentEnvironment, environmentsStore, fetchEnvironments } from "@/stores/env";
|
|
16
16
|
import { fetchEnvInfo } from "@/stores/envInfo";
|
|
17
17
|
import { fetchGlobals } from "@/stores/globals";
|
|
18
|
-
import {
|
|
19
|
-
import { handleHashChange, route } from "@/stores/router";
|
|
20
|
-
import { currentSection, getSection } from "@/stores/sections";
|
|
18
|
+
import { isLayoutLoading, layoutStore } from "@/stores/layout";
|
|
21
19
|
import { fetchTestResult, fetchTestResultNav } from "@/stores/testResults";
|
|
22
20
|
import { fetchEnvTreesData } from "@/stores/tree";
|
|
23
21
|
import { isMac } from "@/utils/isMac";
|
|
24
22
|
import { fetchQualityGateResults } from "./stores/qualityGate";
|
|
23
|
+
import { testResultRoute } from "./stores/router";
|
|
24
|
+
import { currentSection } from "./stores/sections";
|
|
25
|
+
import { currentTrId } from "./stores/testResult";
|
|
26
|
+
import { fetchTreeFiltersData } from "./stores/treeFilters/actions";
|
|
27
|
+
import { migrateFilterParam } from "./stores/treeFilters/utils";
|
|
25
28
|
import * as styles from "./styles.scss";
|
|
26
29
|
|
|
27
30
|
const Loader = () => {
|
|
@@ -33,10 +36,12 @@ const Loader = () => {
|
|
|
33
36
|
);
|
|
34
37
|
};
|
|
35
38
|
|
|
39
|
+
const isTestResultRoute = computed(() => testResultRoute.value.matches);
|
|
40
|
+
|
|
36
41
|
const App = () => {
|
|
37
|
-
const className = styles[`layout-${currentSection.value !== "" ? currentSection.value : layoutStore.value}`];
|
|
42
|
+
const className = styles[`layout-${currentSection.value !== "default" ? currentSection.value : layoutStore.value}`];
|
|
38
43
|
const [prefetched, setPrefetched] = useState(false);
|
|
39
|
-
|
|
44
|
+
|
|
40
45
|
const prefetchData = async () => {
|
|
41
46
|
const fns = [
|
|
42
47
|
ensureReportDataReady,
|
|
@@ -49,12 +54,7 @@ const App = () => {
|
|
|
49
54
|
];
|
|
50
55
|
|
|
51
56
|
if (globalThis) {
|
|
52
|
-
fns.unshift(
|
|
53
|
-
getSection as () => Promise<void>,
|
|
54
|
-
getLocale,
|
|
55
|
-
getLayout as () => Promise<void>,
|
|
56
|
-
getTheme as () => Promise<void>,
|
|
57
|
-
);
|
|
57
|
+
fns.unshift(getLocale);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
await waitForI18next;
|
|
@@ -75,22 +75,16 @@ const App = () => {
|
|
|
75
75
|
prefetchData();
|
|
76
76
|
}, [currentEnvironment.value]);
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
useSignalEffect(() => {
|
|
79
|
+
const testResultId = currentTrId.value;
|
|
80
|
+
if (isTestResultRoute.value && testResultId) {
|
|
80
81
|
fetchTestResult(testResultId);
|
|
81
82
|
fetchTestResultNav(currentEnvironment.value);
|
|
82
83
|
}
|
|
83
|
-
}
|
|
84
|
+
});
|
|
84
85
|
|
|
85
86
|
useEffect(() => {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
handleHashChange();
|
|
89
|
-
globalThis.addEventListener("hashchange", onHashChange);
|
|
90
|
-
|
|
91
|
-
return () => {
|
|
92
|
-
globalThis.removeEventListener("hashchange", onHashChange);
|
|
93
|
-
};
|
|
87
|
+
fetchTreeFiltersData();
|
|
94
88
|
}, []);
|
|
95
89
|
|
|
96
90
|
return (
|
|
@@ -108,10 +102,6 @@ const App = () => {
|
|
|
108
102
|
);
|
|
109
103
|
};
|
|
110
104
|
|
|
111
|
-
export const openInNewTab = (path: string) => {
|
|
112
|
-
window.open(`#${path}`, "_blank");
|
|
113
|
-
};
|
|
114
|
-
|
|
115
105
|
const rootElement = document.getElementById("app");
|
|
116
106
|
|
|
117
107
|
document.addEventListener("DOMContentLoaded", () => {
|
|
@@ -120,4 +110,6 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
120
110
|
}
|
|
121
111
|
});
|
|
122
112
|
|
|
113
|
+
migrateFilterParam();
|
|
114
|
+
|
|
123
115
|
render(<App />, rootElement);
|