@allurereport/web-classic 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--old.cjs +18 -0
- package/.babelrc.js +46 -0
- package/.eslintrc--old.cjs +125 -0
- package/.eslintrc.cjs +22 -0
- package/README.md +27 -0
- package/dist/multi/10.app-970f027d.js +1 -0
- package/dist/multi/222.app-970f027d.js +1 -0
- package/dist/multi/26.app-970f027d.js +1 -0
- package/dist/multi/302.app-970f027d.js +1 -0
- package/dist/multi/304.app-970f027d.js +1 -0
- package/dist/multi/369.app-970f027d.js +1 -0
- package/dist/multi/389.app-970f027d.js +1 -0
- package/dist/multi/498.app-970f027d.js +1 -0
- package/dist/multi/60.app-970f027d.js +1 -0
- package/dist/multi/643.app-970f027d.js +1 -0
- package/dist/multi/671.app-970f027d.js +1 -0
- package/dist/multi/725.app-970f027d.js +1 -0
- package/dist/multi/770.app-970f027d.js +1 -0
- package/dist/multi/848.app-970f027d.js +1 -0
- package/dist/multi/853.app-970f027d.js +1 -0
- package/dist/multi/872.app-970f027d.js +1 -0
- package/dist/multi/895.app-970f027d.js +1 -0
- package/dist/multi/920.app-970f027d.js +1 -0
- package/dist/multi/979.app-970f027d.js +1 -0
- package/dist/multi/991.app-970f027d.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-970f027d.js +2 -0
- package/dist/multi/app-970f027d.js.LICENSE.txt +25 -0
- package/dist/multi/manifest.json +28 -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-970f027d.css +283 -0
- package/dist/single/app-2babff54.js +2 -0
- package/dist/single/app-2babff54.js.LICENSE.txt +25 -0
- package/dist/single/manifest.json +3 -0
- package/package--old.json +106 -0
- package/package.json +107 -0
- package/postcss.config.js +5 -0
- package/src/assets/scss/_common.scss +142 -0
- package/src/assets/scss/code.scss +71 -0
- package/src/assets/scss/day.scss +51 -0
- package/src/assets/scss/fonts.scss +3 -0
- package/src/assets/scss/index.scss +9 -0
- package/src/assets/scss/night.scss +61 -0
- package/src/assets/scss/palette.scss +393 -0
- package/src/assets/scss/theme.scss +117 -0
- package/src/assets/scss/typography.scss +218 -0
- package/src/assets/scss/vars.scss +8 -0
- package/src/components/ArrowButton/index.tsx +36 -0
- package/src/components/ArrowButton/styles.scss +35 -0
- package/src/components/BaseLayout/index.tsx +23 -0
- package/src/components/BaseLayout/styles.scss +63 -0
- package/src/components/Behaviors/BehaviorsList.tsx +67 -0
- package/src/components/Behaviors/index.tsx +60 -0
- package/src/components/Behaviors/styles.scss +196 -0
- package/src/components/Categories/CategoriesList.tsx +67 -0
- package/src/components/Categories/index.tsx +60 -0
- package/src/components/Categories/styles.scss +196 -0
- package/src/components/Footer/FooterLogo.tsx +16 -0
- package/src/components/Footer/FooterVersion.tsx +33 -0
- package/src/components/Footer/index.tsx +13 -0
- package/src/components/Footer/styles.scss +14 -0
- package/src/components/Graphs/index.tsx +2 -0
- package/src/components/Header/index.tsx +14 -0
- package/src/components/Header/styles.scss +26 -0
- package/src/components/HeaderActions/Filters.tsx +90 -0
- package/src/components/HeaderActions/HeaderActions.tsx +59 -0
- package/src/components/HeaderActions/SortBy.tsx +128 -0
- package/src/components/HeaderActions/styles.scss +82 -0
- package/src/components/LanguagePicker/index.tsx +41 -0
- package/src/components/LanguagePicker/styles.scss +3 -0
- package/src/components/MainReport/index.tsx +19 -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/ModalView.hbs +13 -0
- package/src/components/Modal/ModalView.js +43 -0
- package/src/components/Modal/index.tsx +174 -0
- package/src/components/Modal/styles.scss +126 -0
- package/src/components/Overview/index.tsx +9 -0
- package/src/components/Packages/PackagesList.tsx +67 -0
- package/src/components/Packages/index.tsx +59 -0
- package/src/components/Packages/styles.scss +196 -0
- package/src/components/ReportBody/Filters.tsx +92 -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 +71 -0
- package/src/components/ReportBody/styles.scss +64 -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 +49 -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 +54 -0
- package/src/components/SideBySide/styles.scss +59 -0
- package/src/components/SideNav/SideNav.tsx +78 -0
- package/src/components/SideNav/SideNavView.hbs +39 -0
- package/src/components/SideNav/SideNavView.js +81 -0
- package/src/components/SideNav/styles.scss +126 -0
- package/src/components/Suites/index.tsx +62 -0
- package/src/components/Suites/styles.scss +10 -0
- package/src/components/Tabs/index.tsx +33 -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 +23 -0
- package/src/components/TestResult/TestResultDropdown/styles.scss +34 -0
- package/src/components/TestResult/TestResultEmpty/index.tsx +33 -0
- package/src/components/TestResult/TestResultEmpty/styles.scss +25 -0
- package/src/components/TestResult/TestResultError/index.tsx +48 -0
- package/src/components/TestResult/TestResultError/styles.scss +51 -0
- package/src/components/TestResult/TestResultHeader/index.tsx +53 -0
- package/src/components/TestResult/TestResultHeader/styles.scss +43 -0
- package/src/components/TestResult/TestResultHistory/TestResultHistoryItem.tsx +67 -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 +79 -0
- package/src/components/TestResult/TestResultInfo/styles.scss +50 -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 +40 -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 +49 -0
- package/src/components/TestResult/TestResultRetriesView/index.tsx +20 -0
- package/src/components/TestResult/TestResultRetriesView/styles.scss +69 -0
- package/src/components/TestResult/TestResultSetup/index.tsx +49 -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 +26 -0
- package/src/components/TestResult/TestResultStatus/styles.scss +36 -0
- package/src/components/TestResult/TestResultSteps/HtmlAttachmentPreview.tsx +12 -0
- package/src/components/TestResult/TestResultSteps/attachment.tsx +68 -0
- package/src/components/TestResult/TestResultSteps/attachmentCode.tsx +20 -0
- package/src/components/TestResult/TestResultSteps/attachmentImage.tsx +32 -0
- package/src/components/TestResult/TestResultSteps/attachmentVideo.tsx +15 -0
- package/src/components/TestResult/TestResultSteps/index.tsx +49 -0
- package/src/components/TestResult/TestResultSteps/styles.scss +225 -0
- package/src/components/TestResult/TestResultSteps/testResultAttachment.tsx +77 -0
- package/src/components/TestResult/TestResultSteps/testResultAttachmentInfo.tsx +83 -0
- package/src/components/TestResult/TestResultSteps/testResultStep.tsx +78 -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 +59 -0
- package/src/components/TestResult/TestResultTabs/styles.scss +76 -0
- package/src/components/TestResult/TestResultTeardown/index.tsx +49 -0
- package/src/components/TestResult/TestResultView.hbs +32 -0
- package/src/components/TestResult/TestResultView.js +90 -0
- package/src/components/TestResult/index.tsx +54 -0
- package/src/components/TestResult/styles.scss +29 -0
- package/src/components/TestResultView/index.tsx +31 -0
- package/src/components/ThemeButton/ThemeButton.tsx +20 -0
- package/src/components/Timeline/index.tsx +2 -0
- package/src/components/Tree/Tree.tsx +76 -0
- package/src/components/Tree/TreeHeader.tsx +82 -0
- package/src/components/Tree/TreeItem.tsx +49 -0
- package/src/components/Tree/TreeItemIcon.tsx +32 -0
- package/src/components/Tree/index.tsx +60 -0
- package/src/components/Tree/styles.scss +185 -0
- package/src/favicon.ico +0 -0
- package/src/index.html +40 -0
- package/src/index.js +52 -0
- package/src/index.tsx +60 -0
- package/src/mixins.scss +128 -0
- package/src/rtl.scss +19 -0
- package/src/stores/behaviors.ts +127 -0
- package/src/stores/categories.ts +127 -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/locale.ts +83 -0
- package/src/stores/packages.ts +127 -0
- package/src/stores/router.ts +55 -0
- package/src/stores/stats.ts +36 -0
- package/src/stores/tabs.ts +7 -0
- package/src/stores/testResults.ts +66 -0
- package/src/stores/theme.ts +33 -0
- package/src/stores/tree.ts +127 -0
- package/src/stores/types.ts +5 -0
- package/src/styles.scss +91 -0
- package/src/translations/am.json +127 -0
- package/src/translations/az.json +127 -0
- package/src/translations/br.json +214 -0
- package/src/translations/constants.ts +124 -0
- package/src/translations/de.json +127 -0
- package/src/translations/en.json +128 -0
- package/src/translations/es.json +118 -0
- package/src/translations/fr.json +118 -0
- package/src/translations/he.json +118 -0
- package/src/translations/isv.json +216 -0
- package/src/translations/it.json +118 -0
- package/src/translations/ja.json +118 -0
- package/src/translations/ka.json +118 -0
- package/src/translations/kr.json +118 -0
- package/src/translations/nl.json +118 -0
- package/src/translations/pl.json +116 -0
- package/src/translations/pt.json +118 -0
- package/src/translations/ru.json +116 -0
- package/src/translations/sv.json +118 -0
- package/src/translations/tr.json +118 -0
- package/src/translations/zh.json +118 -0
- package/src/types/globals.d.ts +13 -0
- package/src/types/window.d.ts +8 -0
- package/src/utils/attachments.ts +156 -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/navigate.ts +7 -0
- package/src/utils/statuses.js +1 -0
- package/src/utils/statuses.ts +55 -0
- package/src/utils/time.ts +17 -0
- package/src/utils/treeFilters.ts +139 -0
- package/src/variables.scss +71 -0
- package/test/utils/treeFilters.test.ts +448 -0
- package/tsconfig.json +25 -0
- package/types.d.ts +85 -0
- package/vitest.config.ts +18 -0
- package/webpack.config--old.js +127 -0
- package/webpack.config.js +108 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
@import "../../variables.scss";
|
|
2
|
+
|
|
3
|
+
.side-nav {
|
|
4
|
+
background: $app-nav-bg;
|
|
5
|
+
width: $sidebar-full-width;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
height: 100vh;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
min-width: $sidebar-full-width;
|
|
11
|
+
|
|
12
|
+
.head {
|
|
13
|
+
margin: $gap-size 0;
|
|
14
|
+
padding-bottom: 5px;
|
|
15
|
+
border-bottom: 1px solid $sidebar-separator-color;
|
|
16
|
+
}
|
|
17
|
+
.icon {
|
|
18
|
+
flex: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.brand {
|
|
22
|
+
color: $sidebar-brand-color;
|
|
23
|
+
text-decoration: none;
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
font-size: 26px;
|
|
27
|
+
font-weight: bold;
|
|
28
|
+
margin-bottom: 10px;
|
|
29
|
+
transition: all 0.3s;
|
|
30
|
+
background-size: auto auto;
|
|
31
|
+
justify-content: flex-start;
|
|
32
|
+
gap: 8px;
|
|
33
|
+
padding: 16px 8px 0 16px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.menu {
|
|
37
|
+
margin: 0;
|
|
38
|
+
left: 0;
|
|
39
|
+
padding: 0;
|
|
40
|
+
list-style-type: none;
|
|
41
|
+
transition: width 0.3s;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.footer {
|
|
45
|
+
margin-top: auto;
|
|
46
|
+
margin-bottom: $footer-gap-size;
|
|
47
|
+
padding-left: 0;
|
|
48
|
+
padding-right: 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.item {
|
|
52
|
+
display: block;
|
|
53
|
+
}
|
|
54
|
+
.language-picker {
|
|
55
|
+
display: flex;
|
|
56
|
+
justify-content: center;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.link,
|
|
60
|
+
.collapse {
|
|
61
|
+
line-height: 24px;
|
|
62
|
+
color: $text-muted-color;
|
|
63
|
+
text-decoration: none;
|
|
64
|
+
position: relative;
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
gap: 8px;
|
|
68
|
+
padding: 8px 0 8px 16px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.link-active {
|
|
72
|
+
color: $sidebar-active-text-color;
|
|
73
|
+
border-right: 4px solid $sidebar-active-accent-color;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.link:hover {
|
|
77
|
+
color: $sidebar-hover-text-color;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.language-small {
|
|
81
|
+
display: block;
|
|
82
|
+
text-transform: capitalize;
|
|
83
|
+
padding: 0 5px;
|
|
84
|
+
text-overflow: ".";
|
|
85
|
+
max-width: 30px;
|
|
86
|
+
margin: 0 auto;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.collapse {
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.collapse-icon {
|
|
94
|
+
transform: rotate(90deg);
|
|
95
|
+
transition: transform 200ms;
|
|
96
|
+
}
|
|
97
|
+
.collapse .icon {
|
|
98
|
+
left: $gap-size + 5px;
|
|
99
|
+
transition: transform 0.1s;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&.collapsed {
|
|
103
|
+
width: $sidebar-collapsed;
|
|
104
|
+
min-width: $sidebar-collapsed;
|
|
105
|
+
|
|
106
|
+
.collapse-icon {
|
|
107
|
+
transform: rotate(-90deg);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.text,
|
|
111
|
+
.brand-text {
|
|
112
|
+
visibility: hidden;
|
|
113
|
+
opacity: 0;
|
|
114
|
+
white-space: nowrap;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.collapse,
|
|
118
|
+
.link {
|
|
119
|
+
white-space: nowrap;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.strut {
|
|
124
|
+
flex: 1;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Heading, Loadable, PageLoader } from "@allurereport/web-components";
|
|
2
|
+
import { useEffect } from "preact/compat";
|
|
3
|
+
import { HeaderActions } from "@/components/HeaderActions/HeaderActions";
|
|
4
|
+
import SideBySide from "@/components/SideBySide";
|
|
5
|
+
import TestResult from "@/components/TestResult";
|
|
6
|
+
import { TreeList } from "@/components/Tree";
|
|
7
|
+
import { fetchStats, useI18n } from "@/stores";
|
|
8
|
+
import { route } from "@/stores/router";
|
|
9
|
+
import { fetchTestResult, testResultStore } from "@/stores/testResults";
|
|
10
|
+
import { fetchTreeData, treeStore } from "@/stores/tree";
|
|
11
|
+
import * as styles from "./styles.scss";
|
|
12
|
+
|
|
13
|
+
const Suites = () => {
|
|
14
|
+
const { params } = route.value;
|
|
15
|
+
const { testResultId } = params;
|
|
16
|
+
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
fetchTreeData();
|
|
19
|
+
}, []);
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (testResultId) {
|
|
22
|
+
fetchTestResult(testResultId);
|
|
23
|
+
}
|
|
24
|
+
}, [testResultId]);
|
|
25
|
+
|
|
26
|
+
const testResult = testResultId ? (
|
|
27
|
+
<Loadable
|
|
28
|
+
source={testResultStore}
|
|
29
|
+
renderLoader={() => <PageLoader />}
|
|
30
|
+
transformData={(data) => data[testResultId]}
|
|
31
|
+
renderData={(testResultItem) => (
|
|
32
|
+
<>
|
|
33
|
+
<div className={styles.wrapper} key={testResultItem?.id}>
|
|
34
|
+
<TestResult testResult={testResultItem} />
|
|
35
|
+
</div>
|
|
36
|
+
</>
|
|
37
|
+
)}
|
|
38
|
+
/>
|
|
39
|
+
) : (
|
|
40
|
+
<div className={styles.wrapper}>
|
|
41
|
+
<Loadable source={treeStore} renderLoader={() => <PageLoader />} renderData={() => <div />} />
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
const SuitesList = () => {
|
|
46
|
+
const { t } = useI18n("nav");
|
|
47
|
+
return (
|
|
48
|
+
<div className={styles.suites}>
|
|
49
|
+
<Heading size={"s"} className={styles["suites-title"]}>
|
|
50
|
+
{t("suites")}
|
|
51
|
+
</Heading>
|
|
52
|
+
|
|
53
|
+
<HeaderActions />
|
|
54
|
+
<TreeList />
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
return <SideBySide left={<SuitesList />} right={testResult} />;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export default Suites;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Text } from "@allurereport/web-components";
|
|
2
|
+
import { type ComponentChildren } from "preact";
|
|
3
|
+
import { currentTab, setCurrentTab } from "@/stores/tabs";
|
|
4
|
+
import * as styles from "./styles.scss";
|
|
5
|
+
|
|
6
|
+
export const Tabs = (props: { children: ComponentChildren; initialTab?: string }) => {
|
|
7
|
+
if (props.initialTab) {
|
|
8
|
+
setCurrentTab(props.initialTab);
|
|
9
|
+
}
|
|
10
|
+
return <>{props.children}</>;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const TabsList = (props: { children: ComponentChildren }) => {
|
|
14
|
+
return <div className={styles.tabsList}>{props.children}</div>;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const Tab = (props: { id: string; children: ComponentChildren }) => {
|
|
18
|
+
const { id, children, ...rest } = props;
|
|
19
|
+
const isCurrentTab = currentTab.value === id;
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<button
|
|
23
|
+
{...rest}
|
|
24
|
+
className={styles.tab}
|
|
25
|
+
onClick={() => setCurrentTab(id)}
|
|
26
|
+
aria-current={isCurrentTab ? true : undefined}
|
|
27
|
+
>
|
|
28
|
+
<Text type="paragraph" size="m" bold>
|
|
29
|
+
{children}
|
|
30
|
+
</Text>
|
|
31
|
+
</button>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
.tabsList {
|
|
2
|
+
background-color: var(--bg-base-secondary);
|
|
3
|
+
padding: 2px;
|
|
4
|
+
border-radius: 8px;
|
|
5
|
+
display: flex;
|
|
6
|
+
overflow-x: auto;
|
|
7
|
+
flex-grow: 0;
|
|
8
|
+
max-width: max-content;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.tab {
|
|
12
|
+
background-color: var(--bg-control-flat);
|
|
13
|
+
color: var(--on-text-primary);
|
|
14
|
+
border-radius: 6px;
|
|
15
|
+
border: 1px solid transparent;
|
|
16
|
+
padding: 2px 8px;
|
|
17
|
+
margin: 0;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
user-select: none;
|
|
20
|
+
flex-shrink: 0;
|
|
21
|
+
transform: scale(1);
|
|
22
|
+
outline-offset: 1px;
|
|
23
|
+
outline: 1px solid transparent;
|
|
24
|
+
transition:
|
|
25
|
+
transform var(--interaction-transition-duration) ease-out,
|
|
26
|
+
outline var(--interaction-transition-duration) ease-out,
|
|
27
|
+
background-color var(--color-change-transition-duration),
|
|
28
|
+
border-color var(--color-change-transition-duration);
|
|
29
|
+
|
|
30
|
+
&[aria-current] {
|
|
31
|
+
background-color: var(--bg-base-modal);
|
|
32
|
+
border-color: var(--on-border-primary);
|
|
33
|
+
cursor: default;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:hover:not([aria-current]) {
|
|
37
|
+
background-color: var(--bg-control-flat-medium);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:active:not([aria-current]) {
|
|
41
|
+
background-color: var(--bg-control-flat-heavy);
|
|
42
|
+
transform: scale(0.94);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:focus {
|
|
46
|
+
outline: 1px solid transparent;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:focus-visible {
|
|
50
|
+
outline: 1px solid var(--ad-other-focus);
|
|
51
|
+
|
|
52
|
+
&:not([aria-current]) {
|
|
53
|
+
background-color: var(--bg-control-flat-medium);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AttachmentTestStepResult } from "@allurereport/core-api";
|
|
2
|
+
import type { FunctionalComponent } from "preact";
|
|
3
|
+
import type { AwesomeTestResult } from "types";
|
|
4
|
+
import { TestResultAttachment } from "@/components/TestResult/TestResultSteps/testResultAttachment";
|
|
5
|
+
import { useI18n } from "@/stores";
|
|
6
|
+
import * as styles from "./styles.scss";
|
|
7
|
+
|
|
8
|
+
export type TestResultAttachmentViewProps = {
|
|
9
|
+
testResult?: AwesomeTestResult;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const TestResultAttachmentView: FunctionalComponent<TestResultAttachmentViewProps> = ({ testResult }) => {
|
|
13
|
+
const { attachments } = testResult ?? {};
|
|
14
|
+
const { t } = useI18n("empty");
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<div className={styles["test-result-attachments-view"]}>
|
|
18
|
+
{attachments.length ? (
|
|
19
|
+
attachments?.map((attach, key) => (
|
|
20
|
+
<TestResultAttachment item={attach as AttachmentTestStepResult} key={key} stepIndex={key + 1} />
|
|
21
|
+
))
|
|
22
|
+
) : (
|
|
23
|
+
<div className={styles["test-result-empty"]}>{t("no-attachments-results")}</div>
|
|
24
|
+
)}
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Text } from "@allurereport/web-components";
|
|
2
|
+
import type { FunctionalComponent } from "preact";
|
|
3
|
+
import { useState } from "preact/hooks";
|
|
4
|
+
import type { AwesomeTestResult } from "types";
|
|
5
|
+
import { MetadataButton } from "@/components/MetadataButton";
|
|
6
|
+
import * as styles from "./styles.scss";
|
|
7
|
+
|
|
8
|
+
export type TestResultDescriptionProps = {
|
|
9
|
+
description: AwesomeTestResult["description"];
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const TestResultDescription: FunctionalComponent<TestResultDescriptionProps> = ({ description }) => {
|
|
13
|
+
const [isOpen, setIsOpen] = useState<boolean>(true);
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<div className={styles["test-result-description"]}>
|
|
17
|
+
<div className={styles["test-result-description-wrapper"]}>
|
|
18
|
+
<MetadataButton title={"Description"} setIsOpen={setIsOpen} isOpened={isOpen} />
|
|
19
|
+
{isOpen && (
|
|
20
|
+
<Text tag={"p"} className={styles["test-result-description-text"]}>
|
|
21
|
+
{description || "Description mock"}
|
|
22
|
+
</Text>
|
|
23
|
+
)}
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Counter, SvgIcon, Text, allureIcons } from "@allurereport/web-components";
|
|
2
|
+
import { type FunctionalComponent } from "preact";
|
|
3
|
+
import { ArrowButton } from "@/components/ArrowButton";
|
|
4
|
+
import * as styles from "./styles.scss";
|
|
5
|
+
|
|
6
|
+
export const TestResultDropdown: FunctionalComponent<{
|
|
7
|
+
isOpened: boolean;
|
|
8
|
+
setIsOpen: (isOpened: boolean) => void;
|
|
9
|
+
title: string;
|
|
10
|
+
icon: string;
|
|
11
|
+
counter: number;
|
|
12
|
+
}> = ({ isOpened, setIsOpen, title, icon, counter }) => {
|
|
13
|
+
return (
|
|
14
|
+
<div className={styles["test-result-dropdown"]} onClick={() => setIsOpen(!isOpened)}>
|
|
15
|
+
<ArrowButton isOpened={isOpened} icon={allureIcons.arrowsChevronDown} />
|
|
16
|
+
<div className={styles["test-result-dropdown-wrap"]}>
|
|
17
|
+
<SvgIcon id={icon} />
|
|
18
|
+
<Text bold>{title}</Text>
|
|
19
|
+
<Counter count={counter} size="s" />
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.test-result-dropdown {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: space-between;
|
|
4
|
+
padding: 1px 8px 1px 6px;
|
|
5
|
+
border-radius: 6px;
|
|
6
|
+
transition: background-color 300ms;
|
|
7
|
+
align-items: center;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
width: 100%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.test-result-step-chevron {
|
|
13
|
+
width: 12px;
|
|
14
|
+
height: 12px;
|
|
15
|
+
transform: rotate(-90deg);
|
|
16
|
+
transition: transform 200ms;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.test-result-step-chevron-open {
|
|
20
|
+
transform: rotate(0deg);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.test-result-dropdown-wrap {
|
|
24
|
+
display: flex;
|
|
25
|
+
gap: 8px;
|
|
26
|
+
width: 100%;
|
|
27
|
+
align-items: center;
|
|
28
|
+
padding: 6px 8px 6px 6px;
|
|
29
|
+
border-radius: 4px;
|
|
30
|
+
|
|
31
|
+
&:hover {
|
|
32
|
+
background: var(--bg-control-flat-medium);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SvgIcon, allureIcons } from "@allurereport/web-components";
|
|
2
|
+
import { Text } from "@allurereport/web-components";
|
|
3
|
+
import * as baseStyles from "@/components/BaseLayout/styles.scss";
|
|
4
|
+
import { TestResultInfo } from "@/components/TestResult/TestResultInfo";
|
|
5
|
+
import * as styles from "./styles.scss";
|
|
6
|
+
|
|
7
|
+
const TestResultThumb = () => {
|
|
8
|
+
return (
|
|
9
|
+
<div className={styles["test-result-thumb"]}>
|
|
10
|
+
<div className={styles["test-result-thumb-wrapper"]}>
|
|
11
|
+
<SvgIcon
|
|
12
|
+
size={"m"}
|
|
13
|
+
width={"32px"}
|
|
14
|
+
height={"32px"}
|
|
15
|
+
id={allureIcons.lineDevCodeSquare}
|
|
16
|
+
className={styles["test-result-thumb-icon"]}
|
|
17
|
+
/>
|
|
18
|
+
<Text className={styles["test-result-thumb-text"]}>No test case results</Text>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const TestResultEmpty = () => {
|
|
25
|
+
return (
|
|
26
|
+
<div className={baseStyles.content}>
|
|
27
|
+
<TestResultInfo />
|
|
28
|
+
<TestResultThumb />
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default TestResultEmpty;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.test-result-thumb {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: center;
|
|
4
|
+
flex-wrap: wrap;
|
|
5
|
+
min-height: 720px;
|
|
6
|
+
align-items: center;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.test-result-thumb-wrapper {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
align-items: center;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.test-result-thumb-icon {
|
|
16
|
+
width: 32px;
|
|
17
|
+
height: 32px;
|
|
18
|
+
margin-bottom: 16px;
|
|
19
|
+
flex: 1 1 auto;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.test-result-thumb-text {
|
|
23
|
+
color: var(--on-text-secondary);
|
|
24
|
+
flex: 1 1 auto;
|
|
25
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Code, IconButton, Text, TooltipWrapper, allureIcons } from "@allurereport/web-components";
|
|
2
|
+
import { type FunctionalComponent } from "preact";
|
|
3
|
+
import { useState } from "preact/hooks";
|
|
4
|
+
import { useI18n } from "@/stores/locale";
|
|
5
|
+
import { copyToClipboard } from "@/utils/copyToClipboard";
|
|
6
|
+
import * as styles from "./styles.scss";
|
|
7
|
+
|
|
8
|
+
const TestResultErrorTrace = ({ trace }: { trace: string }) => {
|
|
9
|
+
return (
|
|
10
|
+
<div data-testid="test-result-error-trace" className={styles["test-result-error-trace"]}>
|
|
11
|
+
<Code size={"s"} type={"ui"}>
|
|
12
|
+
<pre>{trace}</pre>
|
|
13
|
+
</Code>
|
|
14
|
+
</div>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const TestResultError: FunctionalComponent<{ message: string; trace: string }> = ({ message, trace }) => {
|
|
19
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
20
|
+
const { t } = useI18n("ui");
|
|
21
|
+
const { t: tooltip } = useI18n("controls");
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<div data-testid="test-result-error" className={styles["test-result-error"]}>
|
|
25
|
+
<div data-testid="test-result-error-header" className={styles["test-result-error-header"]}>
|
|
26
|
+
<Text tag={"p"} size={"m"} bold className={styles["test-result-error-text"]}>
|
|
27
|
+
{t("error")}
|
|
28
|
+
</Text>
|
|
29
|
+
<TooltipWrapper tooltipText={tooltip("clipboard")} tooltipTextAfterClick={tooltip("clipboardSuccess")}>
|
|
30
|
+
<IconButton
|
|
31
|
+
style={"ghost"}
|
|
32
|
+
size={"s"}
|
|
33
|
+
icon={allureIcons.lineGeneralCopy3}
|
|
34
|
+
onClick={() => {
|
|
35
|
+
copyToClipboard(message);
|
|
36
|
+
}}
|
|
37
|
+
/>
|
|
38
|
+
</TooltipWrapper>
|
|
39
|
+
</div>
|
|
40
|
+
<div className={styles["test-result-error-message"]} onClick={() => setIsOpen(!isOpen)}>
|
|
41
|
+
<Code data-testid="test-result-error-message" size={"s"}>
|
|
42
|
+
<pre>{message}</pre>
|
|
43
|
+
</Code>
|
|
44
|
+
</div>
|
|
45
|
+
{isOpen && trace && <TestResultErrorTrace trace={trace} />}
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
}
|
|
31
|
+
|
|
32
|
+
.test-result-error-trace {
|
|
33
|
+
margin-top: 8px;
|
|
34
|
+
padding-left: 8px;
|
|
35
|
+
|
|
36
|
+
pre {
|
|
37
|
+
overflow: scroll;
|
|
38
|
+
padding-bottom: 24px;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.test-result-error-message {
|
|
43
|
+
padding: 8px;
|
|
44
|
+
border-radius: 8px;
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
transition: background-color 300ms;
|
|
47
|
+
|
|
48
|
+
&:hover {
|
|
49
|
+
background: var(--bg-alpha-capella);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { IconButton, SvgIcon, Text, allureIcons } from "@allurereport/web-components";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import type { FunctionalComponent } from "preact";
|
|
4
|
+
import type { AwesomeTestResult } from "types";
|
|
5
|
+
import { LanguagePicker } from "@/components/LanguagePicker";
|
|
6
|
+
import { ThemeButton } from "@/components/ThemeButton/ThemeButton";
|
|
7
|
+
import { navigateTo } from "@/index";
|
|
8
|
+
import * as styles from "./styles.scss";
|
|
9
|
+
|
|
10
|
+
export type TestResultHeaderProps = {
|
|
11
|
+
testResult?: AwesomeTestResult;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const TestResultHeader: FunctionalComponent<TestResultHeaderProps> = ({ testResult }) => {
|
|
15
|
+
const { breadcrumbs, name } = testResult || {};
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<div className={styles.above}>
|
|
19
|
+
<div className={styles["test-result-breadcrumbs"]}>
|
|
20
|
+
<div className={clsx(styles["test-result-breadcrumb"], styles["test-result-home"])}>
|
|
21
|
+
<IconButton
|
|
22
|
+
icon={allureIcons.lineGeneralHomeLine}
|
|
23
|
+
size={"s"}
|
|
24
|
+
style={"ghost"}
|
|
25
|
+
className={styles["test-result-breadcrumb-link"]}
|
|
26
|
+
onClick={() => navigateTo("/")}
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
29
|
+
{Boolean(breadcrumbs?.length) &&
|
|
30
|
+
breadcrumbs?.[0]?.map((item, key) => {
|
|
31
|
+
return (
|
|
32
|
+
<div className={styles["test-result-breadcrumb"]} key={key}>
|
|
33
|
+
<SvgIcon id={allureIcons.lineArrowsChevronDown} className={styles["test-result-breadcrumb-arrow"]} />
|
|
34
|
+
<Text size={"s"} bold className={styles["test-result-breadcrumb-title"]}>
|
|
35
|
+
{item}
|
|
36
|
+
</Text>
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
})}
|
|
40
|
+
<div className={styles["test-result-breadcrumb"]}>
|
|
41
|
+
{name && (
|
|
42
|
+
<SvgIcon id={allureIcons.lineArrowsChevronDown} className={styles["test-result-breadcrumb-arrow"]} />
|
|
43
|
+
)}
|
|
44
|
+
<Text size={"s"} bold className={styles["test-result-breadcrumb-title"]}>
|
|
45
|
+
{name}
|
|
46
|
+
</Text>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
<LanguagePicker />
|
|
50
|
+
<ThemeButton />
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.test-result-breadcrumbs {
|
|
2
|
+
margin-right: auto;
|
|
3
|
+
display: flex;
|
|
4
|
+
gap: 4px;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
white-space: nowrap;
|
|
7
|
+
text-overflow: ellipsis;
|
|
8
|
+
}
|
|
9
|
+
.test-result-home {
|
|
10
|
+
flex: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.test-result-breadcrumb-link {
|
|
14
|
+
color: var(--on-text-secondary);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.test-result-breadcrumb {
|
|
18
|
+
display: flex;
|
|
19
|
+
gap: 4px;
|
|
20
|
+
align-items: center;
|
|
21
|
+
color: var(--on-text-secondary);
|
|
22
|
+
white-space: nowrap;
|
|
23
|
+
text-overflow: ellipsis;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.test-result-breadcrumb-title {
|
|
28
|
+
white-space: nowrap;
|
|
29
|
+
text-overflow: ellipsis;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.above {
|
|
34
|
+
margin-bottom: 12px;
|
|
35
|
+
display: flex;
|
|
36
|
+
width: 100%;
|
|
37
|
+
justify-content: space-between;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: 12px;
|
|
40
|
+
}
|
|
41
|
+
.test-result-breadcrumb-arrow {
|
|
42
|
+
transform: rotate(-90deg);
|
|
43
|
+
}
|