@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,174 @@
|
|
|
1
|
+
import type { AttachmentTestStepResult } from "@allurereport/core-api";
|
|
2
|
+
import { Button, Heading, IconButton, TooltipWrapper, allureIcons } from "@allurereport/web-components";
|
|
3
|
+
import { signal } from "@preact/signals";
|
|
4
|
+
import type { FunctionalComponent, VNode } from "preact";
|
|
5
|
+
import { useEffect } from "preact/hooks";
|
|
6
|
+
import Prism from "prismjs";
|
|
7
|
+
import type { AwesomeTestResult } from "types";
|
|
8
|
+
import { Attachment } from "@/components/TestResult/TestResultSteps/attachment";
|
|
9
|
+
import { attachmentType, downloadAttachment, openAttachmentInNewTab } from "@/utils/attachments";
|
|
10
|
+
import * as styles from "./styles.scss";
|
|
11
|
+
|
|
12
|
+
export const isModalOpen = signal(false);
|
|
13
|
+
|
|
14
|
+
interface ModalDataProps {
|
|
15
|
+
data: AttachmentTestStepResult;
|
|
16
|
+
component: VNode;
|
|
17
|
+
preview?: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const modalData = signal<ModalDataProps>({
|
|
21
|
+
data: null,
|
|
22
|
+
preview: false,
|
|
23
|
+
component: null,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const openModal = ({ data, component, preview }: ModalDataProps) => {
|
|
27
|
+
modalData.value = {
|
|
28
|
+
data,
|
|
29
|
+
component,
|
|
30
|
+
preview,
|
|
31
|
+
};
|
|
32
|
+
isModalOpen.value = true;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const closeModal = () => {
|
|
36
|
+
isModalOpen.value = false;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const ModalThumb: FunctionalComponent<{ item: AttachmentTestStepResult }> = ({ item, children }) => {
|
|
40
|
+
const isActiveThumb = modalData.value.data?.link?.id === item.link?.id;
|
|
41
|
+
|
|
42
|
+
const showAttach = (showedItem: AttachmentTestStepResult) => {
|
|
43
|
+
openModal({
|
|
44
|
+
data: showedItem,
|
|
45
|
+
component: <Attachment item={showedItem} key={showedItem.link?.id} />,
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<div className={`${styles["modal-thumb"]} ${isActiveThumb ? styles.active : ""}`} onClick={() => showAttach(item)}>
|
|
51
|
+
{children}
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export type ModalGalleryProps = {
|
|
57
|
+
attachments: AttachmentTestStepResult[];
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const ModalGallery: FunctionalComponent<ModalGalleryProps> = ({ attachments = [] }) => {
|
|
61
|
+
const filteredAttachments = attachments.filter(({ link: { contentType } }: AttachmentTestStepResult) => {
|
|
62
|
+
const type = attachmentType(contentType).type;
|
|
63
|
+
|
|
64
|
+
return !["archive", null].includes(type as string);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<div className={styles["modal-gallery"]}>
|
|
69
|
+
{filteredAttachments.map((item, index) => (
|
|
70
|
+
<ModalThumb item={item} key={index}>
|
|
71
|
+
<Attachment item={item} />
|
|
72
|
+
</ModalThumb>
|
|
73
|
+
))}
|
|
74
|
+
</div>
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export type ModalProps = {
|
|
79
|
+
testResult: AwesomeTestResult;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const Modal: FunctionalComponent<ModalProps> = ({ testResult }) => {
|
|
83
|
+
const { link } = modalData.value.data || {};
|
|
84
|
+
const attachName = link?.name ? `${link?.name}` : `${link?.id}${link?.ext}`;
|
|
85
|
+
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
Prism.highlightAll();
|
|
88
|
+
|
|
89
|
+
if (isModalOpen.value) {
|
|
90
|
+
document.body.style.overflow = "hidden";
|
|
91
|
+
} else {
|
|
92
|
+
document.body.style.overflow = "";
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return () => {
|
|
96
|
+
document.body.style.overflow = "";
|
|
97
|
+
};
|
|
98
|
+
}, []);
|
|
99
|
+
|
|
100
|
+
const isImageAttachment = link?.contentType?.startsWith("image");
|
|
101
|
+
const isHtmlAttachment = link?.contentType === "text/html";
|
|
102
|
+
const downloadData = async (e: Event) => {
|
|
103
|
+
e.stopPropagation();
|
|
104
|
+
const { id, ext, contentType } = link || {};
|
|
105
|
+
if (id && ext && contentType) {
|
|
106
|
+
await downloadAttachment(id, ext, contentType);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
const openInNewWindow = async () => {
|
|
110
|
+
const { id, ext, contentType } = link || {};
|
|
111
|
+
await openAttachmentInNewTab(id, ext, contentType);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
if (!isModalOpen.value) {
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return (
|
|
119
|
+
<div className={styles["modal-overlay"]} onClick={closeModal}>
|
|
120
|
+
<div className={styles["modal-content"]} onClick={(e) => e.stopPropagation()}>
|
|
121
|
+
<div className={`${styles["modal-wrapper"]}`}>
|
|
122
|
+
<div className={styles["modal-top"]}>
|
|
123
|
+
<Heading size={"s"}>{attachName}</Heading>
|
|
124
|
+
<div className={styles["modal-buttons"]}>
|
|
125
|
+
{isImageAttachment && (
|
|
126
|
+
<Button
|
|
127
|
+
style={"outline"}
|
|
128
|
+
onClick={openInNewWindow}
|
|
129
|
+
icon={allureIcons.lineGeneralLinkExternal}
|
|
130
|
+
text={"Open in new tab"}
|
|
131
|
+
/>
|
|
132
|
+
)}
|
|
133
|
+
{isHtmlAttachment && (
|
|
134
|
+
<TooltipWrapper tooltipText={"Preview attachment"}>
|
|
135
|
+
<IconButton
|
|
136
|
+
style={"outline"}
|
|
137
|
+
size={"m"}
|
|
138
|
+
iconSize={"s"}
|
|
139
|
+
icon={modalData.value.preview ? allureIcons.viewOff : allureIcons.view}
|
|
140
|
+
onClick={() => {
|
|
141
|
+
modalData.value = {
|
|
142
|
+
...modalData.value,
|
|
143
|
+
preview: !modalData.value.preview,
|
|
144
|
+
};
|
|
145
|
+
}}
|
|
146
|
+
/>
|
|
147
|
+
</TooltipWrapper>
|
|
148
|
+
)}
|
|
149
|
+
<TooltipWrapper tooltipText={"Download attachment"}>
|
|
150
|
+
<IconButton
|
|
151
|
+
style={"outline"}
|
|
152
|
+
size={"m"}
|
|
153
|
+
iconSize={"s"}
|
|
154
|
+
icon={allureIcons.lineGeneralDownloadCloud}
|
|
155
|
+
onClick={(e: MouseEvent) => downloadData(e)}
|
|
156
|
+
/>
|
|
157
|
+
</TooltipWrapper>
|
|
158
|
+
<IconButton iconSize={"m"} style={"ghost"} onClick={closeModal} icon={allureIcons.lineGeneralXClose} />
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
<div className={styles["modal-data"]}>
|
|
162
|
+
<div className={styles["modal-data-component"]} key={modalData.value?.data?.link?.id}>
|
|
163
|
+
{modalData.value?.component}
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
<ModalGallery attachments={testResult.attachments} />
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
);
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
export { openModal, closeModal };
|
|
174
|
+
export default Modal;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
.modal-overlay {
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
right: 0;
|
|
6
|
+
bottom: 0;
|
|
7
|
+
background: var(--ad-other-modal-overlay);
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
z-index: 1000;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.modal-content {
|
|
15
|
+
position: relative;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: 16px;
|
|
21
|
+
max-width: 90%;
|
|
22
|
+
max-height: 90%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.modal-wrapper {
|
|
26
|
+
position: relative;
|
|
27
|
+
background: var(--bg-base-primary);
|
|
28
|
+
max-width: 90%;
|
|
29
|
+
max-height: 80vh;
|
|
30
|
+
width: 90vw;
|
|
31
|
+
min-width: 320px;
|
|
32
|
+
min-height: 320px;
|
|
33
|
+
display: flex;
|
|
34
|
+
border-radius: 16px;
|
|
35
|
+
align-items: center;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
z-index: 1;
|
|
40
|
+
overflow-y: auto;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.modal-data-component {
|
|
44
|
+
flex: 1 1 auto;
|
|
45
|
+
overflow-y: auto;
|
|
46
|
+
pointer-events: all;
|
|
47
|
+
padding-top: 56px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.modal-image {
|
|
51
|
+
max-width: 100%;
|
|
52
|
+
max-height: 100%;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.close-button-wrap {
|
|
56
|
+
position: absolute;
|
|
57
|
+
top: 0;
|
|
58
|
+
right: 0;
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
z-index: 1;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.modal-buttons {
|
|
64
|
+
display: flex;
|
|
65
|
+
gap: 8px;
|
|
66
|
+
margin-left: auto;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.modal-button {
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.modal-data {
|
|
73
|
+
width: 100%;
|
|
74
|
+
height: 100%;
|
|
75
|
+
overflow-y: auto;
|
|
76
|
+
pointer-events: none;
|
|
77
|
+
display: flex;
|
|
78
|
+
position: relative;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.modal-top {
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
justify-content: space-between;
|
|
85
|
+
width: calc(100% - 32px);
|
|
86
|
+
position: absolute;
|
|
87
|
+
top: 16px;
|
|
88
|
+
left: 16px;
|
|
89
|
+
z-index: 1;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.modal-bottom {
|
|
93
|
+
z-index: 1;
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: flex-end;
|
|
97
|
+
width: 100%;
|
|
98
|
+
position: absolute;
|
|
99
|
+
bottom: 0;
|
|
100
|
+
color: var(--gray-neutral-0);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.modal-thumb {
|
|
104
|
+
display: flex;
|
|
105
|
+
justify-content: center;
|
|
106
|
+
width: 64px;
|
|
107
|
+
height: 64px;
|
|
108
|
+
border-radius: 12px;
|
|
109
|
+
background: var(--constant-bg-base-primary-night);
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
border: 1px solid transparent;
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
user-select: none;
|
|
114
|
+
|
|
115
|
+
&.active {
|
|
116
|
+
border: 1px solid var(--constant-on-border-heavy);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.modal-gallery {
|
|
121
|
+
display: flex;
|
|
122
|
+
width: 100%;
|
|
123
|
+
gap: 8px;
|
|
124
|
+
justify-content: center;
|
|
125
|
+
flex-wrap: wrap;
|
|
126
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Loadable, PageLoader } from "@allurereport/web-components";
|
|
2
|
+
import * as styles from "@/components/BaseLayout/styles.scss";
|
|
3
|
+
import { testResultStore } from "@/stores/testResults";
|
|
4
|
+
import { treeStore } from "@/stores/tree";
|
|
5
|
+
|
|
6
|
+
const Overview = () => {
|
|
7
|
+
const testResultId = "";
|
|
8
|
+
};
|
|
9
|
+
export default Overview;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Button, Loadable, PageLoader, Text } from "@allurereport/web-components";
|
|
2
|
+
import { useEffect } from "preact/hooks";
|
|
3
|
+
import type { AwesomeStatus } from "types";
|
|
4
|
+
import Tree from "@/components/Tree/Tree";
|
|
5
|
+
import { useI18n } from "@/stores/locale";
|
|
6
|
+
import {
|
|
7
|
+
clearPackagesFilters,
|
|
8
|
+
filteredPackages,
|
|
9
|
+
noTests,
|
|
10
|
+
noTestsFound,
|
|
11
|
+
packagesStore,
|
|
12
|
+
setPackagesStatus,
|
|
13
|
+
} from "@/stores/packages";
|
|
14
|
+
import { currentTab } from "@/stores/tabs";
|
|
15
|
+
import * as styles from "./styles.scss";
|
|
16
|
+
|
|
17
|
+
export const PackagesList = () => {
|
|
18
|
+
const { t } = useI18n("empty");
|
|
19
|
+
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
setPackagesStatus(currentTab.value as AwesomeStatus);
|
|
22
|
+
}, [currentTab.value]);
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Loadable
|
|
26
|
+
source={packagesStore}
|
|
27
|
+
renderLoader={() => <PageLoader />}
|
|
28
|
+
renderData={() => {
|
|
29
|
+
if (noTests.value) {
|
|
30
|
+
return (
|
|
31
|
+
<div className={styles["tree-list"]}>
|
|
32
|
+
<div className={styles["tree-empty-results"]}>
|
|
33
|
+
<Text className={styles["tree-empty-results-title"]}>{t("no-results")}</Text>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (noTestsFound.value) {
|
|
40
|
+
return (
|
|
41
|
+
<div className={styles["tree-list"]}>
|
|
42
|
+
<div className={styles["tree-empty-results"]}>
|
|
43
|
+
<Text tag="p" className={styles["tree-empty-results-title"]}>
|
|
44
|
+
{t("no-tests-found")}
|
|
45
|
+
</Text>
|
|
46
|
+
<Button
|
|
47
|
+
className={styles["tree-empty-results-clear-button"]}
|
|
48
|
+
type="button"
|
|
49
|
+
text={t("clear-filters")}
|
|
50
|
+
size={"s"}
|
|
51
|
+
style={"outline"}
|
|
52
|
+
onClick={() => clearPackagesFilters()}
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<div className={styles["tree-list"]}>
|
|
61
|
+
<Tree tree={filteredPackages.value} statusFilter={currentTab.value as AwesomeStatus} root />
|
|
62
|
+
</div>
|
|
63
|
+
);
|
|
64
|
+
}}
|
|
65
|
+
/>
|
|
66
|
+
);
|
|
67
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Heading, Loadable, PageLoader } from "@allurereport/web-components";
|
|
2
|
+
import { useEffect } from "preact/compat";
|
|
3
|
+
import { HeaderActions } from "@/components/HeaderActions/HeaderActions";
|
|
4
|
+
import { PackagesList } from "@/components/Packages/PackagesList";
|
|
5
|
+
import SideBySide from "@/components/SideBySide";
|
|
6
|
+
import TestResult from "@/components/TestResult";
|
|
7
|
+
import { useI18n } from "@/stores";
|
|
8
|
+
import { fetchPackagesData } from "@/stores/packages";
|
|
9
|
+
import { route } from "@/stores/router";
|
|
10
|
+
import { fetchTestResult, testResultStore } from "@/stores/testResults";
|
|
11
|
+
import * as styles from "./styles.scss";
|
|
12
|
+
|
|
13
|
+
const Packages = () => {
|
|
14
|
+
const { testResultId } = route.value.params;
|
|
15
|
+
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
fetchPackagesData();
|
|
18
|
+
}, []);
|
|
19
|
+
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (testResultId) {
|
|
22
|
+
fetchTestResult(testResultId);
|
|
23
|
+
}
|
|
24
|
+
}, [testResultId]);
|
|
25
|
+
|
|
26
|
+
const testResult = (
|
|
27
|
+
<Loadable
|
|
28
|
+
source={testResultStore}
|
|
29
|
+
renderLoader={() => <PageLoader />}
|
|
30
|
+
transformData={(data) => data[testResultId]}
|
|
31
|
+
renderError={() => <div />}
|
|
32
|
+
renderData={(testResultItem) => (
|
|
33
|
+
<>
|
|
34
|
+
<div className={styles.wrapper} key={testResultItem?.id}>
|
|
35
|
+
<TestResult testResult={testResultItem} />
|
|
36
|
+
</div>
|
|
37
|
+
</>
|
|
38
|
+
)}
|
|
39
|
+
/>
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
const PackagesSide = () => {
|
|
43
|
+
const { t } = useI18n("nav");
|
|
44
|
+
return (
|
|
45
|
+
<div className={styles.suites}>
|
|
46
|
+
<Heading size={"s"} className={styles["suites-title"]}>
|
|
47
|
+
{t("packages")}
|
|
48
|
+
</Heading>
|
|
49
|
+
|
|
50
|
+
<HeaderActions />
|
|
51
|
+
<PackagesList />
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
return <SideBySide left={<PackagesSide />} right={testResult} />;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export default Packages;
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
.suites {
|
|
2
|
+
padding: 8px;
|
|
3
|
+
}
|
|
4
|
+
.suites-title {
|
|
5
|
+
display: flex;
|
|
6
|
+
margin-bottom: 24px;
|
|
7
|
+
}
|
|
8
|
+
.wrapper {
|
|
9
|
+
display: flex;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.tree {
|
|
13
|
+
position: relative;
|
|
14
|
+
|
|
15
|
+
&:not(:first-child) {
|
|
16
|
+
border-top: 1px solid var(--on-border-muted);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.tree-list {
|
|
21
|
+
min-height: 128px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.tree-header {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: 4px;
|
|
28
|
+
transition: background-color 300ms;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
padding: 4px 8px 4px 6px;
|
|
31
|
+
|
|
32
|
+
&:hover {
|
|
33
|
+
background: var(--bg-control-flat-medium);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.tree-header-arrow {
|
|
38
|
+
transform: rotate(-90deg);
|
|
39
|
+
transition: transform 200ms;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.tree-header-arrow-opened {
|
|
43
|
+
transform: rotate(0);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.tree-header-title {
|
|
47
|
+
white-space: nowrap;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
text-overflow: ellipsis;
|
|
50
|
+
margin-right: 24px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.tree-count {
|
|
54
|
+
display: flex;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.tree-item {
|
|
58
|
+
display: flex;
|
|
59
|
+
justify-content: space-between;
|
|
60
|
+
padding: 6px 8px 6px 6px;
|
|
61
|
+
transition: background-color 300ms;
|
|
62
|
+
gap: 4px;
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
position: relative;
|
|
65
|
+
|
|
66
|
+
&:hover {
|
|
67
|
+
background: var(--bg-control-flat-medium);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&:not(:first-child) {
|
|
71
|
+
border-top: 1px solid var(--on-border-muted);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
.tree-item-marked {
|
|
75
|
+
background: var(--bg-base-secondary);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.item-title {
|
|
79
|
+
display: flex;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.item-time {
|
|
83
|
+
flex: none;
|
|
84
|
+
margin-left: auto;
|
|
85
|
+
color: var(--on-text-hint);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.test-count {
|
|
89
|
+
display: flex;
|
|
90
|
+
margin-left: auto;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.tree-content:not(.root) {
|
|
94
|
+
display: block;
|
|
95
|
+
padding-left: 24px;
|
|
96
|
+
margin-bottom: 12px;
|
|
97
|
+
border-top: 1px solid var(--on-border-muted);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.tree-item-icon {
|
|
101
|
+
padding: 2px 4px;
|
|
102
|
+
height: max-content;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.status-passed {
|
|
106
|
+
color: var(--bg-support-castor);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.status-failed {
|
|
110
|
+
color: var(--bg-support-capella);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.status-broken {
|
|
114
|
+
color: var(--bg-support-atlas);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.status-skipped {
|
|
118
|
+
color: var(--bg-support-rau);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.status-unknown {
|
|
122
|
+
color: var(--bg-support-skat);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.tree-header-bar {
|
|
126
|
+
display: inline-flex;
|
|
127
|
+
font-family: var(--font-family);
|
|
128
|
+
max-width: 140px;
|
|
129
|
+
min-width: 46px;
|
|
130
|
+
border-radius: 4px;
|
|
131
|
+
height: 12px;
|
|
132
|
+
background: var(--on-text-hint);
|
|
133
|
+
margin-left: auto;
|
|
134
|
+
font-size: 10px;
|
|
135
|
+
font-weight: var(--font-weight-extra-bold);
|
|
136
|
+
line-height: 12px;
|
|
137
|
+
overflow: hidden;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.tree-header-bar-item {
|
|
141
|
+
display: flex;
|
|
142
|
+
min-width: 16px;
|
|
143
|
+
justify-content: center;
|
|
144
|
+
text-align: center;
|
|
145
|
+
padding: 0 6px;
|
|
146
|
+
flex-grow: 1;
|
|
147
|
+
|
|
148
|
+
&.passed {
|
|
149
|
+
background-color: var(--bg-support-castor);
|
|
150
|
+
color: var(--constant-on-text-primary);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&.failed {
|
|
154
|
+
background-color: var(--bg-support-capella);
|
|
155
|
+
color: var(--constant-on-text-primary);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&.broken {
|
|
159
|
+
background-color: var(--bg-support-atlas);
|
|
160
|
+
color: var(--constant-on-text-primary);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&.skipped {
|
|
164
|
+
background-color: var(--bg-support-rau);
|
|
165
|
+
color: var(--constant-on-text-primary);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&.unknown {
|
|
169
|
+
background-color: var(--bg-support-skat);
|
|
170
|
+
color: var(--constant-on-text-primary);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.tree-empty-results {
|
|
175
|
+
padding: 44px 24px;
|
|
176
|
+
text-align: center;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.tree-empty-results-title {
|
|
180
|
+
color: var(--on-text-secondary);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.tree-empty-results-clear-button {
|
|
184
|
+
margin-top: 4px;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.order {
|
|
188
|
+
user-select: none;
|
|
189
|
+
color: var(--on-text-hint);
|
|
190
|
+
min-width: 16px;
|
|
191
|
+
text-align: center;
|
|
192
|
+
box-sizing: content-box;
|
|
193
|
+
padding-top: 2px;
|
|
194
|
+
line-height: 16px;
|
|
195
|
+
width: 24px;
|
|
196
|
+
}
|