@allurereport/web-awesome 3.0.0-beta.10
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/.babelrc.js +46 -0
- package/.eslintrc.cjs +18 -0
- package/CONTRIBUTING.md +34 -0
- package/README.md +27 -0
- package/dist/multi/141.app-d01d0c66.js +1 -0
- package/dist/multi/222.app-d01d0c66.js +1 -0
- package/dist/multi/335.app-d01d0c66.js +1 -0
- package/dist/multi/34.app-d01d0c66.js +1 -0
- package/dist/multi/349.app-d01d0c66.js +1 -0
- package/dist/multi/378.app-d01d0c66.js +1 -0
- package/dist/multi/406.app-d01d0c66.js +1 -0
- package/dist/multi/476.app-d01d0c66.js +1 -0
- package/dist/multi/53.app-d01d0c66.js +1 -0
- package/dist/multi/584.app-d01d0c66.js +1 -0
- package/dist/multi/690.app-d01d0c66.js +1 -0
- package/dist/multi/747.app-d01d0c66.js +1 -0
- package/dist/multi/767.app-d01d0c66.js +1 -0
- package/dist/multi/816.app-d01d0c66.js +1 -0
- package/dist/multi/83.app-d01d0c66.js +1 -0
- package/dist/multi/873.app-d01d0c66.js +1 -0
- package/dist/multi/920.app-d01d0c66.js +1 -0
- package/dist/multi/991.app-d01d0c66.js +1 -0
- package/dist/multi/JetBrainsMono_vf-9e9649b6..woff2 +0 -0
- package/dist/multi/JetBrainsMono_vf-b9a9c326..woff +0 -0
- package/dist/multi/app-d01d0c66.js +2 -0
- package/dist/multi/app-d01d0c66.js.LICENSE.txt +16 -0
- package/dist/multi/manifest.json +26 -0
- package/dist/multi/pt-root-ui_vf-22fe60ca..woff +0 -0
- package/dist/multi/pt-root-ui_vf-9d251e8b..woff2 +0 -0
- package/dist/multi/styles-d01d0c66.css +39 -0
- package/dist/single/app-6596cb08.js +2 -0
- package/dist/single/app-6596cb08.js.LICENSE.txt +16 -0
- package/dist/single/manifest.json +3 -0
- package/package.json +107 -0
- package/postcss.config.js +5 -0
- package/src/assets/scss/_common.scss +143 -0
- package/src/assets/scss/day.scss +51 -0
- package/src/assets/scss/fonts.scss +3 -0
- package/src/assets/scss/index.scss +7 -0
- package/src/assets/scss/night.scss +61 -0
- package/src/assets/scss/palette.scss +393 -0
- package/src/assets/scss/theme.scss +119 -0
- package/src/assets/scss/vars.scss +9 -0
- package/src/assets/svg/line-alerts-alert-circle.svg +12 -0
- package/src/assets/svg/line-general-eye.svg +7 -0
- package/src/assets/svg/line-icon-bomb-2.svg +12 -0
- package/src/components/ArrowButton/index.tsx +36 -0
- package/src/components/ArrowButton/styles.scss +35 -0
- package/src/components/BaseLayout/index.tsx +43 -0
- package/src/components/BaseLayout/styles.scss +60 -0
- package/src/components/Footer/FooterLogo.tsx +16 -0
- package/src/components/Footer/FooterVersion.tsx +37 -0
- package/src/components/Footer/index.tsx +13 -0
- package/src/components/Footer/styles.scss +14 -0
- package/src/components/Header/index.tsx +28 -0
- package/src/components/Header/styles.scss +33 -0
- package/src/components/LanguagePicker/index.tsx +40 -0
- package/src/components/MainReport/index.tsx +21 -0
- package/src/components/MainReport/styles.scss +11 -0
- package/src/components/Metadata/index.tsx +121 -0
- package/src/components/Metadata/styles.scss +146 -0
- package/src/components/MetadataButton/index.tsx +32 -0
- package/src/components/MetadataButton/styles.scss +53 -0
- package/src/components/Modal/index.tsx +22 -0
- package/src/components/ReportBody/Filters.tsx +90 -0
- package/src/components/ReportBody/HeaderActions.tsx +21 -0
- package/src/components/ReportBody/SortBy.tsx +132 -0
- package/src/components/ReportBody/context.tsx +106 -0
- package/src/components/ReportBody/index.tsx +72 -0
- package/src/components/ReportBody/styles.scss +69 -0
- package/src/components/ReportHeader/ReportHeaderLabelList.tsx +12 -0
- package/src/components/ReportHeader/ReportHeaderLogo.tsx +10 -0
- package/src/components/ReportHeader/ReportHeaderPie.tsx +14 -0
- package/src/components/ReportHeader/index.tsx +33 -0
- package/src/components/ReportHeader/styles.scss +51 -0
- package/src/components/ReportLogo/index.tsx +16 -0
- package/src/components/ReportLogo/styles.scss +20 -0
- package/src/components/ReportLogoFull/index.tsx +20 -0
- package/src/components/ReportLogoFull/styles.scss +7 -0
- package/src/components/ReportMetadata/MetadataItem.tsx +45 -0
- package/src/components/ReportMetadata/MetadataSummary.tsx +81 -0
- package/src/components/ReportMetadata/MetadataTestType.tsx +16 -0
- package/src/components/ReportMetadata/MetadataWithIcon.tsx +21 -0
- package/src/components/ReportMetadata/index.tsx +46 -0
- package/src/components/ReportMetadata/styles.scss +99 -0
- package/src/components/SideBySide/index.tsx +52 -0
- package/src/components/SideBySide/styles.scss +65 -0
- package/src/components/SplitLayout/index.tsx +77 -0
- package/src/components/SplitLayout/styles.scss +85 -0
- package/src/components/Tabs/index.tsx +62 -0
- package/src/components/Tabs/styles.scss +56 -0
- package/src/components/TestResult/TestResultAttachmentsView/index.tsx +27 -0
- package/src/components/TestResult/TestResultAttachmentsView/styles.scss +12 -0
- package/src/components/TestResult/TestResultDescription/index.tsx +27 -0
- package/src/components/TestResult/TestResultDescription/styles.scss +12 -0
- package/src/components/TestResult/TestResultDropdown/index.tsx +26 -0
- package/src/components/TestResult/TestResultDropdown/styles.scss +34 -0
- package/src/components/TestResult/TestResultEmpty/index.tsx +34 -0
- package/src/components/TestResult/TestResultEmpty/styles.scss +25 -0
- package/src/components/TestResult/TestResultHeader/TestResultBreadcrumbs.tsx +44 -0
- package/src/components/TestResult/TestResultHeader/index.tsx +21 -0
- package/src/components/TestResult/TestResultHeader/styles.scss +48 -0
- package/src/components/TestResult/TestResultHistory/TestResultHistoryItem.tsx +66 -0
- package/src/components/TestResult/TestResultHistory/index.tsx +26 -0
- package/src/components/TestResult/TestResultHistory/styles.scss +63 -0
- package/src/components/TestResult/TestResultInfo/TestResultInfoStatuses.tsx +30 -0
- package/src/components/TestResult/TestResultInfo/index.tsx +81 -0
- package/src/components/TestResult/TestResultInfo/styles.scss +68 -0
- package/src/components/TestResult/TestResultLinks/index.tsx +56 -0
- package/src/components/TestResult/TestResultLinks/styles.scss +30 -0
- package/src/components/TestResult/TestResultMetadata/index.tsx +27 -0
- package/src/components/TestResult/TestResultMetadata/styles.scss +8 -0
- package/src/components/TestResult/TestResultNavigation/index.tsx +80 -0
- package/src/components/TestResult/TestResultNavigation/styles.scss +48 -0
- package/src/components/TestResult/TestResultOverview.tsx +43 -0
- package/src/components/TestResult/TestResultParameters/index.tsx +30 -0
- package/src/components/TestResult/TestResultParameters/styles.scss +8 -0
- package/src/components/TestResult/TestResultPrevStatuses/index.tsx +49 -0
- package/src/components/TestResult/TestResultPrevStatuses/styles.scss +57 -0
- package/src/components/TestResult/TestResultRetriesView/TestResultRetriesItem.tsx +51 -0
- package/src/components/TestResult/TestResultRetriesView/index.tsx +24 -0
- package/src/components/TestResult/TestResultRetriesView/styles.scss +69 -0
- package/src/components/TestResult/TestResultSetup/index.tsx +58 -0
- package/src/components/TestResult/TestResultSeverity/index.tsx +27 -0
- package/src/components/TestResult/TestResultSeverity/styles.scss +29 -0
- package/src/components/TestResult/TestResultStatus/index.tsx +25 -0
- package/src/components/TestResult/TestResultStatus/styles.scss +36 -0
- package/src/components/TestResult/TestResultSteps/index.tsx +58 -0
- package/src/components/TestResult/TestResultSteps/styles.scss +225 -0
- package/src/components/TestResult/TestResultSteps/testResultAttachment.tsx +76 -0
- package/src/components/TestResult/TestResultSteps/testResultAttachmentInfo.tsx +83 -0
- package/src/components/TestResult/TestResultSteps/testResultStep.tsx +84 -0
- package/src/components/TestResult/TestResultSteps/testResultStepInfo.tsx +30 -0
- package/src/components/TestResult/TestResultSteps/wrongAttachment.tsx +8 -0
- package/src/components/TestResult/TestResultTabs/index.tsx +68 -0
- package/src/components/TestResult/TestResultTabs/styles.scss +76 -0
- package/src/components/TestResult/TestResultTeardown/index.tsx +59 -0
- package/src/components/TestResult/TestStepsEmpty/index.tsx +23 -0
- package/src/components/TestResult/TestStepsEmpty/styles.scss +25 -0
- package/src/components/TestResult/TrError/TrDiff.tsx +124 -0
- package/src/components/TestResult/TrError/index.tsx +78 -0
- package/src/components/TestResult/TrError/styles.scss +133 -0
- package/src/components/TestResult/index.tsx +62 -0
- package/src/components/TestResult/styles.scss +11 -0
- package/src/components/ThemeButton/ThemeButton.tsx +20 -0
- package/src/components/ToggleLayout/index.tsx +17 -0
- package/src/components/Tree/index.tsx +75 -0
- package/src/components/Tree/styles.scss +189 -0
- package/src/i18n/constants.ts +124 -0
- package/src/i18n/locales/am.json +133 -0
- package/src/i18n/locales/az.json +133 -0
- package/src/i18n/locales/de.json +133 -0
- package/src/i18n/locales/en.json +134 -0
- package/src/i18n/locales/es.json +133 -0
- package/src/i18n/locales/fr.json +133 -0
- package/src/i18n/locales/he.json +133 -0
- package/src/i18n/locales/it.json +133 -0
- package/src/i18n/locales/ja.json +133 -0
- package/src/i18n/locales/ka.json +133 -0
- package/src/i18n/locales/kr.json +133 -0
- package/src/i18n/locales/nl.json +133 -0
- package/src/i18n/locales/pl.json +131 -0
- package/src/i18n/locales/pt.json +133 -0
- package/src/i18n/locales/ru.json +131 -0
- package/src/i18n/locales/sv.json +133 -0
- package/src/i18n/locales/tr.json +133 -0
- package/src/i18n/locales/zh.json +133 -0
- package/src/index.html +40 -0
- package/src/index.tsx +96 -0
- package/src/stores/chart.ts +32 -0
- package/src/stores/envInfo.ts +34 -0
- package/src/stores/index.ts +4 -0
- package/src/stores/layout.ts +36 -0
- package/src/stores/locale.ts +75 -0
- package/src/stores/modal.ts +22 -0
- package/src/stores/router.ts +48 -0
- package/src/stores/stats.ts +36 -0
- package/src/stores/testResults.ts +66 -0
- package/src/stores/theme.ts +32 -0
- package/src/stores/tree.ts +157 -0
- package/src/stores/types.ts +5 -0
- package/src/styles.scss +45 -0
- package/src/types/globals.d.ts +13 -0
- package/src/types/window.d.ts +8 -0
- package/src/utils/capitalize.ts +6 -0
- package/src/utils/copyToClipboard.ts +16 -0
- package/src/utils/isMac.ts +8 -0
- package/src/utils/loadFromLocalStorage.ts +8 -0
- package/src/utils/statuses.ts +55 -0
- package/src/utils/time.ts +17 -0
- package/src/utils/treeFilters.ts +147 -0
- package/test/utils/treeFilters.test.ts +448 -0
- package/tsconfig.json +27 -0
- package/types.d.ts +99 -0
- package/vitest.config.ts +18 -0
- package/webpack.config.js +112 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
.test-result-error {
|
|
2
|
+
padding: 8px 8px 12px 16px;
|
|
3
|
+
background-color: var(--bg-alpha-capella);
|
|
4
|
+
border-radius: 8px;
|
|
5
|
+
position: relative;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
|
|
8
|
+
&:before {
|
|
9
|
+
content: "";
|
|
10
|
+
display: block;
|
|
11
|
+
height: 100%;
|
|
12
|
+
width: 2px;
|
|
13
|
+
position: absolute;
|
|
14
|
+
left: 0;
|
|
15
|
+
top: 0;
|
|
16
|
+
background: var(--on-support-capella);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.test-result-error-header {
|
|
21
|
+
display: flex;
|
|
22
|
+
gap: 4px;
|
|
23
|
+
justify-content: space-between;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.test-result-error-text {
|
|
27
|
+
margin-bottom: 8px;
|
|
28
|
+
padding-left: 8px;
|
|
29
|
+
color: var(--on-support-capella);
|
|
30
|
+
margin-right: auto;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.test-result-error-trace {
|
|
34
|
+
margin-top: 8px;
|
|
35
|
+
padding-left: 8px;
|
|
36
|
+
|
|
37
|
+
pre {
|
|
38
|
+
overflow: scroll;
|
|
39
|
+
padding-bottom: 24px;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.test-result-error-message {
|
|
44
|
+
padding: 8px;
|
|
45
|
+
border-radius: 8px;
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
transition: background-color 300ms;
|
|
48
|
+
margin-bottom: 4px;
|
|
49
|
+
|
|
50
|
+
&:hover {
|
|
51
|
+
background: var(--bg-alpha-capella);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.diff {
|
|
56
|
+
width: 100%;
|
|
57
|
+
line-height: 1.28;
|
|
58
|
+
padding: 0 16px 16px;
|
|
59
|
+
|
|
60
|
+
.side {
|
|
61
|
+
flex: 1 1 auto;
|
|
62
|
+
gap: 4px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.unified {
|
|
66
|
+
flex: 1 1 auto;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.diff-screen {
|
|
70
|
+
min-height: 320px;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.diff-green {
|
|
75
|
+
color: var(--on-support-castor);
|
|
76
|
+
background: #09933729;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.diff-grey {
|
|
80
|
+
color: var(--on-text-secondary);
|
|
81
|
+
margin-bottom: 4px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.diff-red {
|
|
85
|
+
color: var(--on-support-capella);
|
|
86
|
+
background: var(--bg-alpha-capella);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.diff-buttons {
|
|
90
|
+
display: flex;
|
|
91
|
+
gap: 4px;
|
|
92
|
+
align-items: center;
|
|
93
|
+
line-height: 24px;
|
|
94
|
+
margin-bottom: 4px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.expected {
|
|
98
|
+
display: flex;
|
|
99
|
+
justify-content: space-between;
|
|
100
|
+
width: 100%;
|
|
101
|
+
align-items: center;
|
|
102
|
+
line-height: 24px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.side-title {
|
|
106
|
+
line-height: 24px;
|
|
107
|
+
margin-bottom: 4px;
|
|
108
|
+
display: block;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.diff-controls {
|
|
112
|
+
display: flex;
|
|
113
|
+
gap: 16px;
|
|
114
|
+
align-items: center;
|
|
115
|
+
margin-bottom: 4px;
|
|
116
|
+
justify-content: space-between;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.diff-view {
|
|
120
|
+
display: flex;
|
|
121
|
+
gap: 4px;
|
|
122
|
+
align-items: flex-start;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.side-by-side {
|
|
126
|
+
display: flex;
|
|
127
|
+
gap: 4px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.diff-buttons-title {
|
|
131
|
+
color: var(--on-text-secondary);
|
|
132
|
+
margin-right: 8px;
|
|
133
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
2
|
+
import type { FunctionComponent, FunctionalComponent } from "preact";
|
|
3
|
+
import type { AwesomeTestResult } from "types";
|
|
4
|
+
import { TestResultAttachmentView } from "@/components/TestResult/TestResultAttachmentsView";
|
|
5
|
+
import TestResultEmpty from "@/components/TestResult/TestResultEmpty";
|
|
6
|
+
import { TestResultHeader } from "@/components/TestResult/TestResultHeader";
|
|
7
|
+
import TestResultHistoryView from "@/components/TestResult/TestResultHistory";
|
|
8
|
+
import { TestResultInfo } from "@/components/TestResult/TestResultInfo";
|
|
9
|
+
import { TestResultOverview } from "@/components/TestResult/TestResultOverview";
|
|
10
|
+
import { TestResultRetriesView } from "@/components/TestResult/TestResultRetriesView";
|
|
11
|
+
import { TestResultTabs, useTestResultTabsContext } from "@/components/TestResult/TestResultTabs";
|
|
12
|
+
import { isSplitMode } from "@/stores/layout";
|
|
13
|
+
import * as styles from "./styles.scss";
|
|
14
|
+
|
|
15
|
+
export type TestResultViewProps = {
|
|
16
|
+
testResult?: AwesomeTestResult;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const TestResultView: FunctionalComponent<TestResultViewProps> = ({ testResult }) => {
|
|
20
|
+
const { currentTab } = useTestResultTabsContext();
|
|
21
|
+
const viewMap: Record<string, any> = {
|
|
22
|
+
overview: TestResultOverview,
|
|
23
|
+
history: TestResultHistoryView,
|
|
24
|
+
attachments: TestResultAttachmentView,
|
|
25
|
+
retries: TestResultRetriesView,
|
|
26
|
+
};
|
|
27
|
+
const ViewComponent = viewMap[currentTab];
|
|
28
|
+
|
|
29
|
+
return <ViewComponent testResult={testResult} />;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type TestResultContentProps = {
|
|
33
|
+
testResult?: AwesomeTestResult;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const TestResultContent: FunctionalComponent<TestResultContentProps> = ({ testResult }) => {
|
|
37
|
+
return (
|
|
38
|
+
<TestResultTabs initialTab="overview">
|
|
39
|
+
<TestResultInfo testResult={testResult} />
|
|
40
|
+
<TestResultView testResult={testResult} />
|
|
41
|
+
</TestResultTabs>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export type TestResultProps = {
|
|
46
|
+
testResult?: AwesomeTestResult;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const TestResult: FunctionComponent<TestResultProps> = ({ testResult }) => {
|
|
50
|
+
const splitModeClass = isSplitMode.value ? styles["scroll-inside"] : "";
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<>
|
|
54
|
+
{!isSplitMode.value && <TestResultHeader testResult={testResult} />}
|
|
55
|
+
<div className={clsx(styles.content, splitModeClass)}>
|
|
56
|
+
{testResult ? <TestResultContent testResult={testResult} /> : <TestResultEmpty />}
|
|
57
|
+
</div>
|
|
58
|
+
</>
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export default TestResult;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IconButton, allureIcons } from "@allurereport/web-components";
|
|
2
|
+
import { useEffect } from "preact/hooks";
|
|
3
|
+
import { getTheme, themeStore, toggleTheme } from "@/stores/theme";
|
|
4
|
+
|
|
5
|
+
export const ThemeButton = () => {
|
|
6
|
+
const theme = themeStore.value;
|
|
7
|
+
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
getTheme();
|
|
10
|
+
}, []);
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<IconButton
|
|
14
|
+
onClick={toggleTheme}
|
|
15
|
+
style="ghost"
|
|
16
|
+
icon={theme === "light" ? allureIcons.lineShapesMoon : allureIcons.lineShapesSun}
|
|
17
|
+
size="s"
|
|
18
|
+
/>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IconButton, allureIcons } from "@allurereport/web-components";
|
|
2
|
+
import { isSplitMode, toggleLayout } from "@/stores/layout";
|
|
3
|
+
|
|
4
|
+
const ToggleLayout = () => {
|
|
5
|
+
const icon = isSplitMode.value ? allureIcons.lineLayoutsLayoutTop : allureIcons.lineLayoutsColumn2;
|
|
6
|
+
return (
|
|
7
|
+
<IconButton
|
|
8
|
+
data-testId={"toggle-layout-button"}
|
|
9
|
+
size={"s"}
|
|
10
|
+
icon={icon}
|
|
11
|
+
style={"ghost"}
|
|
12
|
+
onClick={() => toggleLayout()}
|
|
13
|
+
/>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default ToggleLayout;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Button, Loadable, PageLoader, Text, Tree } from "@allurereport/web-components";
|
|
2
|
+
import type { AwesomeStatus } from "types";
|
|
3
|
+
import { useTabsContext } from "@/components/Tabs";
|
|
4
|
+
import { statsStore } from "@/stores";
|
|
5
|
+
import { useI18n } from "@/stores/locale";
|
|
6
|
+
import { navigateTo } from "@/stores/router";
|
|
7
|
+
import {
|
|
8
|
+
clearTreeFilters,
|
|
9
|
+
collapsedTrees,
|
|
10
|
+
filteredTree,
|
|
11
|
+
noTests,
|
|
12
|
+
noTestsFound,
|
|
13
|
+
toggleTree,
|
|
14
|
+
treeFiltersStore,
|
|
15
|
+
treeStore,
|
|
16
|
+
} from "@/stores/tree";
|
|
17
|
+
import * as styles from "./styles.scss";
|
|
18
|
+
|
|
19
|
+
export const TreeList = () => {
|
|
20
|
+
const { t } = useI18n("empty");
|
|
21
|
+
const { currentTab } = useTabsContext();
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<Loadable
|
|
25
|
+
source={treeStore}
|
|
26
|
+
renderLoader={() => <PageLoader />}
|
|
27
|
+
renderData={() => {
|
|
28
|
+
if (noTests.value) {
|
|
29
|
+
return (
|
|
30
|
+
<div className={styles["tree-list"]}>
|
|
31
|
+
<div className={styles["tree-empty-results"]}>
|
|
32
|
+
<Text className={styles["tree-empty-results-title"]}>{t("no-results")}</Text>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (noTestsFound.value) {
|
|
39
|
+
return (
|
|
40
|
+
<div className={styles["tree-list"]}>
|
|
41
|
+
<div className={styles["tree-empty-results"]}>
|
|
42
|
+
<Text tag="p" className={styles["tree-empty-results-title"]}>
|
|
43
|
+
{t("no-tests-found")}
|
|
44
|
+
</Text>
|
|
45
|
+
<Button
|
|
46
|
+
className={styles["tree-empty-results-clear-button"]}
|
|
47
|
+
type="button"
|
|
48
|
+
text={t("clear-filters")}
|
|
49
|
+
size={"s"}
|
|
50
|
+
style={"outline"}
|
|
51
|
+
onClick={() => clearTreeFilters()}
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<div className={styles["tree-list"]}>
|
|
60
|
+
<Tree
|
|
61
|
+
collapsedTrees={collapsedTrees.value}
|
|
62
|
+
toggleTree={toggleTree}
|
|
63
|
+
treeFiltersStore={treeFiltersStore}
|
|
64
|
+
navigateTo={navigateTo}
|
|
65
|
+
statsStore={statsStore}
|
|
66
|
+
tree={filteredTree.value}
|
|
67
|
+
statusFilter={currentTab as AwesomeStatus}
|
|
68
|
+
root
|
|
69
|
+
/>
|
|
70
|
+
</div>
|
|
71
|
+
);
|
|
72
|
+
}}
|
|
73
|
+
/>
|
|
74
|
+
);
|
|
75
|
+
};
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
.tree {
|
|
2
|
+
position: relative;
|
|
3
|
+
|
|
4
|
+
&:not(:first-child) {
|
|
5
|
+
border-top: 1px solid var(--on-border-muted);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.tree-list {
|
|
10
|
+
min-height: 128px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.tree-header {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
gap: 4px;
|
|
17
|
+
transition: background-color 300ms;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
padding: 4px 8px 4px 6px;
|
|
20
|
+
|
|
21
|
+
&:hover {
|
|
22
|
+
background: var(--bg-control-flat-medium);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.tree-header-arrow {
|
|
27
|
+
transform: rotate(-90deg);
|
|
28
|
+
transition: transform 200ms;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.tree-header-arrow-opened {
|
|
32
|
+
transform: rotate(0);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.tree-header-title {
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
text-overflow: ellipsis;
|
|
39
|
+
margin-right: 24px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.tree-count {
|
|
43
|
+
display: flex;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.tree-item {
|
|
47
|
+
display: flex;
|
|
48
|
+
justify-content: space-between;
|
|
49
|
+
padding: 6px 8px 6px 6px;
|
|
50
|
+
transition: background-color 300ms;
|
|
51
|
+
gap: 4px;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
position: relative;
|
|
54
|
+
|
|
55
|
+
&:hover {
|
|
56
|
+
background: var(--bg-control-flat-medium);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&:not(:first-child) {
|
|
60
|
+
border-top: 1px solid var(--on-border-muted);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.item-title {
|
|
65
|
+
display: flex;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.item-time {
|
|
69
|
+
flex: none;
|
|
70
|
+
margin-left: auto;
|
|
71
|
+
color: var(--on-text-hint);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.test-count {
|
|
75
|
+
display: flex;
|
|
76
|
+
margin-left: auto;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.tree-content:not(.root) {
|
|
80
|
+
display: block;
|
|
81
|
+
padding-left: 24px;
|
|
82
|
+
margin-bottom: 12px;
|
|
83
|
+
border-top: 1px solid var(--on-border-muted);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.tree-item-icon {
|
|
87
|
+
padding: 2px 4px;
|
|
88
|
+
height: max-content;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.status-passed {
|
|
92
|
+
color: var(--bg-support-castor);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.status-failed {
|
|
96
|
+
color: var(--bg-support-capella);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.status-broken {
|
|
100
|
+
color: var(--bg-support-atlas);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.status-skipped {
|
|
104
|
+
color: var(--bg-support-rau);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.status-unknown {
|
|
108
|
+
color: var(--bg-support-skat);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.tree-header-bar {
|
|
112
|
+
display: inline-flex;
|
|
113
|
+
font-family: var(--font-family);
|
|
114
|
+
max-width: 140px;
|
|
115
|
+
min-width: 46px;
|
|
116
|
+
border-radius: 4px;
|
|
117
|
+
height: 12px;
|
|
118
|
+
background: var(--on-text-hint);
|
|
119
|
+
margin-left: auto;
|
|
120
|
+
font-size: 10px;
|
|
121
|
+
font-weight: var(--font-weight-extra-bold);
|
|
122
|
+
line-height: 12px;
|
|
123
|
+
overflow: hidden;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.tree-header-bar-item {
|
|
127
|
+
display: flex;
|
|
128
|
+
min-width: 16px;
|
|
129
|
+
justify-content: center;
|
|
130
|
+
text-align: center;
|
|
131
|
+
padding: 0 6px;
|
|
132
|
+
flex-grow: 1;
|
|
133
|
+
|
|
134
|
+
&.passed {
|
|
135
|
+
background-color: var(--bg-support-castor);
|
|
136
|
+
color: var(--constant-on-text-primary);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&.failed {
|
|
140
|
+
background-color: var(--bg-support-capella);
|
|
141
|
+
color: var(--constant-on-text-primary);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&.broken {
|
|
145
|
+
background-color: var(--bg-support-atlas);
|
|
146
|
+
color: var(--constant-on-text-primary);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&.skipped {
|
|
150
|
+
background-color: var(--bg-support-rau);
|
|
151
|
+
color: var(--constant-on-text-primary);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&.unknown {
|
|
155
|
+
background-color: var(--bg-support-skat);
|
|
156
|
+
color: var(--constant-on-text-primary);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.tree-empty-results {
|
|
161
|
+
padding: 44px 24px;
|
|
162
|
+
text-align: center;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.tree-empty-results-title {
|
|
166
|
+
color: var(--on-text-secondary);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.tree-empty-results-clear-button {
|
|
170
|
+
margin-top: 4px;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.order {
|
|
174
|
+
user-select: none;
|
|
175
|
+
color: var(--on-text-hint);
|
|
176
|
+
min-width: 16px;
|
|
177
|
+
text-align: center;
|
|
178
|
+
box-sizing: content-box;
|
|
179
|
+
padding-top: 2px;
|
|
180
|
+
line-height: 16px;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.tree-item-marked {
|
|
184
|
+
background: var(--bg-base-secondary);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.tree-item-marked {
|
|
188
|
+
background: var(--bg-base-secondary);
|
|
189
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
export const AVAILABLE_LOCALES = [
|
|
2
|
+
"en",
|
|
3
|
+
"ru",
|
|
4
|
+
"pl",
|
|
5
|
+
"es",
|
|
6
|
+
"pt",
|
|
7
|
+
"de",
|
|
8
|
+
"am",
|
|
9
|
+
"az",
|
|
10
|
+
"fr",
|
|
11
|
+
"it",
|
|
12
|
+
"ja",
|
|
13
|
+
"he",
|
|
14
|
+
"ka",
|
|
15
|
+
"kr",
|
|
16
|
+
"nl",
|
|
17
|
+
"sv",
|
|
18
|
+
"tr",
|
|
19
|
+
"zh",
|
|
20
|
+
] as const;
|
|
21
|
+
|
|
22
|
+
export const DEFAULT_LOCALE = "en";
|
|
23
|
+
|
|
24
|
+
export type LangLocale = (typeof AVAILABLE_LOCALES)[number];
|
|
25
|
+
|
|
26
|
+
export const LANG_LOCALE: Record<
|
|
27
|
+
LangLocale,
|
|
28
|
+
{
|
|
29
|
+
short: string;
|
|
30
|
+
full: string;
|
|
31
|
+
iso: string;
|
|
32
|
+
}
|
|
33
|
+
> = {
|
|
34
|
+
en: {
|
|
35
|
+
short: "Eng",
|
|
36
|
+
full: "English",
|
|
37
|
+
iso: "en-US",
|
|
38
|
+
},
|
|
39
|
+
ru: {
|
|
40
|
+
short: "Ру",
|
|
41
|
+
full: "Русский",
|
|
42
|
+
iso: "ru-RU",
|
|
43
|
+
},
|
|
44
|
+
pl: {
|
|
45
|
+
short: "Pl",
|
|
46
|
+
full: "Polski",
|
|
47
|
+
iso: "pl-PL",
|
|
48
|
+
},
|
|
49
|
+
es: {
|
|
50
|
+
short: "Es",
|
|
51
|
+
full: "Español",
|
|
52
|
+
iso: "es-ES",
|
|
53
|
+
},
|
|
54
|
+
pt: {
|
|
55
|
+
short: "Pt",
|
|
56
|
+
full: "Português",
|
|
57
|
+
iso: "pt-PT",
|
|
58
|
+
},
|
|
59
|
+
de: {
|
|
60
|
+
short: "De",
|
|
61
|
+
full: "Deutsch",
|
|
62
|
+
iso: "de-DE",
|
|
63
|
+
},
|
|
64
|
+
am: {
|
|
65
|
+
short: "Am",
|
|
66
|
+
full: "Հայերեն",
|
|
67
|
+
iso: "hy-AM",
|
|
68
|
+
},
|
|
69
|
+
az: {
|
|
70
|
+
short: "Az",
|
|
71
|
+
full: "Azərbaycan",
|
|
72
|
+
iso: "az-AZ",
|
|
73
|
+
},
|
|
74
|
+
fr: {
|
|
75
|
+
short: "Fr",
|
|
76
|
+
full: "Français",
|
|
77
|
+
iso: "fr-FR",
|
|
78
|
+
},
|
|
79
|
+
it: {
|
|
80
|
+
short: "It",
|
|
81
|
+
full: "Italiano",
|
|
82
|
+
iso: "it-IT",
|
|
83
|
+
},
|
|
84
|
+
ja: {
|
|
85
|
+
short: "Ja",
|
|
86
|
+
full: "日本語",
|
|
87
|
+
iso: "ja-JP",
|
|
88
|
+
},
|
|
89
|
+
he: {
|
|
90
|
+
short: "He",
|
|
91
|
+
full: "עברית",
|
|
92
|
+
iso: "he-IL",
|
|
93
|
+
},
|
|
94
|
+
ka: {
|
|
95
|
+
short: "Ka",
|
|
96
|
+
full: "ქართული",
|
|
97
|
+
iso: "ka-GE",
|
|
98
|
+
},
|
|
99
|
+
kr: {
|
|
100
|
+
short: "Kr",
|
|
101
|
+
full: "한국어",
|
|
102
|
+
iso: "kr-KR",
|
|
103
|
+
},
|
|
104
|
+
nl: {
|
|
105
|
+
short: "Nl",
|
|
106
|
+
full: "Nederlands",
|
|
107
|
+
iso: "nl-NL",
|
|
108
|
+
},
|
|
109
|
+
sv: {
|
|
110
|
+
short: "Sv",
|
|
111
|
+
full: "Svenska",
|
|
112
|
+
iso: "sv-SE",
|
|
113
|
+
},
|
|
114
|
+
tr: {
|
|
115
|
+
short: "Tr",
|
|
116
|
+
full: "Türkçe",
|
|
117
|
+
iso: "tr-TR",
|
|
118
|
+
},
|
|
119
|
+
zh: {
|
|
120
|
+
short: "Zh",
|
|
121
|
+
full: "中文",
|
|
122
|
+
iso: "zh-CN",
|
|
123
|
+
},
|
|
124
|
+
};
|