@allurereport/web-awesome 3.0.0-beta.10 → 3.0.0-beta.12
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-52d1decd.js +1 -0
- package/dist/multi/174.app-52d1decd.js +1 -0
- package/dist/multi/252.app-52d1decd.js +1 -0
- package/dist/multi/282.app-52d1decd.js +1 -0
- package/dist/multi/29.app-52d1decd.js +1 -0
- package/dist/multi/416.app-52d1decd.js +1 -0
- package/dist/multi/527.app-52d1decd.js +1 -0
- package/dist/multi/600.app-52d1decd.js +1 -0
- package/dist/multi/605.app-52d1decd.js +1 -0
- package/dist/multi/638.app-52d1decd.js +1 -0
- package/dist/multi/672.app-52d1decd.js +1 -0
- package/dist/multi/686.app-52d1decd.js +1 -0
- package/dist/multi/725.app-52d1decd.js +1 -0
- package/dist/multi/741.app-52d1decd.js +1 -0
- package/dist/multi/755.app-52d1decd.js +1 -0
- package/dist/multi/894.app-52d1decd.js +1 -0
- package/dist/multi/943.app-52d1decd.js +1 -0
- package/dist/multi/980.app-52d1decd.js +1 -0
- package/dist/multi/app-52d1decd.js +2 -0
- package/dist/multi/{app-d01d0c66.js.LICENSE.txt → app-52d1decd.js.LICENSE.txt} +7 -0
- package/dist/multi/manifest.json +20 -20
- package/dist/multi/styles-52d1decd.css +41 -0
- package/dist/single/app-83b0c4fc.js +2 -0
- package/dist/single/{app-6596cb08.js.LICENSE.txt → app-83b0c4fc.js.LICENSE.txt} +7 -0
- package/dist/single/manifest.json +1 -1
- package/package.json +4 -4
- package/src/assets/scss/palette.scss +391 -391
- package/src/assets/scss/theme.scss +9 -1
- package/src/assets/scss/vars.scss +0 -1
- package/src/components/BaseLayout/styles.scss +10 -2
- package/src/components/EnvironmentPicker/index.tsx +51 -0
- package/src/components/EnvironmentPicker/styles.scss +9 -0
- package/src/components/Footer/FooterLogo.tsx +1 -2
- package/src/components/Header/index.tsx +4 -10
- package/src/components/HeaderControls/index.tsx +20 -0
- package/src/components/MainReport/styles.scss +2 -1
- package/src/components/Metadata/index.tsx +6 -4
- package/src/components/MetadataButton/index.tsx +12 -4
- package/src/components/MetadataButton/styles.scss +3 -0
- package/src/components/ReportBody/index.tsx +3 -2
- package/src/components/ReportHeader/ReportHeaderLogo.tsx +6 -2
- package/src/components/ReportHeader/ReportHeaderPie.tsx +1 -2
- package/src/components/ReportMetadata/MetadataSummary.tsx +56 -63
- package/src/components/ReportMetadata/MetadataWithIcon.tsx +1 -1
- package/src/components/ReportMetadata/index.tsx +50 -3
- package/src/components/SideBySide/styles.scss +2 -3
- package/src/components/SplitLayout/index.tsx +2 -2
- package/src/components/SplitLayout/styles.scss +2 -1
- package/src/components/TestResult/TestStepsEmpty/index.tsx +2 -2
- package/src/components/TestResult/{TestResultAttachmentsView → TrAttachmentsView}/index.tsx +4 -4
- package/src/components/TestResult/{TestResultDescription → TrDescription}/index.tsx +2 -2
- package/src/components/TestResult/{TestResultDropdown → TrDropdown}/index.tsx +1 -1
- 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 +3 -5
- package/src/components/TestResult/TrError/index.tsx +21 -6
- package/src/components/TestResult/TrError/styles.scss +92 -2
- package/src/components/TestResult/{TestResultHeader/TestResultBreadcrumbs.tsx → TrHeader/TrBreadcrumbs.tsx} +3 -3
- package/src/components/TestResult/TrHeader/index.tsx +15 -0
- package/src/components/TestResult/{TestResultHistory/TestResultHistoryItem.tsx → TrHistory/TrHistoryItem.tsx} +3 -3
- package/src/components/TestResult/{TestResultHistory → TrHistory}/index.tsx +5 -5
- package/src/components/TestResult/{TestResultInfo/TestResultInfoStatuses.tsx → TrInfo/TrInfoStatuses.tsx} +1 -1
- package/src/components/TestResult/{TestResultInfo → TrInfo}/index.tsx +37 -23
- package/src/components/TestResult/{TestResultLinks → TrLinks}/index.tsx +6 -6
- package/src/components/TestResult/{TestResultMetadata → TrMetadata}/index.tsx +4 -4
- package/src/components/TestResult/{TestResultNavigation → TrNavigation}/index.tsx +3 -2
- package/src/components/TestResult/TrOverview.tsx +47 -0
- package/src/components/TestResult/{TestResultParameters → TrParameters}/index.tsx +2 -2
- package/src/components/TestResult/{TestResultPrevStatuses → TrPrevStatuses}/index.tsx +6 -6
- package/src/components/TestResult/TrPwTraces/PwTrace.tsx +34 -0
- package/src/components/TestResult/TrPwTraces/PwTraceButton.tsx +33 -0
- package/src/components/TestResult/TrPwTraces/index.tsx +29 -0
- package/src/components/TestResult/TrPwTraces/styles.scss +20 -0
- package/src/components/TestResult/{TestResultRetriesView/TestResultRetriesItem.tsx → TrRetriesView/TrRetriesItem.tsx} +3 -3
- package/src/components/TestResult/{TestResultRetriesView → TrRetriesView}/index.tsx +4 -6
- package/src/components/TestResult/{TestResultSetup → TrSetup}/index.tsx +11 -11
- package/src/components/TestResult/{TestResultSeverity → TrSeverity}/index.tsx +1 -1
- package/src/components/TestResult/{TestResultStatus → TrStatus}/index.tsx +3 -2
- package/src/components/TestResult/{TestResultSteps/testResultAttachment.tsx → TrSteps/TrAttachment.tsx} +10 -7
- package/src/components/TestResult/{TestResultSteps/testResultAttachmentInfo.tsx → TrSteps/TrAttachmentInfo.tsx} +8 -8
- package/src/components/TestResult/{TestResultSteps/testResultStep.tsx → TrSteps/TrStep.tsx} +25 -14
- package/src/components/TestResult/{TestResultSteps/testResultStepInfo.tsx → TrSteps/TrStepInfo.tsx} +2 -2
- package/src/components/TestResult/{TestResultSteps → TrSteps}/index.tsx +8 -8
- package/src/components/TestResult/{TestResultSteps → TrSteps}/styles.scss +2 -1
- package/src/components/TestResult/{TestResultSteps → TrSteps}/wrongAttachment.tsx +1 -1
- package/src/components/TestResult/{TestResultTabs → TrTabs}/index.tsx +6 -6
- package/src/components/TestResult/{TestResultTeardown → TrTeardown}/index.tsx +11 -11
- package/src/components/TestResult/index.tsx +42 -30
- package/src/components/TestResult/styles.scss +2 -1
- package/src/components/Tree/index.tsx +99 -16
- package/src/components/Tree/styles.scss +16 -1
- package/src/index.tsx +36 -33
- package/src/{i18n/locales → locales}/az.json +14 -4
- package/src/{i18n/locales → locales}/de.json +13 -4
- package/src/{i18n/locales → locales}/en.json +15 -6
- package/src/{i18n/locales → locales}/es.json +13 -4
- package/src/{i18n/locales → locales}/fr.json +13 -4
- package/src/{i18n/locales → locales}/he.json +13 -4
- package/src/{i18n/locales/am.json → locales/hy.json} +13 -4
- package/src/{i18n/locales → locales}/it.json +13 -4
- package/src/{i18n/locales → locales}/ja.json +13 -4
- package/src/{i18n/locales → locales}/ka.json +16 -7
- package/src/{i18n/locales → locales}/kr.json +15 -6
- package/src/{i18n/locales → locales}/nl.json +13 -4
- package/src/{i18n/locales → locales}/pl.json +14 -5
- package/src/{i18n/locales → locales}/pt.json +12 -4
- package/src/{i18n/locales → locales}/ru.json +14 -5
- package/src/{i18n/locales → locales}/sv.json +13 -4
- package/src/{i18n/locales → locales}/tr.json +13 -4
- package/src/{i18n/locales → locales}/zh.json +13 -4
- package/src/stores/chart.ts +3 -3
- package/src/stores/env.ts +88 -0
- package/src/stores/locale.ts +4 -4
- package/src/stores/stats.ts +52 -7
- package/src/stores/testResults.ts +6 -6
- package/src/stores/tree.ts +48 -17
- package/src/stores/variables.ts +38 -0
- package/types.d.ts +2 -1
- package/dist/multi/141.app-d01d0c66.js +0 -1
- package/dist/multi/222.app-d01d0c66.js +0 -1
- package/dist/multi/335.app-d01d0c66.js +0 -1
- package/dist/multi/34.app-d01d0c66.js +0 -1
- package/dist/multi/349.app-d01d0c66.js +0 -1
- package/dist/multi/378.app-d01d0c66.js +0 -1
- package/dist/multi/406.app-d01d0c66.js +0 -1
- package/dist/multi/476.app-d01d0c66.js +0 -1
- package/dist/multi/53.app-d01d0c66.js +0 -1
- package/dist/multi/584.app-d01d0c66.js +0 -1
- package/dist/multi/690.app-d01d0c66.js +0 -1
- package/dist/multi/747.app-d01d0c66.js +0 -1
- package/dist/multi/767.app-d01d0c66.js +0 -1
- package/dist/multi/816.app-d01d0c66.js +0 -1
- package/dist/multi/83.app-d01d0c66.js +0 -1
- package/dist/multi/873.app-d01d0c66.js +0 -1
- package/dist/multi/920.app-d01d0c66.js +0 -1
- package/dist/multi/991.app-d01d0c66.js +0 -1
- package/dist/multi/app-d01d0c66.js +0 -2
- package/dist/multi/styles-d01d0c66.css +0 -39
- package/dist/single/app-6596cb08.js +0 -2
- package/src/components/LanguagePicker/index.tsx +0 -40
- 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/TestResultHeader/index.tsx +0 -21
- package/src/components/TestResult/TestResultOverview.tsx +0 -43
- package/src/components/ThemeButton/ThemeButton.tsx +0 -20
- package/src/i18n/constants.ts +0 -124
- /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/{TestResultHeader → TrHeader}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultHistory → TrHistory}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultInfo → TrInfo}/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
- /package/src/components/TestResult/{TestResultTabs → TrTabs}/styles.scss +0 -0
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
--ad-other-modal-overlay: var(--ad-other-modal-overlay-day);
|
|
4
4
|
--bg-alpha-capella-heavy: var(--bg-alpha-capella-heavy-day);
|
|
5
5
|
--bg-alpha-capella: var(--bg-alpha-capella-day);
|
|
6
|
-
--bg-alpha-castor-heavy: var(--bg-alpha-castor-heavy-day);
|
|
7
6
|
--bg-base-modal: var(--bg-base-modal-day);
|
|
8
7
|
--bg-base-neutral: var(--bg-base-neutral-day);
|
|
9
8
|
--bg-base-primary: var(--bg-base-primary-day);
|
|
@@ -49,6 +48,11 @@
|
|
|
49
48
|
--on-text-primary: var(--on-text-primary-day);
|
|
50
49
|
--on-text-secondary: var(--on-text-secondary-day);
|
|
51
50
|
--scrollbar-color: var(--gray-300);
|
|
51
|
+
--bg-alpha-atlas: var(--atlas-day-darken-1-8);
|
|
52
|
+
--bg-alpha-rau: var(--rau-day-darken-1-8);
|
|
53
|
+
--bg-alpha-castor: var(--castor-day-darken-1-8);
|
|
54
|
+
--bg-alpha-skat: var(--skat-day-darken-1-8);
|
|
55
|
+
--bg-alpha-castor-heavy: var(--bg-alpha-castor-heavy-day);
|
|
52
56
|
|
|
53
57
|
color-scheme: light;
|
|
54
58
|
}
|
|
@@ -115,5 +119,9 @@
|
|
|
115
119
|
--on-text-secondary: var(--on-text-secondary-night);
|
|
116
120
|
|
|
117
121
|
--scrollbar-color: var(--gray-400);
|
|
122
|
+
--bg-alpha-atlas: var(--atlas-night-darken-5-12);
|
|
123
|
+
--bg-alpha-rau: var(--rau-night-darken-5-12);
|
|
124
|
+
--bg-alpha-castor: var(--castor-night-darken-5-20);
|
|
125
|
+
--bg-alpha-skat: var(--skat-night-darken-5-12);
|
|
118
126
|
color-scheme: dark;
|
|
119
127
|
}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
.test-results {
|
|
25
25
|
min-height: 320px;
|
|
26
|
-
padding-bottom:
|
|
26
|
+
padding-bottom: 64px;
|
|
27
27
|
padding-top: 12px;
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -51,10 +51,18 @@
|
|
|
51
51
|
display: flex;
|
|
52
52
|
justify-content: space-between;
|
|
53
53
|
align-items: center;
|
|
54
|
-
padding:
|
|
54
|
+
padding: 8px;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
.test-result-errors {
|
|
58
58
|
padding: 0 24px;
|
|
59
59
|
margin-top: 12px;
|
|
60
|
+
gap: 4px;
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-wrap: wrap;
|
|
63
|
+
width: 100%;
|
|
64
|
+
|
|
65
|
+
& > div {
|
|
66
|
+
flex: 1 1 auto;
|
|
67
|
+
}
|
|
60
68
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { DropdownButton, Menu, SvgIcon, Text, allureIcons } from "@allurereport/web-components";
|
|
2
|
+
import { useI18n } from "@/stores";
|
|
3
|
+
import { currentEnvironment, environmentsStore, setCurrentEnvironment } from "@/stores/env";
|
|
4
|
+
import * as styles from "./styles.scss";
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
7
|
+
export const EnvironmentPicker = () => {
|
|
8
|
+
const { t } = useI18n("environments");
|
|
9
|
+
const environment = currentEnvironment.value;
|
|
10
|
+
const handleSelect = (selectedOption: string) => {
|
|
11
|
+
setCurrentEnvironment(selectedOption);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
// TODO: use props instead
|
|
15
|
+
if (environmentsStore.value.data.length <= 1) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<div className={styles["environment-picker"]} data-testid={"environment-picker"}>
|
|
21
|
+
<SvgIcon id={allureIcons.environment} size={"s"} />
|
|
22
|
+
<Text className={styles["environment-picker-label"]} type={"ui"} size={"s"} bold>
|
|
23
|
+
{t("environment", { count: 1 })}:
|
|
24
|
+
</Text>
|
|
25
|
+
<Menu
|
|
26
|
+
size="s"
|
|
27
|
+
menuTrigger={({ isOpened, onClick }) => (
|
|
28
|
+
<DropdownButton
|
|
29
|
+
style="ghost"
|
|
30
|
+
size="s"
|
|
31
|
+
text={environment || t("all")}
|
|
32
|
+
isExpanded={isOpened}
|
|
33
|
+
data-testid={"environment-picker-button"}
|
|
34
|
+
onClick={onClick}
|
|
35
|
+
/>
|
|
36
|
+
)}
|
|
37
|
+
>
|
|
38
|
+
<Menu.Section>
|
|
39
|
+
<Menu.ItemWithCheckmark onClick={() => handleSelect("")} isChecked={!environment}>
|
|
40
|
+
{t("all")}
|
|
41
|
+
</Menu.ItemWithCheckmark>
|
|
42
|
+
{environmentsStore.value.data.map((env) => (
|
|
43
|
+
<Menu.ItemWithCheckmark onClick={() => handleSelect(env)} key={env} isChecked={env === environment}>
|
|
44
|
+
{env}
|
|
45
|
+
</Menu.ItemWithCheckmark>
|
|
46
|
+
))}
|
|
47
|
+
</Menu.Section>
|
|
48
|
+
</Menu>
|
|
49
|
+
</div>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import type { ClassValue } from "clsx";
|
|
2
2
|
import clsx from "clsx";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { ThemeButton } from "@/components/ThemeButton/ThemeButton";
|
|
6
|
-
import ToggleLayout from "@/components/ToggleLayout";
|
|
3
|
+
import { HeaderControls } from "@/components/HeaderControls";
|
|
4
|
+
import { TrBreadcrumbs } from "@/components/TestResult/TrHeader/TrBreadcrumbs";
|
|
7
5
|
import { route } from "@/stores/router";
|
|
8
6
|
import { testResultStore } from "@/stores/testResults";
|
|
9
7
|
import * as styles from "./styles.scss";
|
|
@@ -17,12 +15,8 @@ export const Header = ({ className }: HeaderProps) => {
|
|
|
17
15
|
|
|
18
16
|
return (
|
|
19
17
|
<div className={clsx(styles.above, className)}>
|
|
20
|
-
{id && <
|
|
21
|
-
<
|
|
22
|
-
<LanguagePicker />
|
|
23
|
-
<ToggleLayout />
|
|
24
|
-
<ThemeButton />
|
|
25
|
-
</div>
|
|
18
|
+
{id && <TrBreadcrumbs testResult={testResultStore.value?.data?.[id]} />}
|
|
19
|
+
<HeaderControls className={styles.right} />
|
|
26
20
|
</div>
|
|
27
21
|
);
|
|
28
22
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LanguagePicker, ThemeButton } from "@allurereport/web-components";
|
|
2
|
+
import { EnvironmentPicker } from "@/components/EnvironmentPicker";
|
|
3
|
+
import ToggleLayout from "@/components/ToggleLayout";
|
|
4
|
+
import { currentLocale, setLocale } from "@/stores/locale";
|
|
5
|
+
import { getTheme, themeStore, toggleTheme } from "@/stores/theme";
|
|
6
|
+
|
|
7
|
+
interface HeaderControlsProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const HeaderControls = ({ className }: HeaderControlsProps) => {
|
|
12
|
+
return (
|
|
13
|
+
<div className={className}>
|
|
14
|
+
<EnvironmentPicker />
|
|
15
|
+
<LanguagePicker locale={currentLocale.value} setLocale={setLocale} />
|
|
16
|
+
<ToggleLayout />
|
|
17
|
+
<ThemeButton theme={themeStore.value} toggleTheme={toggleTheme} getTheme={getTheme} />
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
@@ -17,6 +17,7 @@ export const MetadataList: FunctionalComponent<MetadataProps & { columns?: numbe
|
|
|
17
17
|
<div
|
|
18
18
|
class={styles["report-metadata-list"]}
|
|
19
19
|
style={{ gridTemplateColumns: `repeat(${columns}, ${100 / columns - 5}%)` }}
|
|
20
|
+
data-testid={"metadata-list"}
|
|
20
21
|
>
|
|
21
22
|
{envInfo?.map(({ name, values, value }) => (
|
|
22
23
|
<MetadataKeyValue key={name} size={size} title={name} value={value} values={values} />
|
|
@@ -25,7 +26,7 @@ export const MetadataList: FunctionalComponent<MetadataProps & { columns?: numbe
|
|
|
25
26
|
);
|
|
26
27
|
};
|
|
27
28
|
|
|
28
|
-
export const
|
|
29
|
+
export const TrMetadataList: FunctionalComponent<MetadataProps> = ({ groupedLabels, size = "m" }) => {
|
|
29
30
|
return (
|
|
30
31
|
<div class={styles["report-metadata-list"]}>
|
|
31
32
|
{groupedLabels &&
|
|
@@ -97,22 +98,23 @@ const MetadataKeyValue: FunctionalComponent<{
|
|
|
97
98
|
size?: "s" | "m";
|
|
98
99
|
}> = ({ title, value, values, size = "m" }) => {
|
|
99
100
|
return (
|
|
100
|
-
<div className={styles["report-metadata-keyvalue"]}>
|
|
101
|
+
<div className={styles["report-metadata-keyvalue"]} data-testid={"metadata-item"}>
|
|
101
102
|
<Text
|
|
102
103
|
type={"ui"}
|
|
103
104
|
size={size}
|
|
104
105
|
className={clsx(styles["report-metadata-keyvalue-title"], styles[`report-metadata-${size}`])}
|
|
106
|
+
data-testid={"metadata-item-key"}
|
|
105
107
|
>
|
|
106
108
|
{title}
|
|
107
109
|
</Text>
|
|
108
110
|
{values?.length ? (
|
|
109
|
-
<div className={styles["report-metadata-values"]}>
|
|
111
|
+
<div className={styles["report-metadata-values"]} data-testid={"metadata-item-value"}>
|
|
110
112
|
{values.map((item) => (
|
|
111
113
|
<MetaDataKeyLabel key={item} value={item} />
|
|
112
114
|
))}
|
|
113
115
|
</div>
|
|
114
116
|
) : (
|
|
115
|
-
<div className={styles["report-metadata-values"]}>
|
|
117
|
+
<div className={styles["report-metadata-values"]} data-testid={"metadata-item-value"}>
|
|
116
118
|
<MetaDataKeyLabel value={value} />
|
|
117
119
|
</div>
|
|
118
120
|
)}
|
|
@@ -11,22 +11,30 @@ interface MetadataButtonProps {
|
|
|
11
11
|
title?: string;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export const MetadataButton: FunctionalComponent<MetadataButtonProps> = ({
|
|
14
|
+
export const MetadataButton: FunctionalComponent<MetadataButtonProps> = ({
|
|
15
|
+
isOpened,
|
|
16
|
+
setIsOpen,
|
|
17
|
+
counter,
|
|
18
|
+
title,
|
|
19
|
+
...rest
|
|
20
|
+
}) => {
|
|
15
21
|
return (
|
|
16
|
-
<
|
|
22
|
+
<button
|
|
23
|
+
{...rest}
|
|
17
24
|
className={clsx(styles["report-metadata-header"], isOpened && styles["report-metadata-header-opened"])}
|
|
25
|
+
type={"button"}
|
|
18
26
|
onClick={() => setIsOpen(!isOpened)}
|
|
19
27
|
>
|
|
20
28
|
<Text size={"m"} bold>
|
|
21
29
|
{title}
|
|
22
30
|
</Text>
|
|
23
|
-
{counter && <Counter count={counter} size="s" />}
|
|
31
|
+
{counter !== null && <Counter count={counter} size="s" />}
|
|
24
32
|
<ArrowButton
|
|
25
33
|
isOpened={isOpened}
|
|
26
34
|
iconSize={"s"}
|
|
27
35
|
buttonSize={"s"}
|
|
28
36
|
className={styles["report-metadata-header-arrow"]}
|
|
29
37
|
/>
|
|
30
|
-
</
|
|
38
|
+
</button>
|
|
31
39
|
);
|
|
32
40
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { statusesList } from "@allurereport/core-api";
|
|
2
2
|
import { Counter, Loadable } from "@allurereport/web-components";
|
|
3
|
-
import {
|
|
3
|
+
import { reportStatsStore } from "@/stores";
|
|
4
4
|
import { useI18n } from "@/stores/locale";
|
|
5
5
|
import { treeFiltersStore } from "@/stores/tree";
|
|
6
6
|
import { capitalize } from "@/utils/capitalize";
|
|
@@ -15,13 +15,14 @@ const ALL_TAB = "total";
|
|
|
15
15
|
|
|
16
16
|
const Header = () => {
|
|
17
17
|
const { t } = useI18n("statuses");
|
|
18
|
+
|
|
18
19
|
return (
|
|
19
20
|
<header className={styles.header}>
|
|
20
21
|
<HeaderActions />
|
|
21
22
|
<div className={styles.headerRow}>
|
|
22
23
|
<TabsList>
|
|
23
24
|
<Loadable
|
|
24
|
-
source={
|
|
25
|
+
source={reportStatsStore}
|
|
25
26
|
renderData={(stats) => {
|
|
26
27
|
const allStatuses = statusesList
|
|
27
28
|
.map((status) => ({ status, value: stats[status] }))
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
import { getReportOptions } from "@allurereport/web-commons";
|
|
2
|
+
import { ReportLogo } from "@allurereport/web-components";
|
|
1
3
|
import * as styles from "@/components/ReportHeader/styles.scss";
|
|
2
|
-
import {
|
|
4
|
+
import type { AwesomeReportOptions } from "../../../types";
|
|
3
5
|
|
|
4
6
|
export const ReportHeaderLogo = () => {
|
|
7
|
+
const { logo } = getReportOptions<AwesomeReportOptions>() ?? {};
|
|
8
|
+
|
|
5
9
|
return (
|
|
6
10
|
<div className={styles["report-header-logo"]}>
|
|
7
|
-
<ReportLogo />
|
|
11
|
+
<ReportLogo logo={logo} />
|
|
8
12
|
</div>
|
|
9
13
|
);
|
|
10
14
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Loadable } from "@allurereport/web-components";
|
|
2
|
-
import { SuccessRatePieChart } from "@allurereport/web-components";
|
|
1
|
+
import { Loadable, SuccessRatePieChart } from "@allurereport/web-components";
|
|
3
2
|
import { pieChartStore } from "@/stores/chart";
|
|
4
3
|
import * as styles from "./styles.scss";
|
|
5
4
|
|
|
@@ -1,81 +1,74 @@
|
|
|
1
1
|
import { type Statistic, statusesList } from "@allurereport/core-api";
|
|
2
|
-
import { Loadable } from "@allurereport/web-components";
|
|
3
2
|
import { computed } from "@preact/signals";
|
|
4
|
-
import type {
|
|
3
|
+
import type { FunctionalComponent } from "preact";
|
|
5
4
|
import MetadataItem, { type MetadataProps } from "@/components/ReportMetadata/MetadataItem";
|
|
6
5
|
import { MetadataTestType } from "@/components/ReportMetadata/MetadataTestType";
|
|
7
6
|
import { MetadataWithIcon } from "@/components/ReportMetadata/MetadataWithIcon";
|
|
8
7
|
import * as styles from "@/components/ReportMetadata/styles.scss";
|
|
9
|
-
import { statsStore } from "@/stores";
|
|
10
8
|
import { useI18n } from "@/stores/locale";
|
|
11
9
|
import { capitalize } from "@/utils/capitalize";
|
|
12
10
|
|
|
13
|
-
export
|
|
11
|
+
export interface MetadataSummaryProps {
|
|
12
|
+
stats: Statistic;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const metadataTestsTypes = ["flaky", "retries"] as const as (keyof Statistic)[];
|
|
16
|
+
|
|
17
|
+
export const MetadataSummary: FunctionalComponent<MetadataSummaryProps> = ({ stats }) => {
|
|
14
18
|
const { t } = useI18n("statuses");
|
|
15
19
|
const { t: testSummary } = useI18n("testSummary");
|
|
16
20
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const allTest = computed(() => ({
|
|
23
|
-
title: capitalize(t("total")),
|
|
24
|
-
type: "all",
|
|
25
|
-
count: stats.total,
|
|
26
|
-
}));
|
|
27
|
-
const metaDataTests = ["flaky", "retry"]
|
|
28
|
-
.map((key) => {
|
|
29
|
-
if (!stats[key as keyof Statistic]) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
const title = testSummary(key);
|
|
33
|
-
const props = { title, count: stats[key as keyof Statistic] || 0, type: key };
|
|
21
|
+
const allTest = computed(() => ({
|
|
22
|
+
title: testSummary("total"),
|
|
23
|
+
type: "all",
|
|
24
|
+
count: stats.total,
|
|
25
|
+
}));
|
|
34
26
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
})
|
|
41
|
-
.filter(Boolean);
|
|
27
|
+
const metaDataTests = metadataTestsTypes
|
|
28
|
+
.map((type) => {
|
|
29
|
+
if (!stats[type]) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
42
32
|
|
|
43
|
-
|
|
44
|
-
.map((status) => ({ status, value: stats[status] }))
|
|
45
|
-
.filter(({ value }) => value)
|
|
46
|
-
.map(({ status, value }) => {
|
|
47
|
-
const title = capitalize(t(status) ?? status ?? "");
|
|
48
|
-
const props = {
|
|
49
|
-
title,
|
|
50
|
-
count: value,
|
|
51
|
-
status,
|
|
52
|
-
} as MetadataProps;
|
|
33
|
+
const props = { title: testSummary(type), count: stats[type] || 0, type: type };
|
|
53
34
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
);
|
|
62
|
-
});
|
|
35
|
+
return (
|
|
36
|
+
<div key={type}>
|
|
37
|
+
<MetadataItem data-testid={`metadata-item-${type}`} props={props} renderComponent={MetadataWithIcon} />
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
})
|
|
41
|
+
.filter(Boolean);
|
|
63
42
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
43
|
+
const metadataStatuses = statusesList
|
|
44
|
+
.map((status) => ({ status, value: stats[status] }))
|
|
45
|
+
.filter(({ value }) => value)
|
|
46
|
+
.map(({ status, value }) => {
|
|
47
|
+
const title = capitalize(t(status) ?? status ?? "");
|
|
48
|
+
const props = {
|
|
49
|
+
title,
|
|
50
|
+
count: value,
|
|
51
|
+
status,
|
|
52
|
+
} as MetadataProps;
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<MetadataItem
|
|
56
|
+
data-testid={`metadata-item-${status}`}
|
|
57
|
+
key={status}
|
|
58
|
+
props={props}
|
|
59
|
+
renderComponent={MetadataTestType}
|
|
60
|
+
/>
|
|
61
|
+
);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<div class={styles["report-metadata-summary"]}>
|
|
66
|
+
<div className={styles["report-metadata-all-tests"]}>
|
|
67
|
+
<MetadataItem data-testid="metadata-item-total" props={allTest.value} renderComponent={MetadataWithIcon} />
|
|
68
|
+
{Boolean(metaDataTests.length) && <div className={styles["report-metadata-separator"]} />}
|
|
69
|
+
{metaDataTests}
|
|
70
|
+
</div>
|
|
71
|
+
<div className={styles["report-metadata-status"]}>{metadataStatuses}</div>
|
|
72
|
+
</div>
|
|
80
73
|
);
|
|
81
74
|
};
|
|
@@ -5,7 +5,7 @@ import * as styles from "./styles.scss";
|
|
|
5
5
|
|
|
6
6
|
const icons: Record<string, string> = {
|
|
7
7
|
flaky: allureIcons.lineGeneralZap,
|
|
8
|
-
|
|
8
|
+
retries: allureIcons.lineArrowsRefreshCcw1,
|
|
9
9
|
new: allureIcons.lineAlertsNotificationBox,
|
|
10
10
|
};
|
|
11
11
|
|
|
@@ -1,24 +1,34 @@
|
|
|
1
1
|
import type { EnvironmentItem } from "@allurereport/core-api";
|
|
2
2
|
import { Loadable } from "@allurereport/web-components";
|
|
3
3
|
import type { FunctionalComponent } from "preact";
|
|
4
|
-
import { useState } from "preact/hooks";
|
|
4
|
+
import { useEffect, useState } from "preact/hooks";
|
|
5
5
|
import { MetadataList } from "@/components/Metadata";
|
|
6
6
|
import { MetadataButton } from "@/components/MetadataButton";
|
|
7
7
|
import { MetadataSummary } from "@/components/ReportMetadata/MetadataSummary";
|
|
8
|
+
import { reportStatsStore, statsByEnvStore, useI18n } from "@/stores";
|
|
9
|
+
import { currentEnvironment } from "@/stores/env";
|
|
8
10
|
import { envInfoStore } from "@/stores/envInfo";
|
|
11
|
+
import { fetchVariables, variables } from "@/stores/variables";
|
|
9
12
|
import * as styles from "./styles.scss";
|
|
10
13
|
|
|
11
14
|
export interface MetadataItem extends EnvironmentItem {
|
|
12
15
|
value?: string;
|
|
13
16
|
}
|
|
14
17
|
|
|
18
|
+
// TODO: check, where do we use the component and refactor it up to our needs
|
|
15
19
|
export type MetadataProps = {
|
|
16
20
|
envInfo?: MetadataItem[];
|
|
17
21
|
size?: "s" | "m";
|
|
18
22
|
groupedLabels?: Record<string, string[]>;
|
|
19
23
|
};
|
|
20
24
|
|
|
21
|
-
|
|
25
|
+
export type MetadataVariablesProps = {
|
|
26
|
+
variables?: Record<string, any>;
|
|
27
|
+
size?: "s" | "m";
|
|
28
|
+
groupedLabels?: Record<string, string[]>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const Metadata: FunctionalComponent<MetadataProps> = ({ envInfo = [] }) => {
|
|
22
32
|
const [isOpened, setIsOpen] = useState(true);
|
|
23
33
|
const convertedEnvInfo = envInfo.map((env) => {
|
|
24
34
|
return { ...env, value: env.values.join(", ") };
|
|
@@ -32,10 +42,47 @@ const Metadata: FunctionalComponent<MetadataProps> = ({ envInfo }) => {
|
|
|
32
42
|
);
|
|
33
43
|
};
|
|
34
44
|
|
|
45
|
+
const MetadataVariables: FunctionalComponent<MetadataVariablesProps> = (props) => {
|
|
46
|
+
const { t } = useI18n("ui");
|
|
47
|
+
const [isOpened, setIsOpen] = useState(true);
|
|
48
|
+
const convertedEnvInfo = Object.entries(props.variables).map(([key, value]) => {
|
|
49
|
+
return {
|
|
50
|
+
name: key,
|
|
51
|
+
value,
|
|
52
|
+
} as MetadataItem;
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<div class={styles["report-metadata"]} data-testid={"report-variables"}>
|
|
57
|
+
<MetadataButton
|
|
58
|
+
isOpened={isOpened}
|
|
59
|
+
setIsOpen={setIsOpen}
|
|
60
|
+
title={t("variables")}
|
|
61
|
+
counter={Object.keys(props.variables).length}
|
|
62
|
+
data-testid={"report-variables-button"}
|
|
63
|
+
/>
|
|
64
|
+
{isOpened && <MetadataList envInfo={convertedEnvInfo} />}
|
|
65
|
+
</div>
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
|
|
35
69
|
export const ReportMetadata = () => {
|
|
70
|
+
const stats = currentEnvironment.value
|
|
71
|
+
? statsByEnvStore.value.data[currentEnvironment.value]
|
|
72
|
+
: reportStatsStore.value.data;
|
|
73
|
+
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
fetchVariables(currentEnvironment.value);
|
|
76
|
+
}, [currentEnvironment.value]);
|
|
77
|
+
|
|
36
78
|
return (
|
|
37
79
|
<div className={styles["report-metadata-wrapper"]}>
|
|
38
|
-
<MetadataSummary />
|
|
80
|
+
{stats && <MetadataSummary stats={stats} />}
|
|
81
|
+
<Loadable
|
|
82
|
+
source={variables}
|
|
83
|
+
transformData={(data) => data?.[currentEnvironment.value ?? "default"] ?? {}}
|
|
84
|
+
renderData={(data) => !!Object.keys(data).length && <MetadataVariables variables={data} />}
|
|
85
|
+
/>
|
|
39
86
|
<Loadable
|
|
40
87
|
source={envInfoStore}
|
|
41
88
|
renderError={() => null}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
.side {
|
|
2
2
|
width: 100%;
|
|
3
|
-
padding: 0;
|
|
4
3
|
margin: 0;
|
|
5
4
|
overflow: hidden;
|
|
6
5
|
display: flex;
|
|
7
6
|
max-width: 1920px;
|
|
8
7
|
justify-content: space-between;
|
|
9
8
|
height: 100%;
|
|
9
|
+
padding: 0 8px;
|
|
10
10
|
}
|
|
11
|
+
|
|
11
12
|
.wrapper {
|
|
12
13
|
width: 100%;
|
|
13
14
|
flex-direction: column;
|
|
@@ -15,7 +16,6 @@
|
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
.side-left {
|
|
18
|
-
padding: 8px 0 8px 8px;
|
|
19
19
|
margin-right: auto;
|
|
20
20
|
transition: width 50ms;
|
|
21
21
|
will-change: width;
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
|
|
24
24
|
.side-right {
|
|
25
25
|
flex: 1 1 auto;
|
|
26
|
-
padding: 8px 8px 8px 0;
|
|
27
26
|
margin-left: auto;
|
|
28
27
|
transition: width 200ms;
|
|
29
28
|
will-change: width, height;
|
|
@@ -40,7 +40,7 @@ export const SplitLayout = () => {
|
|
|
40
40
|
<Loadable source={treeStore} renderLoader={() => <PageLoader />} renderData={() => <MainReportWrapper />} />
|
|
41
41
|
);
|
|
42
42
|
|
|
43
|
-
const
|
|
43
|
+
const TrView = () => {
|
|
44
44
|
return testResultId ? (
|
|
45
45
|
<Loadable
|
|
46
46
|
source={testResultStore}
|
|
@@ -70,7 +70,7 @@ export const SplitLayout = () => {
|
|
|
70
70
|
return (
|
|
71
71
|
<div className={styles["side-by-side"]} data-testId={"split-layout"}>
|
|
72
72
|
<Header className={styles.header} />
|
|
73
|
-
<SideBySide left={cachedMain} right={<
|
|
73
|
+
<SideBySide left={cachedMain} right={<TrView />} />
|
|
74
74
|
<Footer />
|
|
75
75
|
</div>
|
|
76
76
|
);
|
|
@@ -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;
|