@allurereport/web-awesome 3.0.0-beta.9 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/multi/173.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/174.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/252.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/282.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/29.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/416.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/527.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/600.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/605.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/638.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/672.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/686.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/725.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/741.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/755.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/894.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/91.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/943.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/980.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/app-9931797d1602fc52db5b.js +2 -0
- package/dist/multi/app-9931797d1602fc52db5b.js.LICENSE.txt +10 -0
- package/dist/multi/manifest.json +25 -24
- package/dist/multi/styles-8fe37354d1c2270c691e.css +48 -0
- package/dist/single/app-6199dc1c2fd3bddc2526.js +2 -0
- package/dist/single/app-6199dc1c2fd3bddc2526.js.LICENSE.txt +10 -0
- package/dist/single/manifest.json +1 -1
- package/package.json +29 -17
- package/src/assets/scss/day.scss +2 -0
- package/src/assets/scss/index.scss +1 -3
- package/src/assets/scss/night.scss +2 -0
- package/src/assets/scss/palette.scss +391 -391
- package/src/assets/scss/theme.scss +292 -79
- package/src/components/BaseLayout/index.tsx +10 -32
- package/src/components/BaseLayout/styles.scss +14 -4
- package/src/components/Charts/index.tsx +245 -0
- package/src/components/Charts/styles.scss +27 -0
- package/src/components/EnvironmentPicker/index.tsx +60 -0
- package/src/components/EnvironmentPicker/styles.scss +9 -0
- package/src/components/Footer/FooterLogo.tsx +1 -2
- package/src/components/Footer/FooterVersion.tsx +7 -3
- package/src/components/Footer/index.tsx +6 -2
- package/src/components/Header/CiInfo/index.tsx +67 -0
- package/src/components/Header/CiInfo/styles.scss +7 -0
- package/src/components/Header/index.tsx +21 -8
- package/src/components/Header/styles.scss +9 -1
- package/src/components/HeaderControls/index.tsx +20 -0
- package/src/components/MainReport/index.tsx +84 -6
- package/src/components/MainReport/styles.scss +20 -0
- package/src/components/Metadata/index.tsx +6 -4
- package/src/components/MetadataButton/index.tsx +14 -6
- package/src/components/MetadataButton/styles.scss +3 -0
- package/src/components/Modal/index.tsx +15 -167
- package/src/components/NavTabs/index.tsx +70 -0
- package/src/components/{TestResult/TestResultTabs → NavTabs}/styles.scss +0 -3
- package/src/components/Report/index.tsx +7 -0
- package/src/components/ReportBody/Filters.tsx +45 -64
- package/src/components/ReportBody/index.tsx +26 -15
- package/src/components/ReportBody/styles.scss +9 -3
- package/src/components/ReportGlobalAttachments/index.tsx +34 -0
- package/src/components/ReportGlobalAttachments/styles.scss +11 -0
- package/src/components/ReportGlobalErrors/index.tsx +30 -0
- package/src/components/ReportGlobalErrors/styles.scss +12 -0
- package/src/components/ReportHeader/ReportHeaderLogo.tsx +6 -2
- package/src/components/ReportHeader/ReportHeaderPie.tsx +1 -2
- package/src/components/ReportHeader/index.tsx +38 -12
- package/src/components/ReportHeader/styles.scss +9 -1
- package/src/components/ReportMetadata/MetadataSummary.tsx +57 -65
- package/src/components/ReportMetadata/MetadataWithIcon.tsx +11 -13
- package/src/components/ReportMetadata/index.tsx +50 -3
- package/src/components/ReportMetadata/styles.scss +0 -2
- package/src/components/ReportQualityGateResults/index.tsx +42 -0
- package/src/components/ReportQualityGateResults/styles.scss +44 -0
- package/src/components/SectionPicker/index.tsx +55 -0
- package/src/components/SectionPicker/styles.scss +5 -0
- package/src/components/SectionSwitcher/index.tsx +16 -0
- package/src/components/SectionSwitcher/styles.scss +4 -0
- package/src/components/SectionTabs/index.tsx +0 -0
- package/src/components/SideBySide/index.tsx +52 -0
- package/src/components/SideBySide/styles.scss +64 -0
- package/src/components/SplitLayout/index.tsx +73 -0
- package/src/components/SplitLayout/styles.scss +84 -0
- package/src/components/Tabs/index.tsx +2 -2
- package/src/components/TestResult/TestStepsEmpty/index.tsx +2 -2
- package/src/components/TestResult/TrAttachmentsView/index.tsx +29 -0
- package/src/components/TestResult/{TestResultDescription → TrDescription}/index.tsx +5 -5
- package/src/components/TestResult/{TestResultDropdown → TrDropdown}/index.tsx +7 -5
- package/src/components/TestResult/{TestResultEmpty → TrEmpty}/index.tsx +6 -6
- package/src/components/TestResult/TrEnvironmentItem/index.tsx +82 -0
- package/src/components/TestResult/TrEnvironmentItem/styles.scss +60 -0
- package/src/components/TestResult/TrEnvironmentsView/index.tsx +64 -0
- package/src/components/TestResult/TrEnvironmentsView/styles.scss +11 -0
- package/src/components/TestResult/TrError/TrDiff.tsx +121 -0
- package/src/components/TestResult/TrError/index.tsx +104 -0
- package/src/components/TestResult/TrError/styles.scss +223 -0
- package/src/components/TestResult/TrHeader/TrBreadcrumbs.tsx +44 -0
- package/src/components/TestResult/TrHeader/index.tsx +15 -0
- package/src/components/TestResult/{TestResultHeader → TrHeader}/styles.scss +7 -2
- package/src/components/TestResult/TrHistory/TrHistoryItem.tsx +94 -0
- package/src/components/TestResult/TrHistory/index.tsx +26 -0
- package/src/components/TestResult/{TestResultHistory → TrHistory}/styles.scss +2 -1
- package/src/components/TestResult/{TestResultInfo/TestResultInfoStatuses.tsx → TrInfo/TrInfoStatuses.tsx} +6 -4
- package/src/components/TestResult/TrInfo/index.tsx +99 -0
- package/src/components/TestResult/{TestResultInfo → TrInfo}/styles.scss +18 -0
- package/src/components/TestResult/{TestResultLinks → TrLinks}/index.tsx +8 -8
- package/src/components/TestResult/{TestResultMetadata → TrMetadata}/index.tsx +6 -6
- package/src/components/TestResult/{TestResultNavigation → TrNavigation}/index.tsx +7 -9
- package/src/components/TestResult/TrOverview.tsx +46 -0
- package/src/components/TestResult/{TestResultParameters → TrParameters}/index.tsx +4 -4
- package/src/components/TestResult/TrPrevStatuses/index.tsx +63 -0
- package/src/components/TestResult/TrPwTraces/PwTrace.tsx +34 -0
- package/src/components/TestResult/TrPwTraces/PwTraceButton.tsx +32 -0
- package/src/components/TestResult/TrPwTraces/index.tsx +32 -0
- package/src/components/TestResult/TrPwTraces/styles.scss +20 -0
- package/src/components/TestResult/TrRetriesView/TrRetriesItem.tsx +70 -0
- package/src/components/TestResult/TrRetriesView/index.tsx +29 -0
- package/src/components/TestResult/{TestResultSetup → TrSetup}/index.tsx +13 -13
- package/src/components/TestResult/{TestResultSeverity → TrSeverity}/index.tsx +2 -2
- package/src/components/TestResult/{TestResultStatus → TrStatus}/index.tsx +5 -5
- package/src/components/TestResult/TrSteps/TrAttachment.tsx +118 -0
- package/src/components/TestResult/{TestResultSteps/testResultAttachmentInfo.tsx → TrSteps/TrAttachmentInfo.tsx} +11 -11
- package/src/components/TestResult/TrSteps/TrStep.tsx +98 -0
- package/src/components/TestResult/TrSteps/TrStepInfo.tsx +90 -0
- package/src/components/TestResult/{TestResultSteps → TrSteps}/index.tsx +12 -12
- package/src/components/TestResult/{TestResultSteps → TrSteps}/styles.scss +49 -10
- package/src/components/TestResult/{TestResultSteps → TrSteps}/wrongAttachment.tsx +1 -1
- package/src/components/TestResult/TrTabs/index.tsx +42 -0
- package/src/components/TestResult/{TestResultTeardown → TrTeardown}/index.tsx +13 -13
- package/src/components/TestResult/index.tsx +54 -38
- package/src/components/TestResult/styles.scss +12 -0
- package/src/components/Timeline/index.tsx +100 -0
- package/src/components/Timeline/styles.scss +45 -0
- package/src/components/ToggleLayout/index.tsx +17 -0
- package/src/components/Tree/index.tsx +123 -9
- package/src/components/Tree/styles.scss +23 -5
- package/src/index.html +22 -6
- package/src/index.tsx +91 -20
- package/src/locales/az.json +376 -0
- package/src/locales/de.json +376 -0
- package/src/locales/en.json +376 -0
- package/src/locales/es.json +376 -0
- package/src/locales/fr.json +376 -0
- package/src/locales/he.json +376 -0
- package/src/locales/hy.json +376 -0
- package/src/locales/it.json +376 -0
- package/src/locales/ja.json +376 -0
- package/src/locales/ka.json +376 -0
- package/src/locales/kr.json +376 -0
- package/src/locales/nl.json +376 -0
- package/src/locales/pl.json +384 -0
- package/src/locales/pt.json +376 -0
- package/src/locales/ru.json +384 -0
- package/src/locales/sv.json +376 -0
- package/src/locales/tr.json +376 -0
- package/src/locales/ua.json +327 -0
- package/src/locales/zh.json +376 -0
- package/src/stores/chart.ts +41 -6
- package/src/stores/env.ts +88 -0
- package/src/stores/envInfo.ts +2 -2
- package/src/stores/globals.ts +28 -0
- package/src/stores/layout.ts +36 -0
- package/src/stores/locale.ts +77 -29
- package/src/stores/modal.ts +22 -0
- package/src/stores/qualityGate.ts +28 -0
- package/src/stores/router.ts +108 -0
- package/src/stores/sections.ts +63 -0
- package/src/stores/stats.ts +52 -7
- package/src/stores/testResults.ts +13 -9
- package/src/stores/theme.ts +15 -18
- package/src/stores/timeline.ts +39 -0
- package/src/stores/tree.ts +61 -22
- package/src/stores/variables.ts +40 -0
- package/src/styles.scss +66 -0
- package/src/utils/time.ts +1 -0
- package/src/utils/tree.ts +23 -0
- package/src/utils/treeFilters.ts +27 -21
- package/test/components/Header/CiInfo.test.tsx +177 -0
- package/test/components/Header.test.tsx +122 -0
- package/test/utils/treeFilters.test.ts +44 -44
- package/tsconfig.json +7 -2
- package/tsconfig.node.json +8 -0
- package/types.d.ts +43 -24
- package/vitest.config.ts +15 -2
- package/vitest.setup.ts +1 -0
- package/webpack.config.js +35 -5
- package/dist/multi/141.app-f32e4213.js +0 -1
- package/dist/multi/222.app-f32e4213.js +0 -1
- package/dist/multi/335.app-f32e4213.js +0 -1
- package/dist/multi/34.app-f32e4213.js +0 -1
- package/dist/multi/349.app-f32e4213.js +0 -1
- package/dist/multi/378.app-f32e4213.js +0 -1
- package/dist/multi/406.app-f32e4213.js +0 -1
- package/dist/multi/476.app-f32e4213.js +0 -1
- package/dist/multi/53.app-f32e4213.js +0 -1
- package/dist/multi/584.app-f32e4213.js +0 -1
- package/dist/multi/690.app-f32e4213.js +0 -1
- package/dist/multi/747.app-f32e4213.js +0 -1
- package/dist/multi/767.app-f32e4213.js +0 -1
- package/dist/multi/816.app-f32e4213.js +0 -1
- package/dist/multi/83.app-f32e4213.js +0 -1
- package/dist/multi/873.app-f32e4213.js +0 -1
- package/dist/multi/920.app-f32e4213.js +0 -1
- package/dist/multi/991.app-f32e4213.js +0 -1
- package/dist/multi/app-f32e4213.js +0 -2
- package/dist/multi/app-f32e4213.js.LICENSE.txt +0 -16
- package/dist/multi/styles-f32e4213.css +0 -284
- package/dist/single/app-7fa8e43f.js +0 -2
- package/dist/single/app-7fa8e43f.js.LICENSE.txt +0 -16
- package/src/assets/scss/code.scss +0 -71
- package/src/assets/scss/typography.scss +0 -218
- package/src/components/ArrowButton/index.tsx +0 -36
- package/src/components/ArrowButton/styles.scss +0 -35
- package/src/components/LanguagePicker/index.tsx +0 -40
- package/src/components/Modal/styles.scss +0 -126
- package/src/components/ReportLogo/index.tsx +0 -16
- package/src/components/ReportLogo/styles.scss +0 -20
- package/src/components/ReportLogoFull/index.tsx +0 -20
- package/src/components/ReportLogoFull/styles.scss +0 -7
- package/src/components/TestResult/TestResultAttachmentsView/index.tsx +0 -27
- package/src/components/TestResult/TestResultError/index.tsx +0 -59
- package/src/components/TestResult/TestResultError/styles.scss +0 -51
- package/src/components/TestResult/TestResultHeader/index.tsx +0 -55
- package/src/components/TestResult/TestResultHistory/TestResultHistoryItem.tsx +0 -67
- package/src/components/TestResult/TestResultHistory/index.tsx +0 -26
- package/src/components/TestResult/TestResultInfo/index.tsx +0 -79
- package/src/components/TestResult/TestResultOverview.tsx +0 -43
- package/src/components/TestResult/TestResultPrevStatuses/index.tsx +0 -49
- package/src/components/TestResult/TestResultRetriesView/TestResultRetriesItem.tsx +0 -52
- package/src/components/TestResult/TestResultRetriesView/index.tsx +0 -24
- package/src/components/TestResult/TestResultSteps/HtmlAttachmentPreview.tsx +0 -12
- package/src/components/TestResult/TestResultSteps/attachment.tsx +0 -68
- package/src/components/TestResult/TestResultSteps/attachmentCode.tsx +0 -20
- package/src/components/TestResult/TestResultSteps/attachmentImage.tsx +0 -32
- package/src/components/TestResult/TestResultSteps/attachmentVideo.tsx +0 -15
- package/src/components/TestResult/TestResultSteps/testResultAttachment.tsx +0 -77
- package/src/components/TestResult/TestResultSteps/testResultStep.tsx +0 -85
- package/src/components/TestResult/TestResultSteps/testResultStepInfo.tsx +0 -30
- package/src/components/TestResult/TestResultTabs/index.tsx +0 -59
- package/src/components/ThemeButton/ThemeButton.tsx +0 -20
- package/src/components/Tree/Tree.tsx +0 -75
- package/src/components/Tree/TreeHeader.tsx +0 -82
- package/src/components/Tree/TreeItem.tsx +0 -35
- package/src/components/Tree/TreeItemIcon.tsx +0 -32
- package/src/i18n/constants.ts +0 -124
- package/src/i18n/locales/am.json +0 -120
- package/src/i18n/locales/az.json +0 -120
- package/src/i18n/locales/de.json +0 -120
- package/src/i18n/locales/en.json +0 -121
- package/src/i18n/locales/es.json +0 -120
- package/src/i18n/locales/fr.json +0 -120
- package/src/i18n/locales/he.json +0 -120
- package/src/i18n/locales/it.json +0 -120
- package/src/i18n/locales/ja.json +0 -120
- package/src/i18n/locales/ka.json +0 -120
- package/src/i18n/locales/kr.json +0 -120
- package/src/i18n/locales/nl.json +0 -120
- package/src/i18n/locales/pl.json +0 -118
- package/src/i18n/locales/pt.json +0 -120
- package/src/i18n/locales/ru.json +0 -118
- package/src/i18n/locales/sv.json +0 -120
- package/src/i18n/locales/tr.json +0 -120
- package/src/i18n/locales/zh.json +0 -120
- package/src/utils/attachments.ts +0 -156
- package/src/utils/capitalize.ts +0 -6
- /package/dist/multi/{JetBrainsMono_vf-b9a9c326..woff → JetBrainsMono_vf.woff} +0 -0
- /package/dist/multi/{JetBrainsMono_vf-9e9649b6..woff2 → JetBrainsMono_vf.woff2} +0 -0
- /package/dist/multi/{pt-root-ui_vf-22fe60ca..woff → pt-root-ui_vf.woff} +0 -0
- /package/dist/multi/{pt-root-ui_vf-9d251e8b..woff2 → pt-root-ui_vf.woff2} +0 -0
- /package/src/components/TestResult/{TestResultAttachmentsView → TrAttachmentsView}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultDescription → TrDescription}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultDropdown → TrDropdown}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultEmpty → TrEmpty}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultLinks → TrLinks}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultMetadata → TrMetadata}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultNavigation → TrNavigation}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultParameters → TrParameters}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultPrevStatuses → TrPrevStatuses}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultRetriesView → TrRetriesView}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultSeverity → TrSeverity}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultStatus → TrStatus}/styles.scss +0 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
.side {
|
|
2
|
+
width: 100%;
|
|
3
|
+
margin: 0;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
display: flex;
|
|
6
|
+
max-width: 1920px;
|
|
7
|
+
justify-content: space-between;
|
|
8
|
+
height: 100%;
|
|
9
|
+
padding: 0 8px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.wrapper {
|
|
13
|
+
width: 100%;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
margin: auto;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.side-left {
|
|
19
|
+
margin-right: auto;
|
|
20
|
+
transition: width 50ms;
|
|
21
|
+
will-change: width;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.side-right {
|
|
25
|
+
flex: 1 1 auto;
|
|
26
|
+
margin-left: auto;
|
|
27
|
+
transition: width 200ms;
|
|
28
|
+
will-change: width, height;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
[dir="ltr"] {
|
|
32
|
+
.side {
|
|
33
|
+
direction: ltr;
|
|
34
|
+
flex-direction: row;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
[dir="rtl"] {
|
|
39
|
+
.side {
|
|
40
|
+
direction: ltr;
|
|
41
|
+
flex-direction: row-reverse;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.side-left {
|
|
45
|
+
direction: rtl;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.side-right {
|
|
49
|
+
direction: rtl;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.tree-ctrl {
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.gutter {
|
|
58
|
+
background: var(--bg-base-secondary) no-repeat 50%;
|
|
59
|
+
height: 100%;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.gutter:hover {
|
|
63
|
+
cursor: ew-resize;
|
|
64
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Loadable, PageLoader, Text } from "@allurereport/web-components";
|
|
2
|
+
import type { JSX } from "preact";
|
|
3
|
+
import { useEffect, useRef, useState } from "preact/hooks";
|
|
4
|
+
import { Footer } from "@/components/Footer";
|
|
5
|
+
import { Header } from "@/components/Header";
|
|
6
|
+
import MainReport from "@/components/MainReport";
|
|
7
|
+
import SideBySide from "@/components/SideBySide";
|
|
8
|
+
import TestResult from "@/components/TestResult";
|
|
9
|
+
import { useI18n } from "@/stores";
|
|
10
|
+
import { route } from "@/stores/router";
|
|
11
|
+
import { testResultStore } from "@/stores/testResults";
|
|
12
|
+
import { treeStore } from "@/stores/tree";
|
|
13
|
+
import * as styles from "./styles.scss";
|
|
14
|
+
|
|
15
|
+
const MainReportWrapper = () => {
|
|
16
|
+
const containerRef = useRef<HTMLDivElement>(null);
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<div className={styles.wrapper} ref={containerRef}>
|
|
20
|
+
<MainReport />
|
|
21
|
+
</div>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const Loader = () => {
|
|
26
|
+
return (
|
|
27
|
+
<div className={styles.content}>
|
|
28
|
+
<PageLoader />
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const SplitLayout = () => {
|
|
34
|
+
const testResultId = route.value.params?.testResultId ?? null;
|
|
35
|
+
const [cachedMain, setCachedMain] = useState<JSX.Element | null>(null);
|
|
36
|
+
const { t } = useI18n("controls");
|
|
37
|
+
const leftSide = (
|
|
38
|
+
<Loadable source={treeStore} renderLoader={() => <PageLoader />} renderData={() => <MainReportWrapper />} />
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
const TrView = () => {
|
|
42
|
+
return testResultId ? (
|
|
43
|
+
<Loadable
|
|
44
|
+
source={testResultStore}
|
|
45
|
+
renderLoader={() => <Loader />}
|
|
46
|
+
transformData={(allResults) => {
|
|
47
|
+
if (testResultId in allResults) {
|
|
48
|
+
return allResults[testResultId];
|
|
49
|
+
}
|
|
50
|
+
}}
|
|
51
|
+
renderData={(tr) => {
|
|
52
|
+
return tr ? <TestResult testResult={tr} /> : <Loader />;
|
|
53
|
+
}}
|
|
54
|
+
/>
|
|
55
|
+
) : (
|
|
56
|
+
<div className={styles.empty}>
|
|
57
|
+
<Text>{t("noSelectedTR")}</Text>
|
|
58
|
+
</div>
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
if (!cachedMain) {
|
|
64
|
+
setCachedMain(leftSide);
|
|
65
|
+
}
|
|
66
|
+
}, [cachedMain]);
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<div className={styles["side-by-side"]} data-testId={"split-layout"}>
|
|
70
|
+
<SideBySide left={cachedMain} right={<TrView />} />
|
|
71
|
+
</div>
|
|
72
|
+
);
|
|
73
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
.layout {
|
|
2
|
+
margin: auto;
|
|
3
|
+
padding: 12px 32px;
|
|
4
|
+
background: var(--bg-base-secondary);
|
|
5
|
+
color: var(--on-text-primary);
|
|
6
|
+
font-size: 14px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.wrapper {
|
|
10
|
+
width: 100%;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
margin: auto;
|
|
13
|
+
position: relative;
|
|
14
|
+
height: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.content {
|
|
18
|
+
box-shadow: var(--shadow-small);
|
|
19
|
+
background: var(--bg-base-primary);
|
|
20
|
+
border-radius: 12px;
|
|
21
|
+
width: 100%;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
overflow-y: scroll;
|
|
24
|
+
position: relative;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.test-results {
|
|
28
|
+
min-height: 320px;
|
|
29
|
+
padding-bottom: 32px;
|
|
30
|
+
padding-top: 12px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.logo {
|
|
34
|
+
display: inline-block;
|
|
35
|
+
margin-bottom: 12px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.title {
|
|
39
|
+
font-size: 14px;
|
|
40
|
+
line-height: 1.25;
|
|
41
|
+
color: var(--on-text-primary);
|
|
42
|
+
margin-bottom: 8px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.above {
|
|
46
|
+
display: flex;
|
|
47
|
+
justify-content: space-between;
|
|
48
|
+
width: 100%;
|
|
49
|
+
padding-bottom: 12px;
|
|
50
|
+
align-items: center;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.below {
|
|
54
|
+
display: flex;
|
|
55
|
+
justify-content: space-between;
|
|
56
|
+
align-items: center;
|
|
57
|
+
margin: auto;
|
|
58
|
+
width: 100%;
|
|
59
|
+
padding: 8px 8px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.test-result-errors {
|
|
63
|
+
padding: 0 24px;
|
|
64
|
+
margin-top: 12px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.side-by-side {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
justify-content: space-between;
|
|
71
|
+
height: 100%;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.empty {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
height: 100%;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.header {
|
|
82
|
+
padding: 8px;
|
|
83
|
+
margin-bottom: 0;
|
|
84
|
+
}
|
|
@@ -2,7 +2,7 @@ import { Text } from "@allurereport/web-components";
|
|
|
2
2
|
import { type ComponentChildren, createContext } from "preact";
|
|
3
3
|
import { useContext, useState } from "preact/hooks";
|
|
4
4
|
import { setTreeStatus } from "@/stores/tree";
|
|
5
|
-
import type {
|
|
5
|
+
import type { AwesomeStatus } from "../../../types";
|
|
6
6
|
import * as styles from "./styles.scss";
|
|
7
7
|
|
|
8
8
|
type TabsContextT = {
|
|
@@ -49,7 +49,7 @@ export const Tab = (props: { id: string; children: ComponentChildren }) => {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
setCurrentTab(id);
|
|
52
|
-
setTreeStatus(id as
|
|
52
|
+
setTreeStatus(id as AwesomeStatus);
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
return (
|
|
@@ -2,7 +2,7 @@ import { SvgIcon, Text, allureIcons } from "@allurereport/web-components";
|
|
|
2
2
|
import { useI18n } from "@/stores";
|
|
3
3
|
import * as styles from "./styles.scss";
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const TrStepsEmpty = () => {
|
|
6
6
|
const { t } = useI18n("empty");
|
|
7
7
|
return (
|
|
8
8
|
<div className={styles["test-steps-empty"]}>
|
|
@@ -20,4 +20,4 @@ const TestStepsEmpty = () => {
|
|
|
20
20
|
);
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
export default
|
|
23
|
+
export default TrStepsEmpty;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { AttachmentTestStepResult } from "@allurereport/core-api";
|
|
2
|
+
import cx from "clsx";
|
|
3
|
+
import type { FunctionalComponent } from "preact";
|
|
4
|
+
import type { AwesomeTestResult } from "types";
|
|
5
|
+
import { TrAttachment } from "@/components/TestResult/TrSteps/TrAttachment";
|
|
6
|
+
import { useI18n } from "@/stores";
|
|
7
|
+
import * as styles from "./styles.scss";
|
|
8
|
+
|
|
9
|
+
export type TrAttachmentViewProps = {
|
|
10
|
+
className?: string;
|
|
11
|
+
testResult?: AwesomeTestResult;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const TrAttachmentView: FunctionalComponent<TrAttachmentViewProps> = ({ testResult, className }) => {
|
|
15
|
+
const { attachments } = testResult ?? {};
|
|
16
|
+
const { t } = useI18n("ui");
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<div className={cx(styles["test-result-attachments-view"], className)}>
|
|
20
|
+
{attachments.length ? (
|
|
21
|
+
attachments?.map((attach, key) => (
|
|
22
|
+
<TrAttachment item={attach as AttachmentTestStepResult} key={key} stepIndex={key + 1} />
|
|
23
|
+
))
|
|
24
|
+
) : (
|
|
25
|
+
<div className={styles["test-result-empty"]}>{t("no-attachments-results")}</div>
|
|
26
|
+
)}
|
|
27
|
+
</div>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Text } from "@allurereport/web-components";
|
|
2
2
|
import type { FunctionalComponent } from "preact";
|
|
3
3
|
import { useState } from "preact/hooks";
|
|
4
|
-
import type {
|
|
4
|
+
import type { AwesomeTestResult } from "types";
|
|
5
5
|
import { MetadataButton } from "@/components/MetadataButton";
|
|
6
6
|
import * as styles from "./styles.scss";
|
|
7
7
|
|
|
8
|
-
export type
|
|
9
|
-
description:
|
|
8
|
+
export type TrDescriptionProps = {
|
|
9
|
+
description: AwesomeTestResult["description"];
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
export const
|
|
12
|
+
export const TrDescription: FunctionalComponent<TrDescriptionProps> = ({ description }) => {
|
|
13
13
|
const [isOpen, setIsOpen] = useState<boolean>(true);
|
|
14
14
|
|
|
15
15
|
return (
|
|
@@ -18,7 +18,7 @@ export const TestResultDescription: FunctionalComponent<TestResultDescriptionPro
|
|
|
18
18
|
<MetadataButton title={"Description"} setIsOpen={setIsOpen} isOpened={isOpen} />
|
|
19
19
|
{isOpen && (
|
|
20
20
|
<Text tag={"p"} className={styles["test-result-description-text"]}>
|
|
21
|
-
{description
|
|
21
|
+
{description}
|
|
22
22
|
</Text>
|
|
23
23
|
)}
|
|
24
24
|
</div>
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { Counter, SvgIcon, Text, allureIcons } from "@allurereport/web-components";
|
|
1
|
+
import { ArrowButton, Counter, SvgIcon, Text, allureIcons } from "@allurereport/web-components";
|
|
2
|
+
import type { ClassValue } from "clsx";
|
|
3
|
+
import clsx from "clsx";
|
|
2
4
|
import { type FunctionalComponent } from "preact";
|
|
3
|
-
import { ArrowButton } from "@/components/ArrowButton";
|
|
4
5
|
import * as styles from "./styles.scss";
|
|
5
6
|
|
|
6
|
-
export const
|
|
7
|
+
export const TrDropdown: FunctionalComponent<{
|
|
7
8
|
isOpened: boolean;
|
|
8
9
|
setIsOpen: (isOpened: boolean) => void;
|
|
9
10
|
title: string;
|
|
10
11
|
icon: string;
|
|
11
12
|
counter: number;
|
|
12
|
-
|
|
13
|
+
className?: ClassValue;
|
|
14
|
+
}> = ({ isOpened, setIsOpen, title, icon, counter, className }) => {
|
|
13
15
|
return (
|
|
14
|
-
<div className={styles["test-result-dropdown"]} onClick={() => setIsOpen(!isOpened)}>
|
|
16
|
+
<div className={clsx(styles["test-result-dropdown"], className)} onClick={() => setIsOpen(!isOpened)}>
|
|
15
17
|
<ArrowButton isOpened={isOpened} icon={allureIcons.arrowsChevronDown} />
|
|
16
18
|
<div className={styles["test-result-dropdown-wrap"]}>
|
|
17
19
|
<SvgIcon id={icon} />
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SvgIcon, Text, allureIcons } from "@allurereport/web-components";
|
|
2
2
|
import * as baseStyles from "@/components/BaseLayout/styles.scss";
|
|
3
|
-
import {
|
|
3
|
+
import { TrInfo } from "@/components/TestResult/TrInfo";
|
|
4
4
|
import { useI18n } from "@/stores";
|
|
5
5
|
import * as styles from "./styles.scss";
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const TrThumb = () => {
|
|
8
8
|
const { t } = useI18n("empty");
|
|
9
9
|
return (
|
|
10
10
|
<div className={styles["test-result-thumb"]}>
|
|
@@ -22,13 +22,13 @@ const TestResultThumb = () => {
|
|
|
22
22
|
);
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
const
|
|
25
|
+
const TrEmpty = () => {
|
|
26
26
|
return (
|
|
27
27
|
<div className={baseStyles.content}>
|
|
28
|
-
<
|
|
29
|
-
<
|
|
28
|
+
<TrInfo />
|
|
29
|
+
<TrThumb />
|
|
30
30
|
</div>
|
|
31
31
|
);
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
export default
|
|
34
|
+
export default TrEmpty;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { formatDuration } from "@allurereport/core-api";
|
|
2
|
+
import { ArrowButton, IconButton, Text, TooltipWrapper, TreeItemIcon, allureIcons } from "@allurereport/web-components";
|
|
3
|
+
import cx from "clsx";
|
|
4
|
+
import { type FunctionalComponent } from "preact";
|
|
5
|
+
import { useState } from "preact/hooks";
|
|
6
|
+
import { TrError } from "@/components/TestResult/TrError";
|
|
7
|
+
import { useI18n } from "@/stores";
|
|
8
|
+
import { navigateTo, openInNewTab } from "@/stores/router";
|
|
9
|
+
import { timestampToDate } from "@/utils/time";
|
|
10
|
+
import type { AwesomeTestResult } from "../../../../types";
|
|
11
|
+
import * as styles from "./styles.scss";
|
|
12
|
+
|
|
13
|
+
export const TrEnvironmentItem: FunctionalComponent<{
|
|
14
|
+
env: string;
|
|
15
|
+
testResult: AwesomeTestResult;
|
|
16
|
+
current?: boolean;
|
|
17
|
+
}> = ({ env, testResult, current = false }) => {
|
|
18
|
+
const { status, error, stop, duration, id } = testResult;
|
|
19
|
+
const [isOpened, setIsOpen] = useState(false);
|
|
20
|
+
const hasEmptyError = !error || !Object.keys(error).length;
|
|
21
|
+
const convertedStop = stop ? timestampToDate(stop) : "";
|
|
22
|
+
const formattedDuration = formatDuration(duration as number);
|
|
23
|
+
const { t } = useI18n("controls");
|
|
24
|
+
const navigateUrl = id;
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<div data-testid={"test-result-env-item"}>
|
|
28
|
+
<div className={styles["test-result-environment-item-header"]}>
|
|
29
|
+
{!hasEmptyError && (
|
|
30
|
+
<span onClick={() => setIsOpen(!isOpened)}>
|
|
31
|
+
<ArrowButton isOpened={isOpened} icon={allureIcons.arrowsChevronDown} />
|
|
32
|
+
</span>
|
|
33
|
+
)}
|
|
34
|
+
<div
|
|
35
|
+
className={cx(styles["test-result-environment-item-wrap"], {
|
|
36
|
+
[styles.current]: current,
|
|
37
|
+
})}
|
|
38
|
+
role={current ? undefined : "button"}
|
|
39
|
+
onClick={(e) => {
|
|
40
|
+
if (current) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
e.stopPropagation();
|
|
45
|
+
navigateTo(navigateUrl);
|
|
46
|
+
}}
|
|
47
|
+
>
|
|
48
|
+
<TreeItemIcon status={status} className={styles["test-result-environment-item-status"]} />
|
|
49
|
+
<Text className={styles["test-result-environment-item-env"]} bold>
|
|
50
|
+
{env}
|
|
51
|
+
</Text>
|
|
52
|
+
<Text className={styles["test-result-environment-item-text"]}>{convertedStop}</Text>
|
|
53
|
+
<div className={styles["test-result-environment-item-info"]}>
|
|
54
|
+
<Text type="ui" size={"s"} className={styles["test-result-environment-item-time"]}>
|
|
55
|
+
{formattedDuration}
|
|
56
|
+
</Text>
|
|
57
|
+
{!current && (
|
|
58
|
+
<TooltipWrapper tooltipText={t("openInNewTab")}>
|
|
59
|
+
<IconButton
|
|
60
|
+
icon={allureIcons.lineGeneralLinkExternal}
|
|
61
|
+
style={"ghost"}
|
|
62
|
+
size={"s"}
|
|
63
|
+
className={styles["test-result-environment-item-link"]}
|
|
64
|
+
data-testid={"test-result-env-item-new-tab-button"}
|
|
65
|
+
onClick={(e) => {
|
|
66
|
+
e.stopPropagation();
|
|
67
|
+
openInNewTab(navigateUrl);
|
|
68
|
+
}}
|
|
69
|
+
/>
|
|
70
|
+
</TooltipWrapper>
|
|
71
|
+
)}
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
{isOpened && !hasEmptyError && (
|
|
76
|
+
<div>
|
|
77
|
+
<TrError status={status} {...error} />
|
|
78
|
+
</div>
|
|
79
|
+
)}
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
.test-result-environment-item {
|
|
2
|
+
&:not(.current) {
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
|
|
5
|
+
&:hover {
|
|
6
|
+
background: var(--bg-control-flat-medium);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.test-result-environment-item-header {
|
|
12
|
+
display: flex;
|
|
13
|
+
width: 100%;
|
|
14
|
+
gap: 4px;
|
|
15
|
+
align-items: center;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.test-result-environment-item-wrap {
|
|
19
|
+
transition: background-color 300ms;
|
|
20
|
+
display: flex;
|
|
21
|
+
gap: 4px;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
border-radius: 6px;
|
|
24
|
+
padding: 4px 4px 4px 4px;
|
|
25
|
+
width: 100%;
|
|
26
|
+
align-items: flex-start;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.test-result-environment-item-text {
|
|
30
|
+
padding-top: 2px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.test-result-environment-item-env {
|
|
34
|
+
margin-top: 1px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.test-result-environment-item-info {
|
|
38
|
+
display: flex;
|
|
39
|
+
gap: 4px;
|
|
40
|
+
align-items: center;
|
|
41
|
+
margin-left: auto;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.test-result-environment-item-time {
|
|
45
|
+
margin-left: auto;
|
|
46
|
+
line-height: 20px;
|
|
47
|
+
color: var(--on-text-secondary);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.test-result-environment-item-link {
|
|
51
|
+
:root {
|
|
52
|
+
--allure-btn-icon-color: var(--bg-control-flat);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
color: var(--on-icon-secondary);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.test-result-environment-item-status {
|
|
59
|
+
padding-top: 4px;
|
|
60
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { type TestEnvGroup, getRealEnvsCount } from "@allurereport/core-api";
|
|
2
|
+
import { Loadable } from "@allurereport/web-components";
|
|
3
|
+
import type { FunctionalComponent } from "preact";
|
|
4
|
+
import { useEffect } from "preact/hooks";
|
|
5
|
+
import type { AwesomeTestResult } from "types";
|
|
6
|
+
import { TrEnvironmentItem } from "@/components/TestResult/TrEnvironmentItem";
|
|
7
|
+
import { useI18n } from "@/stores";
|
|
8
|
+
import { testEnvGroupsStore } from "@/stores/env";
|
|
9
|
+
import { fetchTestResult, testResultStore } from "@/stores/testResults";
|
|
10
|
+
import * as styles from "./styles.scss";
|
|
11
|
+
|
|
12
|
+
export const TrEnvironmentSection: FunctionalComponent<{
|
|
13
|
+
env: string;
|
|
14
|
+
activeTestResultId: string;
|
|
15
|
+
testResultId: string;
|
|
16
|
+
}> = ({ env, activeTestResultId, testResultId }) => {
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
fetchTestResult(testResultId);
|
|
19
|
+
}, [testResultId]);
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<Loadable<Record<string, AwesomeTestResult>, AwesomeTestResult | undefined>
|
|
23
|
+
source={testResultStore}
|
|
24
|
+
transformData={(data) => data[testResultId]}
|
|
25
|
+
renderData={(tr) =>
|
|
26
|
+
tr && <TrEnvironmentItem env={env} testResult={tr} current={activeTestResultId === testResultId} />
|
|
27
|
+
}
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const TrEnvironmentsView: FunctionalComponent<{
|
|
33
|
+
testResult: AwesomeTestResult;
|
|
34
|
+
}> = ({ testResult }) => {
|
|
35
|
+
const { t } = useI18n("empty");
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<div className={styles["test-result-environments"]}>
|
|
39
|
+
<Loadable<Record<string, TestEnvGroup>, TestEnvGroup | undefined>
|
|
40
|
+
source={testEnvGroupsStore}
|
|
41
|
+
renderData={(group) => {
|
|
42
|
+
if (!getRealEnvsCount(group)) {
|
|
43
|
+
return <div className={styles["test-result-empty"]}>{t("no-environments-results")}</div>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const envs = Object.entries(group.testResultsByEnv).sort(([a], [b]) => b.localeCompare(a));
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<ul>
|
|
50
|
+
{envs.map(([env, trId]) => {
|
|
51
|
+
return (
|
|
52
|
+
<li key={`${env}-${trId}`}>
|
|
53
|
+
<TrEnvironmentSection env={env} testResultId={trId} activeTestResultId={testResult.id} />
|
|
54
|
+
</li>
|
|
55
|
+
);
|
|
56
|
+
})}
|
|
57
|
+
</ul>
|
|
58
|
+
);
|
|
59
|
+
}}
|
|
60
|
+
transformData={(groups) => groups[testResult?.testCase?.id]}
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
);
|
|
64
|
+
};
|