@allurereport/web-awesome 3.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc.js +46 -0
- package/.eslintrc.cjs +15 -0
- package/README.md +27 -0
- package/dist/multi/141.app-b6362ca0.js +1 -0
- package/dist/multi/222.app-b6362ca0.js +1 -0
- package/dist/multi/335.app-b6362ca0.js +1 -0
- package/dist/multi/34.app-b6362ca0.js +1 -0
- package/dist/multi/349.app-b6362ca0.js +1 -0
- package/dist/multi/378.app-b6362ca0.js +1 -0
- package/dist/multi/406.app-b6362ca0.js +1 -0
- package/dist/multi/476.app-b6362ca0.js +1 -0
- package/dist/multi/53.app-b6362ca0.js +1 -0
- package/dist/multi/584.app-b6362ca0.js +1 -0
- package/dist/multi/690.app-b6362ca0.js +1 -0
- package/dist/multi/747.app-b6362ca0.js +1 -0
- package/dist/multi/767.app-b6362ca0.js +1 -0
- package/dist/multi/816.app-b6362ca0.js +1 -0
- package/dist/multi/83.app-b6362ca0.js +1 -0
- package/dist/multi/873.app-b6362ca0.js +1 -0
- package/dist/multi/920.app-b6362ca0.js +1 -0
- package/dist/multi/991.app-b6362ca0.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-b6362ca0.js +2 -0
- package/dist/multi/app-b6362ca0.js.LICENSE.txt +16 -0
- package/dist/multi/manifest.json +26 -0
- package/dist/multi/pt-root-ui_vf-22fe60ca..woff +0 -0
- package/dist/multi/pt-root-ui_vf-9d251e8b..woff2 +0 -0
- package/dist/multi/styles-b6362ca0.css +363 -0
- package/dist/single/app-57ae0a60.js +2 -0
- package/dist/single/app-57ae0a60.js.LICENSE.txt +16 -0
- package/dist/single/manifest.json +3 -0
- package/package.json +93 -0
- package/postcss.config.js +5 -0
- package/src/assets/fonts/JetBrainsMono_vf.woff +0 -0
- package/src/assets/fonts/JetBrainsMono_vf.woff2 +0 -0
- package/src/assets/fonts/pt-root-ui_vf.woff +0 -0
- package/src/assets/fonts/pt-root-ui_vf.woff2 +0 -0
- package/src/assets/scss/_common.scss +134 -0
- package/src/assets/scss/code.css +71 -0
- package/src/assets/scss/day.scss +51 -0
- package/src/assets/scss/fonts.scss +21 -0
- package/src/assets/scss/index.scss +9 -0
- package/src/assets/scss/mixins.scss +26 -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/assets/svg/arrows-chevron-down.svg +5 -0
- package/src/assets/svg/github.svg +5 -0
- package/src/assets/svg/line-alerts-notification-box.svg +3 -0
- package/src/assets/svg/line-arrows-chevron-down-double.svg +3 -0
- package/src/assets/svg/line-arrows-chevron-down.svg +3 -0
- package/src/assets/svg/line-arrows-chevron-right.svg +3 -0
- package/src/assets/svg/line-arrows-chevron-up-double.svg +3 -0
- package/src/assets/svg/line-arrows-chevron-up.svg +3 -0
- package/src/assets/svg/line-arrows-corner-down-right.svg +3 -0
- package/src/assets/svg/line-arrows-expand-3.svg +3 -0
- package/src/assets/svg/line-arrows-refresh-ccw-1.svg +3 -0
- package/src/assets/svg/line-arrows-sort-line-asc.svg +3 -0
- package/src/assets/svg/line-arrows-sort-line-desc.svg +3 -0
- package/src/assets/svg/line-arrows-switch-vertical-1.svg +3 -0
- package/src/assets/svg/line-dev-bug-2.svg +3 -0
- package/src/assets/svg/line-dev-code-square.svg +3 -0
- package/src/assets/svg/line-files-file-attachment-2.svg +3 -0
- package/src/assets/svg/line-general-check.svg +3 -0
- package/src/assets/svg/line-general-checklist3.svg +3 -0
- package/src/assets/svg/line-general-copy-3.svg +3 -0
- package/src/assets/svg/line-general-download-cloud.svg +3 -0
- package/src/assets/svg/line-general-equal.svg +3 -0
- package/src/assets/svg/line-general-home-line.svg +3 -0
- package/src/assets/svg/line-general-link-1.svg +3 -0
- package/src/assets/svg/line-general-link-external.svg +3 -0
- package/src/assets/svg/line-general-search-md.svg +3 -0
- package/src/assets/svg/line-general-settings-1.svg +3 -0
- package/src/assets/svg/line-general-x-close.svg +3 -0
- package/src/assets/svg/line-general-zap.svg +3 -0
- package/src/assets/svg/line-helpers-flag.svg +4 -0
- package/src/assets/svg/line-helpers-play-circle.svg +4 -0
- package/src/assets/svg/line-images-image.svg +3 -0
- package/src/assets/svg/line-security-key.svg +3 -0
- package/src/assets/svg/line-shapes-dot-circle.svg +3 -0
- package/src/assets/svg/line-shapes-moon.svg +3 -0
- package/src/assets/svg/line-shapes-sun.svg +3 -0
- package/src/assets/svg/line-time-clock-stopwatch.svg +3 -0
- package/src/assets/svg/report-logo.svg +64 -0
- package/src/assets/svg/solid-alert-circle.svg +3 -0
- package/src/assets/svg/solid-check-circle.svg +3 -0
- package/src/assets/svg/solid-help-circle.svg +3 -0
- package/src/assets/svg/solid-minus-circle.svg +3 -0
- package/src/assets/svg/solid-x-circle.svg +3 -0
- package/src/assets/svg/spinner.svg +18 -0
- package/src/assets/svg/view-off.svg +12 -0
- package/src/assets/svg/view.svg +11 -0
- package/src/components/app/ArrowButton/index.tsx +36 -0
- package/src/components/app/ArrowButton/styles.scss +32 -0
- package/src/components/app/BaseLayout/index.tsx +60 -0
- package/src/components/app/BaseLayout/styles.scss +60 -0
- package/src/components/app/Footer/FooterLogo.tsx +16 -0
- package/src/components/app/Footer/FooterVersion.tsx +27 -0
- package/src/components/app/Footer/index.tsx +13 -0
- package/src/components/app/Footer/styles.scss +14 -0
- package/src/components/app/Header/index.tsx +17 -0
- package/src/components/app/Header/styles.scss +26 -0
- package/src/components/app/LanguagePicker/index.tsx +41 -0
- package/src/components/app/MainReport/index.tsx +19 -0
- package/src/components/app/Metadata/index.tsx +114 -0
- package/src/components/app/Metadata/styles.scss +146 -0
- package/src/components/app/MetadataButton/index.tsx +33 -0
- package/src/components/app/MetadataButton/styles.scss +53 -0
- package/src/components/app/Modal/index.tsx +184 -0
- package/src/components/app/Modal/styles.scss +126 -0
- package/src/components/app/ReportBody/Filters.tsx +94 -0
- package/src/components/app/ReportBody/HeaderActions.tsx +21 -0
- package/src/components/app/ReportBody/SortBy.tsx +134 -0
- package/src/components/app/ReportBody/context.tsx +107 -0
- package/src/components/app/ReportBody/index.tsx +71 -0
- package/src/components/app/ReportBody/styles.scss +64 -0
- package/src/components/app/ReportHeader/ReportHeaderLabelList.tsx +12 -0
- package/src/components/app/ReportHeader/ReportHeaderLogo.tsx +10 -0
- package/src/components/app/ReportHeader/ReportHeaderPie.tsx +14 -0
- package/src/components/app/ReportHeader/index.tsx +33 -0
- package/src/components/app/ReportHeader/styles.scss +49 -0
- package/src/components/app/ReportLogo/index.tsx +17 -0
- package/src/components/app/ReportLogo/styles.scss +20 -0
- package/src/components/app/ReportLogoFull/index.tsx +21 -0
- package/src/components/app/ReportLogoFull/styles.scss +7 -0
- package/src/components/app/ReportMetadata/MetadataItem.tsx +45 -0
- package/src/components/app/ReportMetadata/MetadataSummary.tsx +79 -0
- package/src/components/app/ReportMetadata/MetadataTestType.tsx +16 -0
- package/src/components/app/ReportMetadata/MetadataWithIcon.tsx +25 -0
- package/src/components/app/ReportMetadata/index.tsx +46 -0
- package/src/components/app/ReportMetadata/styles.scss +99 -0
- package/src/components/app/Tabs/index.tsx +58 -0
- package/src/components/app/Tabs/styles.scss +56 -0
- package/src/components/app/TestResult/TestResultAttachmentsView/index.tsx +27 -0
- package/src/components/app/TestResult/TestResultAttachmentsView/styles.scss +12 -0
- package/src/components/app/TestResult/TestResultDescription/index.tsx +27 -0
- package/src/components/app/TestResult/TestResultDescription/styles.scss +12 -0
- package/src/components/app/TestResult/TestResultDropdown/index.tsx +19 -0
- package/src/components/app/TestResult/TestResultDropdown/styles.scss +34 -0
- package/src/components/app/TestResult/TestResultEmpty/index.tsx +34 -0
- package/src/components/app/TestResult/TestResultEmpty/styles.scss +25 -0
- package/src/components/app/TestResult/TestResultError/index.tsx +51 -0
- package/src/components/app/TestResult/TestResultError/styles.scss +40 -0
- package/src/components/app/TestResult/TestResultHeader/index.tsx +55 -0
- package/src/components/app/TestResult/TestResultHeader/styles.scss +43 -0
- package/src/components/app/TestResult/TestResultHistory/TestResultHistoryItem.tsx +57 -0
- package/src/components/app/TestResult/TestResultHistory/index.tsx +26 -0
- package/src/components/app/TestResult/TestResultHistory/styles.scss +63 -0
- package/src/components/app/TestResult/TestResultInfo/index.tsx +79 -0
- package/src/components/app/TestResult/TestResultInfo/styles.scss +33 -0
- package/src/components/app/TestResult/TestResultLinks/index.tsx +60 -0
- package/src/components/app/TestResult/TestResultLinks/styles.scss +30 -0
- package/src/components/app/TestResult/TestResultMetadata/index.tsx +27 -0
- package/src/components/app/TestResult/TestResultMetadata/styles.scss +8 -0
- package/src/components/app/TestResult/TestResultNavigation/index.tsx +89 -0
- package/src/components/app/TestResult/TestResultNavigation/styles.scss +48 -0
- package/src/components/app/TestResult/TestResultOverview.tsx +40 -0
- package/src/components/app/TestResult/TestResultParameters/index.tsx +30 -0
- package/src/components/app/TestResult/TestResultParameters/styles.scss +8 -0
- package/src/components/app/TestResult/TestResultPrevStatuses/index.tsx +52 -0
- package/src/components/app/TestResult/TestResultPrevStatuses/styles.scss +57 -0
- package/src/components/app/TestResult/TestResultRetriesView/TestResultRetriesItem.tsx +50 -0
- package/src/components/app/TestResult/TestResultRetriesView/index.tsx +24 -0
- package/src/components/app/TestResult/TestResultRetriesView/styles.scss +69 -0
- package/src/components/app/TestResult/TestResultSetup/index.tsx +50 -0
- package/src/components/app/TestResult/TestResultSeverity/index.tsx +34 -0
- package/src/components/app/TestResult/TestResultSeverity/styles.scss +29 -0
- package/src/components/app/TestResult/TestResultStatus/index.tsx +26 -0
- package/src/components/app/TestResult/TestResultStatus/styles.scss +36 -0
- package/src/components/app/TestResult/TestResultSteps/HtmlAttachmentPreview.tsx +12 -0
- package/src/components/app/TestResult/TestResultSteps/attachment.tsx +70 -0
- package/src/components/app/TestResult/TestResultSteps/attachmentCode.tsx +15 -0
- package/src/components/app/TestResult/TestResultSteps/attachmentImage.tsx +29 -0
- package/src/components/app/TestResult/TestResultSteps/attachmentVideo.tsx +12 -0
- package/src/components/app/TestResult/TestResultSteps/index.tsx +49 -0
- package/src/components/app/TestResult/TestResultSteps/styles.scss +225 -0
- package/src/components/app/TestResult/TestResultSteps/testResultAttachment.tsx +79 -0
- package/src/components/app/TestResult/TestResultSteps/testResultAttachmentInfo.tsx +87 -0
- package/src/components/app/TestResult/TestResultSteps/testResultStep.tsx +71 -0
- package/src/components/app/TestResult/TestResultSteps/testResultStepInfo.tsx +33 -0
- package/src/components/app/TestResult/TestResultSteps/wrongAttachment.tsx +8 -0
- package/src/components/app/TestResult/TestResultTabs/index.tsx +59 -0
- package/src/components/app/TestResult/TestResultTabs/styles.scss +76 -0
- package/src/components/app/TestResult/TestResultTeardown/index.tsx +49 -0
- package/src/components/app/TestResult/index.tsx +56 -0
- package/src/components/app/ThemeButton/ThemeButton.tsx +22 -0
- package/src/components/app/Tree/Tree.tsx +122 -0
- package/src/components/app/Tree/TreeHeader.tsx +81 -0
- package/src/components/app/Tree/TreeItem.tsx +31 -0
- package/src/components/app/Tree/TreeItemIcon.tsx +35 -0
- package/src/components/app/Tree/index.tsx +40 -0
- package/src/components/app/Tree/styles.scss +170 -0
- package/src/components/commons/Button/index.tsx +176 -0
- package/src/components/commons/Button/styles.scss +558 -0
- package/src/components/commons/Counter/index.tsx +29 -0
- package/src/components/commons/Counter/styles.scss +21 -0
- package/src/components/commons/Label/index.tsx +11 -0
- package/src/components/commons/Label/styles.scss +7 -0
- package/src/components/commons/Link/index.tsx +20 -0
- package/src/components/commons/Link/styles.scss +46 -0
- package/src/components/commons/Loadable/index.tsx +32 -0
- package/src/components/commons/Menu/index.tsx +173 -0
- package/src/components/commons/Menu/styles.scss +94 -0
- package/src/components/commons/PageLoader/index.tsx +10 -0
- package/src/components/commons/PageLoader/styles.scss +29 -0
- package/src/components/commons/SearchBox/index.tsx +61 -0
- package/src/components/commons/SearchBox/styles.scss +58 -0
- package/src/components/commons/Spinner/index.tsx +8 -0
- package/src/components/commons/SuccessRatePieChart/index.tsx +52 -0
- package/src/components/commons/SuccessRatePieChart/styles.scss +12 -0
- package/src/components/commons/SvgIcon/index.tsx +46 -0
- package/src/components/commons/SvgIcon/styles.scss +26 -0
- package/src/components/commons/Toggle/index.tsx +29 -0
- package/src/components/commons/Toggle/styles.scss +48 -0
- package/src/components/commons/Tooltip/index.tsx +123 -0
- package/src/components/commons/Tooltip/styles.scss +38 -0
- package/src/components/commons/Typography/index.tsx +99 -0
- package/src/hooks/useDebouncedCallback.ts +31 -0
- package/src/i18n/constants.ts +105 -0
- package/src/i18n/locales/am.json +115 -0
- package/src/i18n/locales/az.json +115 -0
- package/src/i18n/locales/de.json +115 -0
- package/src/i18n/locales/en.json +115 -0
- package/src/i18n/locales/es.json +114 -0
- package/src/i18n/locales/fr.json +115 -0
- package/src/i18n/locales/he.json +115 -0
- package/src/i18n/locales/it.json +115 -0
- package/src/i18n/locales/ja.json +115 -0
- package/src/i18n/locales/ka.json +115 -0
- package/src/i18n/locales/kr.json +115 -0
- package/src/i18n/locales/nl.json +115 -0
- package/src/i18n/locales/pl.json +113 -0
- package/src/i18n/locales/pt.json +115 -0
- package/src/i18n/locales/ru.json +113 -0
- package/src/i18n/locales/sv.json +115 -0
- package/src/i18n/locales/tr.json +115 -0
- package/src/i18n/locales/zh.json +115 -0
- package/src/index.html +35 -0
- package/src/index.tsx +48 -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 +79 -0
- package/src/stores/stats.ts +36 -0
- package/src/stores/testResults.ts +40 -0
- package/src/stores/theme.ts +33 -0
- package/src/stores/tree.ts +33 -0
- package/src/stores/types.ts +5 -0
- package/src/types/globals.d.ts +8 -0
- package/src/types/window.d.ts +8 -0
- package/src/utils/attachments.ts +156 -0
- package/src/utils/capitalize.ts +4 -0
- package/src/utils/copyToClipboard.ts +3 -0
- package/src/utils/isMac.ts +7 -0
- package/src/utils/statuses.ts +55 -0
- package/src/utils/time.ts +17 -0
- package/src/utils/treeFilters.ts +150 -0
- package/tsconfig.json +25 -0
- package/types.d.ts +53 -0
- package/webpack.config.js +108 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import { FunctionalComponent } from "preact";
|
|
3
|
+
import lineChevronDown from "@/assets/svg/line-arrows-chevron-down.svg";
|
|
4
|
+
import { SvgIcon } from "@/components/commons/SvgIcon";
|
|
5
|
+
import * as styles from "./styles.scss";
|
|
6
|
+
|
|
7
|
+
export interface ArrowButtonProps {
|
|
8
|
+
isOpened?: boolean;
|
|
9
|
+
iconSize?: "m" | "xs" | "s";
|
|
10
|
+
buttonSize?: "m" | "xs" | "s";
|
|
11
|
+
className?: string;
|
|
12
|
+
icon?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const ArrowButton: FunctionalComponent<ArrowButtonProps> = ({
|
|
16
|
+
isOpened,
|
|
17
|
+
buttonSize = "m",
|
|
18
|
+
iconSize = "xs",
|
|
19
|
+
className,
|
|
20
|
+
icon,
|
|
21
|
+
}) => {
|
|
22
|
+
return (
|
|
23
|
+
<button className={clsx(styles["arrow-button"], styles[`arrow-button-${buttonSize}`])}>
|
|
24
|
+
<SvgIcon
|
|
25
|
+
id={icon || lineChevronDown.id}
|
|
26
|
+
size={iconSize}
|
|
27
|
+
className={clsx(
|
|
28
|
+
styles["arrow-button-icon"],
|
|
29
|
+
isOpened && styles["arrow-button-icon--opened"],
|
|
30
|
+
styles[`icon-size-${iconSize}`],
|
|
31
|
+
className,
|
|
32
|
+
)}
|
|
33
|
+
/>
|
|
34
|
+
</button>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.arrow-button {
|
|
2
|
+
background: transparent;
|
|
3
|
+
border: none;
|
|
4
|
+
padding: 8px 4px;
|
|
5
|
+
color: var(--on-icon-secondary);
|
|
6
|
+
|
|
7
|
+
&:hover {
|
|
8
|
+
background: var(--bg-control-flat-medium);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.arrow-button-s {
|
|
13
|
+
padding: 0 4px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.arrow-button-m {
|
|
17
|
+
padding: 6px 6px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.icon-size-m {
|
|
21
|
+
width: 15px;
|
|
22
|
+
height: 15px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.arrow-button-icon {
|
|
26
|
+
transform: rotate(-90deg);
|
|
27
|
+
transition: transform 200ms;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.arrow-button-icon--opened {
|
|
31
|
+
transform: rotate(0);
|
|
32
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { ensureReportDataReady } from "@allurereport/web-commons";
|
|
2
|
+
import { useEffect } from "preact/compat";
|
|
3
|
+
import { Footer } from "@/components/app/Footer";
|
|
4
|
+
import MainReport from "@/components/app/MainReport";
|
|
5
|
+
import Modal from "@/components/app/Modal";
|
|
6
|
+
import TestResult from "@/components/app/TestResult";
|
|
7
|
+
import { Loadable } from "@/components/commons/Loadable";
|
|
8
|
+
import { PageLoader } from "@/components/commons/PageLoader";
|
|
9
|
+
import { fetchStats, getTheme } from "@/stores";
|
|
10
|
+
import { getLocale } from "@/stores";
|
|
11
|
+
import { fetchPieChartData } from "@/stores/chart";
|
|
12
|
+
import { fetchEnvInfo } from "@/stores/envInfo";
|
|
13
|
+
import { fetchTestResult, testResultStore } from "@/stores/testResults";
|
|
14
|
+
import { fetchTreeData, treeStore } from "@/stores/tree";
|
|
15
|
+
import * as styles from "./styles.scss";
|
|
16
|
+
|
|
17
|
+
export const BaseLayout = ({ testResultId }) => {
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
getTheme();
|
|
20
|
+
getLocale();
|
|
21
|
+
}, []);
|
|
22
|
+
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (testResultId) {
|
|
25
|
+
fetchTestResult(testResultId);
|
|
26
|
+
} else {
|
|
27
|
+
Promise.all([
|
|
28
|
+
ensureReportDataReady(),
|
|
29
|
+
fetchStats(),
|
|
30
|
+
fetchPieChartData(),
|
|
31
|
+
fetchTreeData("suites"),
|
|
32
|
+
fetchEnvInfo(),
|
|
33
|
+
]);
|
|
34
|
+
}
|
|
35
|
+
}, [testResultId]);
|
|
36
|
+
|
|
37
|
+
const content = testResultId ? (
|
|
38
|
+
<Loadable
|
|
39
|
+
source={testResultStore}
|
|
40
|
+
renderLoader={() => <PageLoader />}
|
|
41
|
+
transformData={(data) => data[testResultId]}
|
|
42
|
+
renderData={(testResult) => (
|
|
43
|
+
<>
|
|
44
|
+
<Modal testResult={testResult} />
|
|
45
|
+
<div className={styles.wrapper}>
|
|
46
|
+
<TestResult testResult={testResult} />
|
|
47
|
+
<Footer />
|
|
48
|
+
</div>
|
|
49
|
+
</>
|
|
50
|
+
)}
|
|
51
|
+
/>
|
|
52
|
+
) : (
|
|
53
|
+
<div className={styles.wrapper}>
|
|
54
|
+
<Loadable source={treeStore} renderLoader={() => <PageLoader />} renderData={() => <MainReport />} />
|
|
55
|
+
<Footer />
|
|
56
|
+
</div>
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
return <div className={styles.layout}>{content}</div>;
|
|
60
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
min-height: 100vh;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.wrapper {
|
|
11
|
+
max-width: 920px;
|
|
12
|
+
width: 100%;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
margin: auto;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.content {
|
|
18
|
+
box-shadow: var(--shadow-small);
|
|
19
|
+
background: var(--bg-base-primary);
|
|
20
|
+
border-radius: 12px;
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.test-results {
|
|
25
|
+
min-height: 320px;
|
|
26
|
+
padding-bottom: 32px;
|
|
27
|
+
padding-top: 12px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.logo {
|
|
31
|
+
display: inline-block;
|
|
32
|
+
margin-bottom: 12px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.title {
|
|
36
|
+
font-size: 14px;
|
|
37
|
+
line-height: 1.25;
|
|
38
|
+
color: var(--on-text-primary);
|
|
39
|
+
margin-bottom: 8px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.above {
|
|
43
|
+
display: flex;
|
|
44
|
+
justify-content: space-between;
|
|
45
|
+
width: 100%;
|
|
46
|
+
padding-bottom: 12px;
|
|
47
|
+
align-items: center;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.below {
|
|
51
|
+
display: flex;
|
|
52
|
+
justify-content: space-between;
|
|
53
|
+
padding-top: 16px;
|
|
54
|
+
align-items: center;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.test-result-errors {
|
|
58
|
+
padding: 0 24px;
|
|
59
|
+
margin-top: 12px;
|
|
60
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Text } from "@/components/commons/Typography";
|
|
2
|
+
import { ReportLogoFull } from "../ReportLogoFull";
|
|
3
|
+
import * as styles from "./styles.scss";
|
|
4
|
+
|
|
5
|
+
export const FooterLogo = () => {
|
|
6
|
+
return (
|
|
7
|
+
<div className={styles["footer-logo"]}>
|
|
8
|
+
<a href="https://allurereport.org" target={"_blank"}>
|
|
9
|
+
<Text type="paragraph" size="m" className={styles["footer-logo"]}>
|
|
10
|
+
Powered by
|
|
11
|
+
</Text>
|
|
12
|
+
<ReportLogoFull className={styles.logo} />
|
|
13
|
+
</a>
|
|
14
|
+
</div>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getReportOptions } from "@allurereport/web-commons";
|
|
2
|
+
import { Text } from "@/components/commons/Typography";
|
|
3
|
+
import { currentLocale } from "@/stores";
|
|
4
|
+
import { AllureAwesomeReportOptions } from "../../../../types";
|
|
5
|
+
import * as styles from "./styles.scss";
|
|
6
|
+
|
|
7
|
+
export function FooterVersion() {
|
|
8
|
+
const currentLang = currentLocale.value;
|
|
9
|
+
const { createdAt } = getReportOptions<AllureAwesomeReportOptions>() ?? {};
|
|
10
|
+
const locale = currentLang === "en" ? "en-US" : "ru-RU";
|
|
11
|
+
|
|
12
|
+
const formattedCreatedAt = new Date(createdAt).toLocaleDateString(locale, {
|
|
13
|
+
month: "numeric",
|
|
14
|
+
day: "numeric",
|
|
15
|
+
year: "numeric",
|
|
16
|
+
hour: "numeric",
|
|
17
|
+
minute: "numeric",
|
|
18
|
+
second: "numeric",
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<Text type="paragraph" size="m" className={styles.version}>
|
|
23
|
+
{formattedCreatedAt}
|
|
24
|
+
<span> Ver: 3.0.0</span>
|
|
25
|
+
</Text>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import * as styles from "@/components/app/BaseLayout/styles.scss";
|
|
3
|
+
import { FooterLogo } from "@/components/app/Footer/FooterLogo";
|
|
4
|
+
import { FooterVersion } from "@/components/app/Footer/FooterVersion";
|
|
5
|
+
|
|
6
|
+
export const Footer = () => {
|
|
7
|
+
return (
|
|
8
|
+
<div className={clsx(styles.below)}>
|
|
9
|
+
<FooterLogo />
|
|
10
|
+
<FooterVersion />
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import githubLogo from "@/assets/svg/github.svg";
|
|
2
|
+
import { LanguagePicker } from "@/components/app/LanguagePicker";
|
|
3
|
+
import { ThemeButton } from "@/components/app/ThemeButton/ThemeButton";
|
|
4
|
+
import { SvgIcon } from "@/components/commons/SvgIcon";
|
|
5
|
+
import { Text } from "@/components/commons/Typography";
|
|
6
|
+
import * as styles from "./styles.scss";
|
|
7
|
+
|
|
8
|
+
export const Header = () => {
|
|
9
|
+
return (
|
|
10
|
+
<div className={styles.above}>
|
|
11
|
+
<div className={styles.right}>
|
|
12
|
+
<LanguagePicker />
|
|
13
|
+
<ThemeButton />
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
);
|
|
17
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.above {
|
|
2
|
+
margin-bottom: 12px;
|
|
3
|
+
display: flex;
|
|
4
|
+
width: 100%;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap: 12px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.logoWrapper {
|
|
11
|
+
margin-right: auto;
|
|
12
|
+
color: var(--on-text-secondary);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.logo {
|
|
16
|
+
margin-right: 8px;
|
|
17
|
+
color: var(--on-icon-secondary);
|
|
18
|
+
top: -2px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.right {
|
|
22
|
+
margin-left: auto;
|
|
23
|
+
display: flex;
|
|
24
|
+
gap: 12px;
|
|
25
|
+
align-items: center;
|
|
26
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { DropdownButton } from "@/components/commons/Button";
|
|
2
|
+
import { LANG_LOCALE, type LangLocale } from "@/i18n/constants";
|
|
3
|
+
import { currentLocale } from "@/stores";
|
|
4
|
+
import { setLocale } from "@/stores/locale";
|
|
5
|
+
import { Menu } from "../../commons/Menu";
|
|
6
|
+
|
|
7
|
+
const langPickerOptions = Object.entries(LANG_LOCALE).map(([key, { full }]) => ({
|
|
8
|
+
key: key as LangLocale,
|
|
9
|
+
value: full,
|
|
10
|
+
}));
|
|
11
|
+
|
|
12
|
+
export const LanguagePicker = () => {
|
|
13
|
+
const locale = currentLocale.value;
|
|
14
|
+
|
|
15
|
+
const handleSelect = (selectedOption: LangLocale) => {
|
|
16
|
+
setLocale(selectedOption);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<Menu
|
|
21
|
+
size="s"
|
|
22
|
+
menuTrigger={({ isOpened, onClick }) => (
|
|
23
|
+
<DropdownButton
|
|
24
|
+
style="ghost"
|
|
25
|
+
size="s"
|
|
26
|
+
text={LANG_LOCALE[locale || "en"].short}
|
|
27
|
+
isExpanded={isOpened}
|
|
28
|
+
onClick={onClick}
|
|
29
|
+
/>
|
|
30
|
+
)}
|
|
31
|
+
>
|
|
32
|
+
<Menu.Section>
|
|
33
|
+
{langPickerOptions.map(({ key, value }) => (
|
|
34
|
+
<Menu.ItemWithCheckmark onClick={() => handleSelect(key)} key={key} isChecked={locale === key}>
|
|
35
|
+
{value}
|
|
36
|
+
</Menu.ItemWithCheckmark>
|
|
37
|
+
))}
|
|
38
|
+
</Menu.Section>
|
|
39
|
+
</Menu>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as styles from "@/components/app/BaseLayout/styles.scss";
|
|
2
|
+
import { Header } from "@/components/app/Header";
|
|
3
|
+
import { ReportBody } from "@/components/app/ReportBody";
|
|
4
|
+
import { ReportHeader } from "@/components/app/ReportHeader";
|
|
5
|
+
import { ReportMetadata } from "@/components/app/ReportMetadata";
|
|
6
|
+
|
|
7
|
+
const MainReport = () => {
|
|
8
|
+
return (
|
|
9
|
+
<>
|
|
10
|
+
<Header />
|
|
11
|
+
<div className={styles.content}>
|
|
12
|
+
<ReportHeader />
|
|
13
|
+
<ReportMetadata />
|
|
14
|
+
<ReportBody />
|
|
15
|
+
</div>
|
|
16
|
+
</>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
export default MainReport;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
2
|
+
import i18n from "i18next";
|
|
3
|
+
import { FunctionalComponent } from "preact";
|
|
4
|
+
import { useState } from "preact/hooks";
|
|
5
|
+
import LineGeneralCopy3 from "@/assets/svg/line-general-copy-3.svg";
|
|
6
|
+
import { MetadataButton } from "@/components/app/MetadataButton";
|
|
7
|
+
import { MetadataProps } from "@/components/app/ReportMetadata";
|
|
8
|
+
import { Button } from "@/components/commons/Button";
|
|
9
|
+
import { Menu } from "@/components/commons/Menu";
|
|
10
|
+
import { Text } from "@/components/commons/Typography";
|
|
11
|
+
import { useI18n } from "@/stores/locale";
|
|
12
|
+
import { copyToClipboard } from "@/utils/copyToClipboard";
|
|
13
|
+
import * as styles from "./styles.scss";
|
|
14
|
+
|
|
15
|
+
const { t } = useI18n("ui");
|
|
16
|
+
|
|
17
|
+
export const MetadataList: FunctionalComponent<MetadataProps & { columns?: number }> = ({
|
|
18
|
+
envInfo,
|
|
19
|
+
size = "m",
|
|
20
|
+
columns = 2,
|
|
21
|
+
}) => {
|
|
22
|
+
return (
|
|
23
|
+
<div
|
|
24
|
+
class={styles["report-metadata-list"]}
|
|
25
|
+
style={{ gridTemplateColumns: `repeat(${columns}, ${100 / columns - 5}%)` }}
|
|
26
|
+
>
|
|
27
|
+
{envInfo?.map((envInfo) => (
|
|
28
|
+
<MetadataKeyValue size={size} title={envInfo.name} value={envInfo.value} values={envInfo.values} />
|
|
29
|
+
))}
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const TestResultMetadataList: FunctionalComponent<MetadataProps> = ({ groupedLabels, size = "m" }) => {
|
|
35
|
+
return (
|
|
36
|
+
<div class={styles["report-metadata-list"]}>
|
|
37
|
+
{groupedLabels &&
|
|
38
|
+
Object.entries(groupedLabels)?.map(([name, values]) => (
|
|
39
|
+
<MetadataKeyValue size={size} title={name} values={values} />
|
|
40
|
+
))}
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
export const Metadata: FunctionalComponent<MetadataProps> = ({ envInfo }) => {
|
|
45
|
+
const [isOpened, setIsOpen] = useState(true);
|
|
46
|
+
return (
|
|
47
|
+
<div class={styles["report-metadata"]}>
|
|
48
|
+
<MetadataButton isOpened={isOpened} setIsOpen={setIsOpen} counter={envInfo.length} title={t("metadata")} />
|
|
49
|
+
{isOpened && <MetadataList envInfo={envInfo} />}
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
const MetadataTooltip = ({ value }) => {
|
|
54
|
+
const { t } = useI18n("ui");
|
|
55
|
+
return (
|
|
56
|
+
<div className={styles["metadata-tooltip"]}>
|
|
57
|
+
<div className={styles["metadata-tooltip-value"]}>
|
|
58
|
+
<Text>{value}</Text>
|
|
59
|
+
</div>
|
|
60
|
+
<Button style={"outline"} icon={LineGeneralCopy3.id} text={t("copy")} onClick={() => copyToClipboard(value)} />
|
|
61
|
+
</div>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
const MetaDataKeyLabel: FunctionalComponent<{
|
|
65
|
+
size?: "s" | "m";
|
|
66
|
+
value: string;
|
|
67
|
+
}> = ({ size = "s", value }) => {
|
|
68
|
+
return (
|
|
69
|
+
<Menu
|
|
70
|
+
size="xl"
|
|
71
|
+
menuTrigger={({ onClick }) => (
|
|
72
|
+
<div className={styles["report-metadata-keyvalue-wrapper"]}>
|
|
73
|
+
<Text type={"ui"} size={size} onClick={onClick} bold className={styles["report-metadata-keyvalue-value"]}>
|
|
74
|
+
{value}
|
|
75
|
+
</Text>
|
|
76
|
+
</div>
|
|
77
|
+
)}
|
|
78
|
+
>
|
|
79
|
+
<Menu.Section>
|
|
80
|
+
<MetadataTooltip value={value} />
|
|
81
|
+
</Menu.Section>
|
|
82
|
+
</Menu>
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const MetadataKeyValue: FunctionalComponent<{
|
|
87
|
+
title: string;
|
|
88
|
+
value?: string;
|
|
89
|
+
values?: string[];
|
|
90
|
+
size?: "s" | "m";
|
|
91
|
+
}> = ({ title, value, values, size = "m" }) => {
|
|
92
|
+
return (
|
|
93
|
+
<div className={styles["report-metadata-keyvalue"]}>
|
|
94
|
+
<Text
|
|
95
|
+
type={"ui"}
|
|
96
|
+
size={size}
|
|
97
|
+
className={clsx(styles["report-metadata-keyvalue-title"], styles[`report-metadata-${size}`])}
|
|
98
|
+
>
|
|
99
|
+
{title}
|
|
100
|
+
</Text>
|
|
101
|
+
{values?.length ? (
|
|
102
|
+
<div className={styles["report-metadata-values"]}>
|
|
103
|
+
{values.map((item) => (
|
|
104
|
+
<MetaDataKeyLabel value={item} />
|
|
105
|
+
))}
|
|
106
|
+
</div>
|
|
107
|
+
) : (
|
|
108
|
+
<div className={styles["report-metadata-values"]}>
|
|
109
|
+
<MetaDataKeyLabel value={value} />
|
|
110
|
+
</div>
|
|
111
|
+
)}
|
|
112
|
+
</div>
|
|
113
|
+
);
|
|
114
|
+
};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
@import "../../../assets/scss/mixins.scss";
|
|
2
|
+
|
|
3
|
+
.report-metadata-wrapper {
|
|
4
|
+
padding: 0 24px;
|
|
5
|
+
align-items: center;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.report-metadata-separator {
|
|
9
|
+
border-left: 1px solid var(--on-border-primary);
|
|
10
|
+
height: 24px;
|
|
11
|
+
margin: 11px 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.report-metadata-status {
|
|
15
|
+
display: flex;
|
|
16
|
+
gap: 24px;
|
|
17
|
+
align-items: center;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.report-metadata-summary {
|
|
21
|
+
display: flex;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
align-items: baseline;
|
|
24
|
+
padding: 16px 0;
|
|
25
|
+
border-top: 1px solid var(--on-border-primary);
|
|
26
|
+
border-bottom: 1px solid var(--on-border-primary);
|
|
27
|
+
width: 100%;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.report-metadata-all-tests {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex: 1 1 auto;
|
|
33
|
+
gap: 24px;
|
|
34
|
+
margin-right: 8px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.metadata-item-title {
|
|
38
|
+
color: var(--on-text-secondary);
|
|
39
|
+
margin-bottom: 6px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.metadata-item-value {
|
|
43
|
+
font-weight: bold;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.report-metadata {
|
|
47
|
+
padding: 16px 0;
|
|
48
|
+
border-bottom: 1px solid var(--on-border-primary);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.report-metadata-keyvalue {
|
|
52
|
+
display: inline-grid;
|
|
53
|
+
grid-template-columns: 30% 60%;
|
|
54
|
+
gap: 10%;
|
|
55
|
+
align-items: center;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.report-metadata-values {
|
|
59
|
+
display: flex;
|
|
60
|
+
gap: 6px;
|
|
61
|
+
align-items: center;
|
|
62
|
+
div {
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
text-overflow: ellipsis;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.report-metadata-s {
|
|
69
|
+
font-size: 12px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.report-metadata-keyvalue-title {
|
|
73
|
+
padding: 8px 0;
|
|
74
|
+
white-space: nowrap;
|
|
75
|
+
text-overflow: ellipsis;
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.report-metadata-keyvalue-wrapper {
|
|
80
|
+
background: var(--on-border-primary);
|
|
81
|
+
border-radius: 4px;
|
|
82
|
+
text-overflow: ellipsis;
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
padding: 2px 4px;
|
|
85
|
+
line-height: 16px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.report-metadata-keyvalue-value {
|
|
89
|
+
width: max-content;
|
|
90
|
+
height: max-content;
|
|
91
|
+
overflow: hidden;
|
|
92
|
+
white-space: nowrap;
|
|
93
|
+
text-overflow: ellipsis;
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.report-metadata-list {
|
|
98
|
+
display: grid;
|
|
99
|
+
column-gap: 5%;
|
|
100
|
+
grid-template-columns: repeat(2, 45%);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.metadata-test-type {
|
|
104
|
+
display: flex;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.metadata-color-badge {
|
|
108
|
+
width: 4px;
|
|
109
|
+
height: 12px;
|
|
110
|
+
border-radius: 2px;
|
|
111
|
+
background: var(--on-text-secondary);
|
|
112
|
+
margin-right: 8px;
|
|
113
|
+
align-self: center;
|
|
114
|
+
@include status-bg-and-text;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.metadata-with-icon {
|
|
118
|
+
display: flex;
|
|
119
|
+
align-items: center;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.metadata-icon {
|
|
123
|
+
margin-right: 8px;
|
|
124
|
+
color: var(--on-icon-secondary);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.metadata-tooltip {
|
|
128
|
+
padding: 12px 12px 16px;
|
|
129
|
+
display: flex;
|
|
130
|
+
flex-wrap: wrap;
|
|
131
|
+
justify-content: flex-end;
|
|
132
|
+
gap: 12px;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.metadata-tooltip-value {
|
|
136
|
+
flex: 1 1 auto;
|
|
137
|
+
min-width: 320px;
|
|
138
|
+
background: var(--bg-base-secondary);
|
|
139
|
+
max-height: 238px;
|
|
140
|
+
padding: 8px 16px;
|
|
141
|
+
overflow: hidden;
|
|
142
|
+
overflow-y: auto;
|
|
143
|
+
border-radius: 8px;
|
|
144
|
+
word-wrap: break-word;
|
|
145
|
+
overflow-wrap: break-word;
|
|
146
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
2
|
+
import { FunctionalComponent } from "preact";
|
|
3
|
+
import { ArrowButton } from "@/components/app/ArrowButton";
|
|
4
|
+
import { Counter } from "@/components/commons/Counter";
|
|
5
|
+
import { Text } from "@/components/commons/Typography";
|
|
6
|
+
import * as styles from "./styles.scss";
|
|
7
|
+
|
|
8
|
+
interface MetadataButtonProps {
|
|
9
|
+
isOpened?: boolean;
|
|
10
|
+
setIsOpen: (isOpen: boolean) => void;
|
|
11
|
+
counter?: number;
|
|
12
|
+
title?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const MetadataButton: FunctionalComponent<MetadataButtonProps> = ({ isOpened, setIsOpen, counter, title }) => {
|
|
16
|
+
return (
|
|
17
|
+
<div
|
|
18
|
+
className={clsx(styles["report-metadata-header"], isOpened && styles["report-metadata-header-opened"])}
|
|
19
|
+
onClick={() => setIsOpen(!isOpened)}
|
|
20
|
+
>
|
|
21
|
+
<Text size={"m"} bold>
|
|
22
|
+
{title}
|
|
23
|
+
</Text>
|
|
24
|
+
{counter && <Counter count={counter} size="s" />}
|
|
25
|
+
<ArrowButton
|
|
26
|
+
isOpened={isOpened}
|
|
27
|
+
iconSize={"s"}
|
|
28
|
+
buttonSize={"s"}
|
|
29
|
+
className={styles["report-metadata-header-arrow"]}
|
|
30
|
+
/>
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
};
|