@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,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 {
|
|
6
|
+
categoriesStore,
|
|
7
|
+
clearCategoriesFilters,
|
|
8
|
+
filteredCategories,
|
|
9
|
+
noTests,
|
|
10
|
+
noTestsFound,
|
|
11
|
+
setCategoriesStatus,
|
|
12
|
+
} from "@/stores/categories";
|
|
13
|
+
import { useI18n } from "@/stores/locale";
|
|
14
|
+
import { currentTab } from "@/stores/tabs";
|
|
15
|
+
import * as styles from "./styles.scss";
|
|
16
|
+
|
|
17
|
+
export const CategoriesList = () => {
|
|
18
|
+
const { t } = useI18n("empty");
|
|
19
|
+
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
setCategoriesStatus(currentTab.value as AwesomeStatus);
|
|
22
|
+
}, [currentTab.value]);
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Loadable
|
|
26
|
+
source={categoriesStore}
|
|
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={() => clearCategoriesFilters()}
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<div className={styles["tree-list"]}>
|
|
61
|
+
<Tree tree={filteredCategories.value} statusFilter={currentTab.value as AwesomeStatus} root />
|
|
62
|
+
</div>
|
|
63
|
+
);
|
|
64
|
+
}}
|
|
65
|
+
/>
|
|
66
|
+
);
|
|
67
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Heading, Loadable, PageLoader } from "@allurereport/web-components";
|
|
2
|
+
import { useEffect } from "preact/compat";
|
|
3
|
+
import { CategoriesList } from "@/components/Categories/CategoriesList";
|
|
4
|
+
import { HeaderActions } from "@/components/HeaderActions/HeaderActions";
|
|
5
|
+
import SideBySide from "@/components/SideBySide";
|
|
6
|
+
import TestResult from "@/components/TestResult";
|
|
7
|
+
import { useI18n } from "@/stores";
|
|
8
|
+
import { fetchCategoriesData } from "@/stores/categories";
|
|
9
|
+
import { route } from "@/stores/router";
|
|
10
|
+
import { fetchTestResult, testResultStore } from "@/stores/testResults";
|
|
11
|
+
import * as styles from "./styles.scss";
|
|
12
|
+
|
|
13
|
+
const Categories = () => {
|
|
14
|
+
const { params } = route.value;
|
|
15
|
+
const { testResultId } = params;
|
|
16
|
+
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
fetchCategoriesData();
|
|
19
|
+
}, []);
|
|
20
|
+
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (testResultId) {
|
|
23
|
+
fetchTestResult(testResultId);
|
|
24
|
+
}
|
|
25
|
+
}, [testResultId]);
|
|
26
|
+
|
|
27
|
+
const testResult = (
|
|
28
|
+
<Loadable
|
|
29
|
+
source={testResultStore}
|
|
30
|
+
renderLoader={() => <PageLoader />}
|
|
31
|
+
transformData={(data) => data[testResultId]}
|
|
32
|
+
renderError={() => <div />}
|
|
33
|
+
renderData={(testResultItem) => (
|
|
34
|
+
<>
|
|
35
|
+
<div className={styles.wrapper} key={testResultItem?.id}>
|
|
36
|
+
<TestResult testResult={testResultItem} />
|
|
37
|
+
</div>
|
|
38
|
+
</>
|
|
39
|
+
)}
|
|
40
|
+
/>
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
const CategoriesSide = () => {
|
|
44
|
+
const { t } = useI18n("nav");
|
|
45
|
+
return (
|
|
46
|
+
<div className={styles.suites}>
|
|
47
|
+
<Heading size={"s"} className={styles["suites-title"]}>
|
|
48
|
+
{t("categories")}
|
|
49
|
+
</Heading>
|
|
50
|
+
|
|
51
|
+
<HeaderActions />
|
|
52
|
+
<CategoriesList />
|
|
53
|
+
</div>
|
|
54
|
+
);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
return <SideBySide left={<CategoriesSide />} right={testResult} />;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default Categories;
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Text } from "@allurereport/web-components";
|
|
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"} rel="noreferrer">
|
|
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,33 @@
|
|
|
1
|
+
import { getReportOptions } from "@allurereport/web-commons";
|
|
2
|
+
import { Text } from "@allurereport/web-components";
|
|
3
|
+
import { useEffect, useState } from "preact/hooks";
|
|
4
|
+
import type { AwesomeReportOptions } from "types";
|
|
5
|
+
import { currentLocaleIso } from "@/stores";
|
|
6
|
+
import * as styles from "./styles.scss";
|
|
7
|
+
|
|
8
|
+
export const FooterVersion = () => {
|
|
9
|
+
const [createdAt, setCreatedAt] = useState<number | null>(null);
|
|
10
|
+
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const reportOptions = getReportOptions<AwesomeReportOptions>();
|
|
13
|
+
if (reportOptions?.createdAt) {
|
|
14
|
+
setCreatedAt(Number(reportOptions.createdAt));
|
|
15
|
+
}
|
|
16
|
+
}, []);
|
|
17
|
+
|
|
18
|
+
const formattedCreatedAt = new Date(createdAt as number).toLocaleDateString(currentLocaleIso.value as string, {
|
|
19
|
+
month: "numeric",
|
|
20
|
+
day: "numeric",
|
|
21
|
+
year: "numeric",
|
|
22
|
+
hour: "numeric",
|
|
23
|
+
minute: "numeric",
|
|
24
|
+
second: "numeric",
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<Text type="paragraph" size="m" className={styles.version}>
|
|
29
|
+
{formattedCreatedAt}
|
|
30
|
+
<span> Ver: 3.0.0</span>
|
|
31
|
+
</Text>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import * as styles from "@/components/BaseLayout/styles.scss";
|
|
3
|
+
import { FooterLogo } from "@/components/Footer/FooterLogo";
|
|
4
|
+
import { FooterVersion } from "@/components/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,14 @@
|
|
|
1
|
+
import { LanguagePicker } from "@/components/LanguagePicker";
|
|
2
|
+
import { ThemeButton } from "@/components/ThemeButton/ThemeButton";
|
|
3
|
+
import * as styles from "./styles.scss";
|
|
4
|
+
|
|
5
|
+
export const Header = () => {
|
|
6
|
+
return (
|
|
7
|
+
<div className={styles.above}>
|
|
8
|
+
<div className={styles.right}>
|
|
9
|
+
<LanguagePicker />
|
|
10
|
+
<ThemeButton />
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
);
|
|
14
|
+
};
|
|
@@ -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,90 @@
|
|
|
1
|
+
import { Button, Menu, Toggle, allureIcons } from "@allurereport/web-components";
|
|
2
|
+
import { useI18n } from "@/stores/locale";
|
|
3
|
+
import { setTreeFilter, treeFiltersStore } from "@/stores/tree";
|
|
4
|
+
import * as styles from "./styles.scss";
|
|
5
|
+
|
|
6
|
+
export const Filters = () => {
|
|
7
|
+
const { t } = useI18n("filters");
|
|
8
|
+
const { flaky, retry, new: isNew } = treeFiltersStore.value.filter;
|
|
9
|
+
const hasFilter = flaky || retry || isNew;
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<Menu
|
|
13
|
+
menuTrigger={({ isOpened, onClick }) => (
|
|
14
|
+
<div className={hasFilter && styles.filtersBtnWithFilters}>
|
|
15
|
+
<Button
|
|
16
|
+
icon={allureIcons.lineGeneralSettings1}
|
|
17
|
+
text={t("more-filters")}
|
|
18
|
+
size="m"
|
|
19
|
+
style="outline"
|
|
20
|
+
isActive={isOpened}
|
|
21
|
+
data-testid="filters-button"
|
|
22
|
+
onClick={onClick}
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
)}
|
|
26
|
+
>
|
|
27
|
+
<Menu.Section>
|
|
28
|
+
<Menu.Item
|
|
29
|
+
closeMenuOnClick={false}
|
|
30
|
+
ariaLabel={t("enable-filter", { filter: t("flaky") })}
|
|
31
|
+
onClick={() => {
|
|
32
|
+
setTreeFilter("flaky", !flaky);
|
|
33
|
+
}}
|
|
34
|
+
leadingIcon={allureIcons.lineGeneralZap}
|
|
35
|
+
rightSlot={
|
|
36
|
+
<div className={styles.filterToggle}>
|
|
37
|
+
<Toggle
|
|
38
|
+
focusable={false}
|
|
39
|
+
value={flaky}
|
|
40
|
+
label={t("enable-filter", { filter: t("flaky") })}
|
|
41
|
+
data-testid="flaky-filter"
|
|
42
|
+
onChange={(value) => setTreeFilter("flaky", value)}
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
}
|
|
46
|
+
>
|
|
47
|
+
{t("flaky")}
|
|
48
|
+
</Menu.Item>
|
|
49
|
+
<Menu.Item
|
|
50
|
+
closeMenuOnClick={false}
|
|
51
|
+
ariaLabel={t("enable-filter", { filter: t("retry") })}
|
|
52
|
+
onClick={() => setTreeFilter("retry", !retry)}
|
|
53
|
+
leadingIcon={allureIcons.lineArrowsRefreshCcw1}
|
|
54
|
+
rightSlot={
|
|
55
|
+
<div className={styles.filterToggle}>
|
|
56
|
+
<Toggle
|
|
57
|
+
focusable={false}
|
|
58
|
+
value={retry}
|
|
59
|
+
label={t("enable-filter", { filter: t("retry") })}
|
|
60
|
+
data-testid="retry-filter"
|
|
61
|
+
onChange={(value) => setTreeFilter("retry", value)}
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
}
|
|
65
|
+
>
|
|
66
|
+
{t("retry")}
|
|
67
|
+
</Menu.Item>
|
|
68
|
+
<Menu.Item
|
|
69
|
+
closeMenuOnClick={false}
|
|
70
|
+
ariaLabel={t("enable-filter", { filter: t("new") })}
|
|
71
|
+
onClick={() => setTreeFilter("new", !isNew)}
|
|
72
|
+
leadingIcon={allureIcons.lineAlertsNotificationBox}
|
|
73
|
+
rightSlot={
|
|
74
|
+
<div className={styles.filterToggle}>
|
|
75
|
+
<Toggle
|
|
76
|
+
focusable={false}
|
|
77
|
+
value={isNew}
|
|
78
|
+
label={t("enable-filter", { filter: t("new") })}
|
|
79
|
+
data-testid="new-filter"
|
|
80
|
+
onChange={(value) => setTreeFilter("new", value)}
|
|
81
|
+
/>
|
|
82
|
+
</div>
|
|
83
|
+
}
|
|
84
|
+
>
|
|
85
|
+
{t("new")}
|
|
86
|
+
</Menu.Item>
|
|
87
|
+
</Menu.Section>
|
|
88
|
+
</Menu>
|
|
89
|
+
);
|
|
90
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { statusesList } from "@allurereport/core-api";
|
|
2
|
+
import { Counter, Loadable, SearchBox } from "@allurereport/web-components";
|
|
3
|
+
import { SortBy } from "@/components/HeaderActions/SortBy";
|
|
4
|
+
import { Tab } from "@/components/Tabs";
|
|
5
|
+
import { statsStore } from "@/stores";
|
|
6
|
+
import { useI18n } from "@/stores/locale";
|
|
7
|
+
import { setTreeQuery, treeFiltersStore } from "@/stores/tree";
|
|
8
|
+
import { capitalize } from "@/utils/capitalize";
|
|
9
|
+
import { Filters } from "./Filters";
|
|
10
|
+
import * as styles from "./styles.scss";
|
|
11
|
+
|
|
12
|
+
const Search = () => {
|
|
13
|
+
const { query } = treeFiltersStore.value;
|
|
14
|
+
const { t } = useI18n("search");
|
|
15
|
+
|
|
16
|
+
return <SearchBox placeholder={t("search-placeholder")} value={query} onChange={setTreeQuery} />;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const HeaderActions = () => {
|
|
20
|
+
const { t } = useI18n("statuses");
|
|
21
|
+
|
|
22
|
+
const ALL_TAB = "total";
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<div className={styles.headerActions}>
|
|
26
|
+
<div className={styles["header-search"]}>
|
|
27
|
+
<Search />
|
|
28
|
+
<Filters />
|
|
29
|
+
</div>
|
|
30
|
+
<div className={styles["header-filters"]}>
|
|
31
|
+
<div className={styles["header-tabs"]}>
|
|
32
|
+
<Loadable
|
|
33
|
+
source={statsStore}
|
|
34
|
+
renderData={(stats) => {
|
|
35
|
+
const allStatuses = statusesList
|
|
36
|
+
.map((status) => ({ status, value: stats[status] }))
|
|
37
|
+
.filter(({ value }) => value)
|
|
38
|
+
.map(({ status, value }) => (
|
|
39
|
+
<Tab data-testid={`tab-${status}`} key={status} id={status}>
|
|
40
|
+
{capitalize(t(status) ?? status)} <Counter count={value} size="s" status={status} />
|
|
41
|
+
</Tab>
|
|
42
|
+
));
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<>
|
|
46
|
+
<Tab data-testid="tab-all" id={ALL_TAB}>
|
|
47
|
+
{capitalize(t("total"))} <Counter count={stats?.total ?? 0} size="s" />
|
|
48
|
+
</Tab>
|
|
49
|
+
{allStatuses}
|
|
50
|
+
</>
|
|
51
|
+
);
|
|
52
|
+
}}
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
<SortBy />
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
);
|
|
59
|
+
};
|