@allurereport/web-awesome 3.0.0-beta.12 → 3.0.0-beta.14
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-52d1decd.js → 173.app-1829fb8f.js} +1 -1
- package/dist/multi/174.app-1829fb8f.js +1 -0
- package/dist/multi/252.app-1829fb8f.js +1 -0
- package/dist/multi/{282.app-52d1decd.js → 282.app-1829fb8f.js} +1 -1
- package/dist/multi/29.app-1829fb8f.js +1 -0
- package/dist/multi/416.app-1829fb8f.js +1 -0
- package/dist/multi/527.app-1829fb8f.js +1 -0
- package/dist/multi/{600.app-52d1decd.js → 600.app-1829fb8f.js} +1 -1
- package/dist/multi/605.app-1829fb8f.js +1 -0
- package/dist/multi/{638.app-52d1decd.js → 638.app-1829fb8f.js} +1 -1
- package/dist/multi/672.app-1829fb8f.js +1 -0
- package/dist/multi/{686.app-52d1decd.js → 686.app-1829fb8f.js} +1 -1
- package/dist/multi/725.app-1829fb8f.js +1 -0
- package/dist/multi/{741.app-52d1decd.js → 741.app-1829fb8f.js} +1 -1
- package/dist/multi/755.app-1829fb8f.js +1 -0
- package/dist/multi/{894.app-52d1decd.js → 894.app-1829fb8f.js} +1 -1
- package/dist/multi/943.app-1829fb8f.js +1 -0
- package/dist/multi/980.app-1829fb8f.js +1 -0
- package/dist/multi/app-1829fb8f.js +2 -0
- package/dist/multi/manifest.json +20 -20
- package/dist/multi/{styles-52d1decd.css → styles-1829fb8f.css} +13 -11
- package/dist/single/app-3a6e31c7.js +2 -0
- package/dist/single/manifest.json +1 -1
- package/package.json +4 -4
- package/src/components/BaseLayout/index.tsx +1 -4
- package/src/components/BaseLayout/styles.scss +4 -2
- package/src/components/Charts/index.tsx +89 -0
- package/src/components/Charts/styles.scss +29 -0
- package/src/components/Footer/index.tsx +6 -2
- package/src/components/Header/index.tsx +5 -2
- package/src/components/Header/styles.scss +2 -0
- package/src/components/MainReport/index.tsx +0 -2
- package/src/components/MetadataButton/index.tsx +2 -2
- package/src/components/Report/index.tsx +7 -0
- package/src/components/ReportBody/Filters.tsx +2 -2
- package/src/components/ReportBody/index.tsx +24 -13
- package/src/components/ReportBody/styles.scss +1 -0
- package/src/components/ReportHeader/index.tsx +3 -0
- package/src/components/ReportMetadata/MetadataWithIcon.tsx +1 -1
- package/src/components/SectionPicker/index.tsx +54 -0
- package/src/components/SectionPicker/styles.scss +5 -0
- package/src/components/SectionSwitcher/index.tsx +14 -0
- package/src/components/SectionSwitcher/styles.scss +4 -0
- package/src/components/SectionTabs/index.tsx +0 -0
- package/src/components/SideBySide/styles.scss +1 -1
- package/src/components/SplitLayout/index.tsx +1 -3
- package/src/components/SplitLayout/styles.scss +1 -3
- package/src/components/TestResult/TrDropdown/index.tsx +1 -2
- package/src/components/TestResult/TrEnvironmentItem/index.tsx +3 -3
- package/src/components/TestResult/TrEnvironmentsView/index.tsx +2 -2
- package/src/components/TestResult/TrHistory/TrHistoryItem.tsx +1 -2
- package/src/components/TestResult/TrInfo/index.tsx +16 -12
- package/src/components/TestResult/TrPwTraces/PwTraceButton.tsx +0 -1
- package/src/components/TestResult/TrRetriesView/TrRetriesItem.tsx +5 -4
- package/src/components/TestResult/TrSteps/TrAttachment.tsx +33 -6
- package/src/components/TestResult/TrSteps/TrStep.tsx +7 -5
- package/src/components/TestResult/TrSteps/styles.scss +4 -6
- package/src/components/TestResult/TrTabs/index.tsx +18 -6
- package/src/components/TestResult/TrTabs/styles.scss +0 -3
- package/src/components/TestResult/index.tsx +0 -1
- package/src/components/Tree/index.tsx +6 -6
- package/src/components/Tree/styles.scss +0 -4
- package/src/index.tsx +26 -12
- package/src/locales/az.json +16 -0
- package/src/locales/de.json +17 -0
- package/src/locales/en.json +17 -1
- package/src/locales/es.json +17 -1
- package/src/locales/fr.json +17 -1
- package/src/locales/he.json +16 -0
- package/src/locales/hy.json +16 -0
- package/src/locales/it.json +17 -1
- package/src/locales/ja.json +17 -1
- package/src/locales/ka.json +16 -0
- package/src/locales/kr.json +17 -1
- package/src/locales/nl.json +17 -1
- package/src/locales/pl.json +17 -1
- package/src/locales/pt.json +16 -0
- package/src/locales/ru.json +16 -0
- package/src/locales/sv.json +17 -1
- package/src/locales/tr.json +17 -1
- package/src/locales/zh.json +17 -1
- package/src/stores/chart.ts +32 -0
- package/src/stores/locale.ts +2 -0
- package/src/stores/router.ts +76 -16
- package/src/stores/sections.ts +63 -0
- package/src/stores/tree.ts +9 -6
- package/src/styles.scss +21 -0
- package/src/utils/charts.ts +169 -0
- package/src/utils/time.ts +1 -0
- package/types.d.ts +3 -1
- package/dist/multi/174.app-52d1decd.js +0 -1
- package/dist/multi/252.app-52d1decd.js +0 -1
- package/dist/multi/29.app-52d1decd.js +0 -1
- package/dist/multi/416.app-52d1decd.js +0 -1
- package/dist/multi/527.app-52d1decd.js +0 -1
- package/dist/multi/605.app-52d1decd.js +0 -1
- package/dist/multi/672.app-52d1decd.js +0 -1
- package/dist/multi/725.app-52d1decd.js +0 -1
- package/dist/multi/755.app-52d1decd.js +0 -1
- package/dist/multi/943.app-52d1decd.js +0 -1
- package/dist/multi/980.app-52d1decd.js +0 -1
- package/dist/multi/app-52d1decd.js +0 -2
- package/dist/single/app-83b0c4fc.js +0 -2
- package/src/components/ArrowButton/index.tsx +0 -36
- package/src/components/ArrowButton/styles.scss +0 -35
- /package/dist/multi/{app-52d1decd.js.LICENSE.txt → app-1829fb8f.js.LICENSE.txt} +0 -0
- /package/dist/single/{app-83b0c4fc.js.LICENSE.txt → app-3a6e31c7.js.LICENSE.txt} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type TestEnvGroup, getRealEnvsCount } from "@allurereport/core-api";
|
|
2
2
|
import { formatDuration } from "@allurereport/core-api";
|
|
3
3
|
import { Counter, Heading, Loadable, Text, TooltipWrapper } from "@allurereport/web-components";
|
|
4
4
|
import clsx from "clsx";
|
|
@@ -50,19 +50,19 @@ export const TrInfo: FunctionalComponent<TrInfoProps> = ({ testResult }) => {
|
|
|
50
50
|
<div className={styles["test-result-tabs"]}>
|
|
51
51
|
<TrTabsList>
|
|
52
52
|
<TrTab id="overview">{t("overview")}</TrTab>
|
|
53
|
-
<TrTab id="history"
|
|
53
|
+
<TrTab id="history">
|
|
54
54
|
<div className={styles["test-result-tab"]}>
|
|
55
55
|
{t("history")}
|
|
56
56
|
{Boolean(history?.length) && <Counter size={"s"} count={history?.length} />}
|
|
57
57
|
</div>
|
|
58
58
|
</TrTab>
|
|
59
|
-
<TrTab id="retries"
|
|
59
|
+
<TrTab id="retries">
|
|
60
60
|
<div className={styles["test-result-tab"]}>
|
|
61
61
|
{t("retries")}
|
|
62
62
|
{Boolean(retries?.length) && <Counter size={"s"} count={retries?.length} />}
|
|
63
63
|
</div>
|
|
64
64
|
</TrTab>
|
|
65
|
-
<TrTab id="attachments"
|
|
65
|
+
<TrTab id="attachments">
|
|
66
66
|
<div className={styles["test-result-tab"]}>
|
|
67
67
|
{t("attachments")}
|
|
68
68
|
{Boolean(attachments?.length) && <Counter size={"s"} count={attachments?.length} />}
|
|
@@ -71,14 +71,18 @@ export const TrInfo: FunctionalComponent<TrInfoProps> = ({ testResult }) => {
|
|
|
71
71
|
<Loadable<Record<string, TestEnvGroup>, TestEnvGroup | undefined>
|
|
72
72
|
source={testEnvGroupsStore}
|
|
73
73
|
transformData={(groups) => groups[testResult.testCase.id]}
|
|
74
|
-
renderData={(group) =>
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
74
|
+
renderData={(group) => {
|
|
75
|
+
const envsCount = getRealEnvsCount(group);
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<TrTab id="environments">
|
|
79
|
+
<div className={styles["test-result-tab"]}>
|
|
80
|
+
{t("environments")}
|
|
81
|
+
{!!envsCount && <Counter size={"s"} count={envsCount} />}
|
|
82
|
+
</div>
|
|
83
|
+
</TrTab>
|
|
84
|
+
);
|
|
85
|
+
}}
|
|
82
86
|
/>
|
|
83
87
|
</TrTabsList>
|
|
84
88
|
</div>
|
|
@@ -5,7 +5,6 @@ import { IconButton, TooltipWrapper, allureIcons } from "@allurereport/web-compo
|
|
|
5
5
|
import { PwTrace } from "@/components/TestResult/TrPwTraces/PwTrace";
|
|
6
6
|
import { useI18n } from "@/stores";
|
|
7
7
|
import { openModal } from "@/stores/modal";
|
|
8
|
-
import * as styles from "./styles.scss";
|
|
9
8
|
|
|
10
9
|
export const fetchFromUrl = async ({ id, ext, contentType }: Attachments) => {
|
|
11
10
|
const fileName = `${id || "-"}${ext || ""}`;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { formatDuration } from "@allurereport/core-api";
|
|
2
|
-
import { IconButton, Text, TreeItemIcon, allureIcons } from "@allurereport/web-components";
|
|
2
|
+
import { ArrowButton, IconButton, Text, TreeItemIcon, allureIcons } from "@allurereport/web-components";
|
|
3
3
|
import type { FunctionalComponent } from "preact";
|
|
4
4
|
import { useState } from "preact/hooks";
|
|
5
5
|
import type { AwesomeTestResult } from "types";
|
|
6
|
-
import { ArrowButton } from "@/components/ArrowButton";
|
|
7
6
|
import { TrError } from "@/components/TestResult/TrError";
|
|
8
7
|
import * as styles from "@/components/TestResult/TrRetriesView/styles.scss";
|
|
9
8
|
import { navigateTo } from "@/stores/router";
|
|
@@ -21,7 +20,9 @@ export const TrRetriesItem: FunctionalComponent<{
|
|
|
21
20
|
return (
|
|
22
21
|
<div>
|
|
23
22
|
<div className={styles["test-result-retries-item-header"]} onClick={() => setIsOpen(!isOpened)}>
|
|
24
|
-
{Boolean(error) &&
|
|
23
|
+
{Boolean(error.trace || error.message) && (
|
|
24
|
+
<ArrowButton isOpened={isOpened} icon={allureIcons.lineArrowsChevronDown} />
|
|
25
|
+
)}
|
|
25
26
|
<div className={styles["test-result-retries-item-wrap"]}>
|
|
26
27
|
<TreeItemIcon status={status} className={styles["test-result-retries-item-status"]} />
|
|
27
28
|
<Text className={styles["test-result-retries-item-text"]}>{convertedStop}</Text>
|
|
@@ -41,7 +42,7 @@ export const TrRetriesItem: FunctionalComponent<{
|
|
|
41
42
|
</div>
|
|
42
43
|
</div>
|
|
43
44
|
</div>
|
|
44
|
-
{isOpened && error && (
|
|
45
|
+
{isOpened && (error.message || error.trace) && (
|
|
45
46
|
<div className={styles["test-result-retries-item-content"]}>
|
|
46
47
|
<TrError {...error} status={status} />
|
|
47
48
|
</div>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { AttachmentTestStepResult } from "@allurereport/core-api";
|
|
2
2
|
import { attachmentType } from "@allurereport/web-commons";
|
|
3
|
-
import { Attachment, Code, SvgIcon, Text, allureIcons } from "@allurereport/web-components";
|
|
3
|
+
import { ArrowButton, Attachment, Code, SvgIcon, Text, allureIcons } from "@allurereport/web-components";
|
|
4
4
|
import type { FunctionComponent } from "preact";
|
|
5
|
+
import cx from "clsx";
|
|
5
6
|
import { useState } from "preact/hooks";
|
|
6
|
-
import { ArrowButton } from "@/components/ArrowButton";
|
|
7
|
-
import { PwTraceButton } from "@/components/TestResult/TrPwTraces/PwTraceButton";
|
|
8
7
|
import { TrAttachmentInfo } from "@/components/TestResult/TrSteps/TrAttachmentInfo";
|
|
9
8
|
import * as styles from "@/components/TestResult/TrSteps/styles.scss";
|
|
10
9
|
|
|
@@ -15,6 +14,27 @@ const iconMap: Record<string, string> = {
|
|
|
15
14
|
"application/xml": lineFilesFileAttachment2,
|
|
16
15
|
"text/html": lineFilesFileAttachment2,
|
|
17
16
|
"text/csv": lineFilesFileAttachment2,
|
|
17
|
+
"text/markdown": lineFilesFileAttachment2,
|
|
18
|
+
"text/javascript": lineFilesFileAttachment2,
|
|
19
|
+
"text/typescript": lineFilesFileAttachment2,
|
|
20
|
+
"text/ruby": lineFilesFileAttachment2,
|
|
21
|
+
"text/python": lineFilesFileAttachment2,
|
|
22
|
+
"text/php": lineFilesFileAttachment2,
|
|
23
|
+
"text/java": lineFilesFileAttachment2,
|
|
24
|
+
"text/csharp": lineFilesFileAttachment2,
|
|
25
|
+
"text/cpp": lineFilesFileAttachment2,
|
|
26
|
+
"text/c": lineFilesFileAttachment2,
|
|
27
|
+
"text/go": lineFilesFileAttachment2,
|
|
28
|
+
"text/rust": lineFilesFileAttachment2,
|
|
29
|
+
"text/swift": lineFilesFileAttachment2,
|
|
30
|
+
"text/kotlin": lineFilesFileAttachment2,
|
|
31
|
+
"text/scala": lineFilesFileAttachment2,
|
|
32
|
+
"text/perl": lineFilesFileAttachment2,
|
|
33
|
+
"text/r": lineFilesFileAttachment2,
|
|
34
|
+
"text/dart": lineFilesFileAttachment2,
|
|
35
|
+
"text/lua": lineFilesFileAttachment2,
|
|
36
|
+
"text/haskell": lineFilesFileAttachment2,
|
|
37
|
+
"text/sql": lineFilesFileAttachment2,
|
|
18
38
|
"text/tab-separated-values": lineFilesFileAttachment2,
|
|
19
39
|
"text/css": lineFilesFileAttachment2,
|
|
20
40
|
"text/uri-list": lineFilesFileAttachment2,
|
|
@@ -41,9 +61,12 @@ export const TrAttachment: FunctionComponent<{
|
|
|
41
61
|
const isValidComponentType = !["archive", null].includes(componentType.type as string);
|
|
42
62
|
|
|
43
63
|
return (
|
|
44
|
-
<div className={styles["test-result-step"]}>
|
|
64
|
+
<div data-testid={"test-result-attachment"} className={styles["test-result-step"]}>
|
|
45
65
|
<div
|
|
46
|
-
|
|
66
|
+
data-testid={"test-result-attachment-header"}
|
|
67
|
+
className={cx(styles["test-result-attachment-header"], {
|
|
68
|
+
[styles.empty]: !isValidComponentType,
|
|
69
|
+
})}
|
|
47
70
|
onClick={(e) => {
|
|
48
71
|
e.stopPropagation();
|
|
49
72
|
setIsOpen((prev) => !prev);
|
|
@@ -59,7 +82,11 @@ export const TrAttachment: FunctionComponent<{
|
|
|
59
82
|
</Code>
|
|
60
83
|
<Text className={styles["test-result-attachment-text"]}>{link.name || link.originalFileName}</Text>
|
|
61
84
|
{missed && (
|
|
62
|
-
<Text
|
|
85
|
+
<Text
|
|
86
|
+
size={"s"}
|
|
87
|
+
className={styles["test-result-attachment-missed"]}
|
|
88
|
+
data-testid={"test-result-attachment-missed"}
|
|
89
|
+
>
|
|
63
90
|
missed
|
|
64
91
|
</Text>
|
|
65
92
|
)}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { DefaultTestStepResult, TestStepResult } from "@allurereport/core-api";
|
|
2
|
-
import { Code, Text, TreeItemIcon, allureIcons } from "@allurereport/web-components";
|
|
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
|
-
import { ArrowButton } from "@/components/ArrowButton";
|
|
6
5
|
import { MetadataList } from "@/components/Metadata";
|
|
7
6
|
import { type MetadataItem } from "@/components/ReportMetadata";
|
|
8
7
|
import { TrError } from "@/components/TestResult/TrError";
|
|
@@ -24,7 +23,7 @@ export const TrStepsContent = (props: { item: DefaultTestStepResult }) => {
|
|
|
24
23
|
const { item } = props;
|
|
25
24
|
|
|
26
25
|
return (
|
|
27
|
-
<div className={styles["test-result-step-content"]}>
|
|
26
|
+
<div data-testid={"test-result-step-content"} className={styles["test-result-step-content"]}>
|
|
28
27
|
{Boolean(item?.parameters?.length) && <TrStepParameters parameters={item.parameters} />}
|
|
29
28
|
{Boolean(item?.message && item?.trace) && <TrError {...item} />}
|
|
30
29
|
{Boolean(item?.steps?.length) && (
|
|
@@ -70,7 +69,7 @@ export const TrStep: FunctionComponent<{
|
|
|
70
69
|
};
|
|
71
70
|
|
|
72
71
|
return (
|
|
73
|
-
<div className={styles["test-result-step"]}>
|
|
72
|
+
<div data-testid={"test-result-step"} className={styles["test-result-step"]}>
|
|
74
73
|
<div className={styles["test-result-step-header"]} onClick={handleClick}>
|
|
75
74
|
{!hasContent ? (
|
|
76
75
|
<div className={styles["test-result-strut"]} />
|
|
@@ -80,13 +79,16 @@ export const TrStep: FunctionComponent<{
|
|
|
80
79
|
icon={allureIcons.arrowsChevronDown}
|
|
81
80
|
iconSize={"xs"}
|
|
82
81
|
className={!hasContent ? styles["test-result-visibility-hidden"] : ""}
|
|
82
|
+
data-testid={"test-result-step-arrow-button"}
|
|
83
83
|
/>
|
|
84
84
|
)}
|
|
85
85
|
<TreeItemIcon status={item.status} />
|
|
86
86
|
<Code size={"s"} className={styles["test-result-step-number"]}>
|
|
87
87
|
{stepIndex}
|
|
88
88
|
</Code>
|
|
89
|
-
<Text className={styles["test-result-header-text"]}>
|
|
89
|
+
<Text data-testid={"test-result-step-title"} className={styles["test-result-header-text"]}>
|
|
90
|
+
{item.name}
|
|
91
|
+
</Text>
|
|
90
92
|
<TrStepInfo item={item} />
|
|
91
93
|
</div>
|
|
92
94
|
{hasContent && isOpened && <TrStepsContent item={item} />}
|
|
@@ -23,16 +23,12 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.test-result-attachment-content {
|
|
26
|
-
max-height: 450px;
|
|
27
|
-
overflow-y: auto;
|
|
28
26
|
border-top: 1px solid var(--on-border-muted);
|
|
29
27
|
}
|
|
30
28
|
|
|
31
29
|
.test-result-attachment-content-wrapper {
|
|
32
30
|
padding-left: 16px;
|
|
33
31
|
margin-left: 11px;
|
|
34
|
-
max-height: 450px;
|
|
35
|
-
overflow-y: auto;
|
|
36
32
|
}
|
|
37
33
|
|
|
38
34
|
.test-result-step-root {
|
|
@@ -44,7 +40,6 @@
|
|
|
44
40
|
align-items: flex-start;
|
|
45
41
|
gap: 4px;
|
|
46
42
|
transition: background-color 300ms;
|
|
47
|
-
cursor: pointer;
|
|
48
43
|
padding: 4px 8px 4px 6px;
|
|
49
44
|
min-height: 32px;
|
|
50
45
|
|
|
@@ -125,9 +120,12 @@
|
|
|
125
120
|
align-items: center;
|
|
126
121
|
gap: 4px;
|
|
127
122
|
transition: background-color 300ms;
|
|
128
|
-
cursor: pointer;
|
|
129
123
|
padding: 4px 8px 4px 6px;
|
|
130
124
|
|
|
125
|
+
&:not(.empty) {
|
|
126
|
+
cursor: pointer;
|
|
127
|
+
}
|
|
128
|
+
|
|
131
129
|
&:hover {
|
|
132
130
|
background: var(--bg-control-flat-medium);
|
|
133
131
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Text } from "@allurereport/web-components";
|
|
2
2
|
import { type ComponentChildren, createContext } from "preact";
|
|
3
3
|
import { useContext, useEffect, useState } from "preact/hooks";
|
|
4
|
-
import { activeTab, navigateTo, route } from "@/stores/router";
|
|
4
|
+
import { activeSubTab, activeTab, navigateTo, route } from "@/stores/router";
|
|
5
5
|
import * as styles from "./styles.scss";
|
|
6
6
|
|
|
7
7
|
type TrTabsContextT = {
|
|
@@ -38,28 +38,40 @@ export const TrTabsList = (props: { children: ComponentChildren }) => {
|
|
|
38
38
|
return <div className={styles.tabsList}>{props.children}</div>;
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
export const TrTab = (props: { id: string; children: ComponentChildren
|
|
41
|
+
export const TrTab = (props: { id: string; children: ComponentChildren }) => {
|
|
42
|
+
const { testResultId } = route.value.params;
|
|
42
43
|
const { currentTab, setCurrentTab } = useTestResultTabsContext();
|
|
43
44
|
const { id, children } = props;
|
|
44
|
-
const isActiveFromUrl =
|
|
45
|
+
const isActiveFromUrl = activeSubTab.value === id;
|
|
45
46
|
const isCurrentTab = isActiveFromUrl ? isActiveFromUrl : currentTab === id;
|
|
46
47
|
|
|
47
48
|
useEffect(() => {
|
|
48
49
|
if (isActiveFromUrl) {
|
|
49
50
|
setCurrentTab(id);
|
|
50
51
|
}
|
|
51
|
-
}, [
|
|
52
|
+
}, [activeSubTab.value]);
|
|
52
53
|
|
|
53
54
|
const handleTabClick = () => {
|
|
54
55
|
if (isCurrentTab) {
|
|
55
56
|
return;
|
|
56
57
|
}
|
|
57
58
|
setCurrentTab(id);
|
|
58
|
-
navigateTo({
|
|
59
|
+
navigateTo({
|
|
60
|
+
...route.value,
|
|
61
|
+
params: {
|
|
62
|
+
testResultId,
|
|
63
|
+
subTab: id || null,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
59
66
|
};
|
|
60
67
|
|
|
61
68
|
return (
|
|
62
|
-
<button
|
|
69
|
+
<button
|
|
70
|
+
className={styles.tab}
|
|
71
|
+
onClick={handleTabClick}
|
|
72
|
+
data-testid={`test-result-tab-${id}`}
|
|
73
|
+
aria-current={isCurrentTab ? true : undefined}
|
|
74
|
+
>
|
|
63
75
|
<Text type="paragraph" size="m">
|
|
64
76
|
{children}
|
|
65
77
|
</Text>
|
|
@@ -63,7 +63,6 @@ const TestResult: FunctionComponent<TrProps> = ({ testResult }) => {
|
|
|
63
63
|
|
|
64
64
|
return (
|
|
65
65
|
<>
|
|
66
|
-
{!isSplitMode.value && <TrHeader testResult={testResult} />}
|
|
67
66
|
<div className={clsx(styles.content, splitModeClass)}>
|
|
68
67
|
{testResult ? <TrContent testResult={testResult} /> : <TrEmpty />}
|
|
69
68
|
</div>
|
|
@@ -21,7 +21,7 @@ export const TreeList = () => {
|
|
|
21
21
|
const { t } = useI18n("empty");
|
|
22
22
|
const { t: tEnvironments } = useI18n("environments");
|
|
23
23
|
const { currentTab } = useTabsContext();
|
|
24
|
-
const
|
|
24
|
+
const routeId = route.value.params?.testResultId;
|
|
25
25
|
|
|
26
26
|
return (
|
|
27
27
|
<Loadable
|
|
@@ -31,7 +31,7 @@ export const TreeList = () => {
|
|
|
31
31
|
// TODO: use function instead of computed
|
|
32
32
|
if (noTests.value) {
|
|
33
33
|
return (
|
|
34
|
-
<div
|
|
34
|
+
<div>
|
|
35
35
|
<div className={styles["tree-empty-results"]}>
|
|
36
36
|
<Text className={styles["tree-empty-results-title"]}>{t("no-results")}</Text>
|
|
37
37
|
</div>
|
|
@@ -41,7 +41,7 @@ export const TreeList = () => {
|
|
|
41
41
|
|
|
42
42
|
if (noTestsFound.value) {
|
|
43
43
|
return (
|
|
44
|
-
<div
|
|
44
|
+
<div>
|
|
45
45
|
<div className={styles["tree-empty-results"]}>
|
|
46
46
|
<Text tag="p" className={styles["tree-empty-results-title"]}>
|
|
47
47
|
{t("no-tests-found")}
|
|
@@ -62,7 +62,7 @@ export const TreeList = () => {
|
|
|
62
62
|
// render single tree for single environment
|
|
63
63
|
if (environmentsStore.value.data.length === 1) {
|
|
64
64
|
return (
|
|
65
|
-
<div
|
|
65
|
+
<div>
|
|
66
66
|
<Tree
|
|
67
67
|
reportStatistic={reportStatsStore.value.data}
|
|
68
68
|
statistic={statsByEnvStore.value.data[currentEnvironment.value]}
|
|
@@ -82,7 +82,7 @@ export const TreeList = () => {
|
|
|
82
82
|
|
|
83
83
|
if (currentTree) {
|
|
84
84
|
return (
|
|
85
|
-
<div
|
|
85
|
+
<div>
|
|
86
86
|
<Tree
|
|
87
87
|
reportStatistic={reportStatsStore.value.data}
|
|
88
88
|
statistic={statsByEnvStore.value.data[currentEnvironment.value]}
|
|
@@ -133,7 +133,7 @@ export const TreeList = () => {
|
|
|
133
133
|
/>
|
|
134
134
|
</div>
|
|
135
135
|
{isOpened && (
|
|
136
|
-
<div
|
|
136
|
+
<div data-testid={"tree-section-env-content"}>
|
|
137
137
|
<Tree
|
|
138
138
|
statistic={statsByEnvStore.value.data[key]}
|
|
139
139
|
reportStatistic={reportStatsStore.value.data}
|
package/src/index.tsx
CHANGED
|
@@ -3,17 +3,20 @@ import { Spinner, SvgIcon, allureIcons } from "@allurereport/web-components";
|
|
|
3
3
|
import "@allurereport/web-components/index.css";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
import { render } from "preact";
|
|
6
|
+
import "preact/debug";
|
|
6
7
|
import { useEffect, useState } from "preact/hooks";
|
|
7
8
|
import "@/assets/scss/index.scss";
|
|
8
|
-
import {
|
|
9
|
+
import { Footer } from "@/components/Footer";
|
|
10
|
+
import { Header } from "@/components/Header";
|
|
9
11
|
import { ModalComponent } from "@/components/Modal";
|
|
10
|
-
import {
|
|
12
|
+
import { SectionSwitcher } from "@/components/SectionSwitcher";
|
|
11
13
|
import { fetchEnvStats, fetchReportStats, getLocale, getTheme, waitForI18next } from "@/stores";
|
|
12
14
|
import { fetchPieChartData } from "@/stores/chart";
|
|
13
15
|
import { currentEnvironment, environmentsStore, fetchEnvironments } from "@/stores/env";
|
|
14
16
|
import { fetchEnvInfo } from "@/stores/envInfo";
|
|
15
|
-
import { getLayout, isLayoutLoading,
|
|
17
|
+
import { getLayout, isLayoutLoading, layoutStore } from "@/stores/layout";
|
|
16
18
|
import { handleHashChange, route } from "@/stores/router";
|
|
19
|
+
import { currentSection, getSection } from "@/stores/sections";
|
|
17
20
|
import { fetchTestResult, fetchTestResultNav } from "@/stores/testResults";
|
|
18
21
|
import { fetchEnvTreesData } from "@/stores/tree";
|
|
19
22
|
import { isMac } from "@/utils/isMac";
|
|
@@ -29,13 +32,19 @@ const Loader = () => {
|
|
|
29
32
|
};
|
|
30
33
|
|
|
31
34
|
const App = () => {
|
|
35
|
+
const className = styles[`layout-${currentSection.value !== "" ? currentSection.value : layoutStore.value}`];
|
|
32
36
|
const [prefetched, setPrefetched] = useState(false);
|
|
33
|
-
const
|
|
37
|
+
const testResultId = route.value.params?.testResultId ?? null;
|
|
34
38
|
const prefetchData = async () => {
|
|
35
39
|
const fns = [ensureReportDataReady, fetchReportStats, fetchPieChartData, fetchEnvironments, fetchEnvInfo];
|
|
36
40
|
|
|
37
41
|
if (globalThis) {
|
|
38
|
-
fns.unshift(
|
|
42
|
+
fns.unshift(
|
|
43
|
+
getSection as () => Promise<void>,
|
|
44
|
+
getLocale,
|
|
45
|
+
getLayout as () => Promise<void>,
|
|
46
|
+
getTheme as () => Promise<void>,
|
|
47
|
+
);
|
|
39
48
|
}
|
|
40
49
|
|
|
41
50
|
await waitForI18next;
|
|
@@ -43,6 +52,7 @@ const App = () => {
|
|
|
43
52
|
|
|
44
53
|
if (currentEnvironment.value) {
|
|
45
54
|
await fetchEnvTreesData([currentEnvironment.value]);
|
|
55
|
+
await fetchEnvStats(environmentsStore.value.data);
|
|
46
56
|
} else {
|
|
47
57
|
await fetchEnvTreesData(environmentsStore.value.data);
|
|
48
58
|
await fetchEnvStats(environmentsStore.value.data);
|
|
@@ -63,24 +73,28 @@ const App = () => {
|
|
|
63
73
|
}, [testResultId, currentEnvironment]);
|
|
64
74
|
|
|
65
75
|
useEffect(() => {
|
|
76
|
+
const onHashChange = () => handleHashChange();
|
|
77
|
+
|
|
66
78
|
handleHashChange();
|
|
67
|
-
globalThis.addEventListener("hashchange",
|
|
79
|
+
globalThis.addEventListener("hashchange", onHashChange);
|
|
68
80
|
|
|
69
81
|
return () => {
|
|
70
|
-
globalThis.removeEventListener("hashchange",
|
|
82
|
+
globalThis.removeEventListener("hashchange", onHashChange);
|
|
71
83
|
};
|
|
72
84
|
}, []);
|
|
73
85
|
|
|
74
86
|
return (
|
|
75
|
-
|
|
87
|
+
<>
|
|
76
88
|
{!prefetched && <Loader />}
|
|
77
89
|
{prefetched && (
|
|
78
|
-
|
|
79
|
-
|
|
90
|
+
<div className={styles.main}>
|
|
91
|
+
<Header className={className} />
|
|
92
|
+
<SectionSwitcher />
|
|
93
|
+
<Footer className={className} />
|
|
80
94
|
<ModalComponent />
|
|
81
|
-
|
|
95
|
+
</div>
|
|
82
96
|
)}
|
|
83
|
-
|
|
97
|
+
</>
|
|
84
98
|
);
|
|
85
99
|
};
|
|
86
100
|
|
package/src/locales/az.json
CHANGED
|
@@ -139,5 +139,21 @@
|
|
|
139
139
|
},
|
|
140
140
|
"errors": {
|
|
141
141
|
"missedAttachment": "Əlavə tapılmadı"
|
|
142
|
+
},
|
|
143
|
+
"sections": {
|
|
144
|
+
"report": "Report",
|
|
145
|
+
"charts": "Qrafiklər"
|
|
146
|
+
},
|
|
147
|
+
"charts": {
|
|
148
|
+
"trend": {
|
|
149
|
+
"title": "Trend qrafiki: {{type}}",
|
|
150
|
+
"type": {
|
|
151
|
+
"status": "Status",
|
|
152
|
+
"severity": "Ciddilik"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"pie": {
|
|
156
|
+
"title": "Test Uğur Dərəcəsi"
|
|
157
|
+
}
|
|
142
158
|
}
|
|
143
159
|
}
|
package/src/locales/de.json
CHANGED
|
@@ -138,5 +138,22 @@
|
|
|
138
138
|
},
|
|
139
139
|
"errors": {
|
|
140
140
|
"missedAttachment": "Anhang nicht gefunden"
|
|
141
|
+
},
|
|
142
|
+
"sections": {
|
|
143
|
+
"report": "Report",
|
|
144
|
+
"charts": "Graphen"
|
|
145
|
+
},
|
|
146
|
+
"charts": {
|
|
147
|
+
"trend": {
|
|
148
|
+
"title": "Trenddiagramm: {{type}}",
|
|
149
|
+
"type": {
|
|
150
|
+
"status": "Status",
|
|
151
|
+
"severity": "Schweregrad"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"pie": {
|
|
155
|
+
"title": "Testerfolgsrate"
|
|
156
|
+
}
|
|
141
157
|
}
|
|
158
|
+
|
|
142
159
|
}
|
package/src/locales/en.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"testSummary": {
|
|
14
14
|
"total": "Total",
|
|
15
15
|
"flaky": "Flaky tests",
|
|
16
|
-
"retries": "
|
|
16
|
+
"retries": "Retried tests",
|
|
17
17
|
"new": "New tests"
|
|
18
18
|
},
|
|
19
19
|
"tabs": {
|
|
@@ -139,5 +139,21 @@
|
|
|
139
139
|
},
|
|
140
140
|
"errors": {
|
|
141
141
|
"missedAttachment": "Attachment not found"
|
|
142
|
+
},
|
|
143
|
+
"sections": {
|
|
144
|
+
"report": "Report",
|
|
145
|
+
"charts": "Graphs"
|
|
146
|
+
},
|
|
147
|
+
"charts": {
|
|
148
|
+
"trend": {
|
|
149
|
+
"title": "Trend Chart: {{type}}",
|
|
150
|
+
"type": {
|
|
151
|
+
"status": "Status",
|
|
152
|
+
"severity": "Severity"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"pie": {
|
|
156
|
+
"title": "Test Success Rate"
|
|
157
|
+
}
|
|
142
158
|
}
|
|
143
159
|
}
|
package/src/locales/es.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"testSummary": {
|
|
14
14
|
"total": "Total",
|
|
15
15
|
"flaky": "Pruebas inestables",
|
|
16
|
-
"retries": "Pruebas
|
|
16
|
+
"retries": "Pruebas repetidas",
|
|
17
17
|
"new": "Pruebas nuevas"
|
|
18
18
|
},
|
|
19
19
|
"tabs": {
|
|
@@ -138,5 +138,21 @@
|
|
|
138
138
|
},
|
|
139
139
|
"errors": {
|
|
140
140
|
"missedAttachment": "Adjunto no encontrado"
|
|
141
|
+
},
|
|
142
|
+
"sections": {
|
|
143
|
+
"report": "Report",
|
|
144
|
+
"charts": "Gráficas"
|
|
145
|
+
},
|
|
146
|
+
"charts": {
|
|
147
|
+
"trend": {
|
|
148
|
+
"title": "Gráfico de tendencia: {{type}}",
|
|
149
|
+
"type": {
|
|
150
|
+
"status": "Estado",
|
|
151
|
+
"severity": "Severidad"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"pie": {
|
|
155
|
+
"title": "Tasa de éxito de pruebas"
|
|
156
|
+
}
|
|
141
157
|
}
|
|
142
158
|
}
|
package/src/locales/fr.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"testSummary": {
|
|
14
14
|
"total": "Total",
|
|
15
15
|
"flaky": "Tests instables",
|
|
16
|
-
"retries": "Tests
|
|
16
|
+
"retries": "Tests répétés",
|
|
17
17
|
"new": "Nouveaux tests"
|
|
18
18
|
},
|
|
19
19
|
"tabs": {
|
|
@@ -138,5 +138,21 @@
|
|
|
138
138
|
},
|
|
139
139
|
"errors": {
|
|
140
140
|
"missedAttachment": "Pièce jointe non trouvée"
|
|
141
|
+
},
|
|
142
|
+
"sections": {
|
|
143
|
+
"report": "Report",
|
|
144
|
+
"charts": "Graphes"
|
|
145
|
+
},
|
|
146
|
+
"charts": {
|
|
147
|
+
"trend": {
|
|
148
|
+
"title": "Graphique de tendance: {{type}}",
|
|
149
|
+
"type": {
|
|
150
|
+
"status": "Statut",
|
|
151
|
+
"severity": "Sévérité"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"pie": {
|
|
155
|
+
"title": "Taux de réussite des tests"
|
|
156
|
+
}
|
|
141
157
|
}
|
|
142
158
|
}
|
package/src/locales/he.json
CHANGED
|
@@ -138,5 +138,21 @@
|
|
|
138
138
|
},
|
|
139
139
|
"errors": {
|
|
140
140
|
"missedAttachment": "הקובץ המצורף לא נמצא"
|
|
141
|
+
},
|
|
142
|
+
"sections": {
|
|
143
|
+
"report": "Report",
|
|
144
|
+
"charts": "גרפים"
|
|
145
|
+
},
|
|
146
|
+
"charts": {
|
|
147
|
+
"trend": {
|
|
148
|
+
"title": "תרשים מגמה: {{type}}",
|
|
149
|
+
"type": {
|
|
150
|
+
"status": "סטטוס",
|
|
151
|
+
"severity": "חומרה"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"pie": {
|
|
155
|
+
"title": "שיעור הצלחת הבדיקות"
|
|
156
|
+
}
|
|
141
157
|
}
|
|
142
158
|
}
|
package/src/locales/hy.json
CHANGED
|
@@ -138,5 +138,21 @@
|
|
|
138
138
|
},
|
|
139
139
|
"errors": {
|
|
140
140
|
"missedAttachment": "Կցորդը չի գտնվել"
|
|
141
|
+
},
|
|
142
|
+
"sections": {
|
|
143
|
+
"report": "Report",
|
|
144
|
+
"charts": "Գրաֆիկներ"
|
|
145
|
+
},
|
|
146
|
+
"charts": {
|
|
147
|
+
"trend": {
|
|
148
|
+
"title": "Միտումների գրաֆիկ: {{type}}",
|
|
149
|
+
"type": {
|
|
150
|
+
"status": "Կարգավիճակ",
|
|
151
|
+
"severity": "Ծանրություն"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"pie": {
|
|
155
|
+
"title": "Թեստերի հաջողության գործակից"
|
|
156
|
+
}
|
|
141
157
|
}
|
|
142
158
|
}
|