@allurereport/web-awesome 3.0.0-beta.10 → 3.0.0-beta.11
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/{141.app-d01d0c66.js → 141.app-f4b5d260.js} +1 -1
- package/dist/multi/{222.app-d01d0c66.js → 222.app-f4b5d260.js} +1 -1
- package/dist/multi/335.app-f4b5d260.js +1 -0
- package/dist/multi/{34.app-d01d0c66.js → 34.app-f4b5d260.js} +1 -1
- package/dist/multi/{349.app-d01d0c66.js → 349.app-f4b5d260.js} +1 -1
- package/dist/multi/378.app-f4b5d260.js +1 -0
- package/dist/multi/{406.app-d01d0c66.js → 406.app-f4b5d260.js} +1 -1
- package/dist/multi/457.app-f4b5d260.js +1 -0
- package/dist/multi/{53.app-d01d0c66.js → 53.app-f4b5d260.js} +1 -1
- package/dist/multi/{584.app-d01d0c66.js → 584.app-f4b5d260.js} +1 -1
- package/dist/multi/{690.app-d01d0c66.js → 690.app-f4b5d260.js} +1 -1
- package/dist/multi/{747.app-d01d0c66.js → 747.app-f4b5d260.js} +1 -1
- package/dist/multi/{767.app-d01d0c66.js → 767.app-f4b5d260.js} +1 -1
- package/dist/multi/{816.app-d01d0c66.js → 816.app-f4b5d260.js} +1 -1
- package/dist/multi/{83.app-d01d0c66.js → 83.app-f4b5d260.js} +1 -1
- package/dist/multi/{873.app-d01d0c66.js → 873.app-f4b5d260.js} +1 -1
- package/dist/multi/{920.app-d01d0c66.js → 920.app-f4b5d260.js} +1 -1
- package/dist/multi/{991.app-d01d0c66.js → 991.app-f4b5d260.js} +1 -1
- package/dist/multi/app-f4b5d260.js +2 -0
- package/dist/multi/{app-d01d0c66.js.LICENSE.txt → app-f4b5d260.js.LICENSE.txt} +0 -8
- package/dist/multi/manifest.json +20 -20
- package/dist/multi/{styles-d01d0c66.css → styles-f4b5d260.css} +32 -30
- package/dist/single/app-b182550e.js +2 -0
- package/dist/single/{app-6596cb08.js.LICENSE.txt → app-b182550e.js.LICENSE.txt} +0 -8
- 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 -2
- package/src/components/LanguagePicker/index.tsx +1 -1
- 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 +53 -63
- 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/{TestResultHeader → TrHeader}/index.tsx +6 -4
- 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} +22 -13
- 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 +94 -15
- package/src/components/Tree/styles.scss +16 -1
- package/src/i18n/constants.ts +3 -3
- package/src/i18n/locales/az.json +12 -2
- package/src/i18n/locales/de.json +11 -2
- package/src/i18n/locales/en.json +11 -2
- package/src/i18n/locales/es.json +11 -2
- package/src/i18n/locales/fr.json +11 -2
- package/src/i18n/locales/he.json +11 -2
- package/src/i18n/locales/{am.json → hy.json} +11 -2
- package/src/i18n/locales/it.json +11 -2
- package/src/i18n/locales/ja.json +11 -2
- package/src/i18n/locales/ka.json +11 -2
- package/src/i18n/locales/kr.json +11 -2
- package/src/i18n/locales/nl.json +11 -2
- package/src/i18n/locales/pl.json +11 -2
- package/src/i18n/locales/pt.json +10 -2
- package/src/i18n/locales/ru.json +11 -2
- package/src/i18n/locales/sv.json +11 -2
- package/src/i18n/locales/tr.json +11 -2
- package/src/i18n/locales/zh.json +11 -2
- package/src/index.tsx +36 -33
- package/src/stores/chart.ts +3 -3
- package/src/stores/env.ts +88 -0
- package/src/stores/locale.ts +2 -1
- 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/dist/multi/335.app-d01d0c66.js +0 -1
- package/dist/multi/378.app-d01d0c66.js +0 -1
- package/dist/multi/476.app-d01d0c66.js +0 -1
- package/dist/multi/app-d01d0c66.js +0 -2
- package/dist/single/app-6596cb08.js +0 -2
- 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/TestResultOverview.tsx +0 -43
- /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
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { DefaultTestStepResult } from "@allurereport/core-api";
|
|
1
|
+
import type { DefaultTestStepResult, TestStepResult } from "@allurereport/core-api";
|
|
2
2
|
import { Code, Text, TreeItemIcon, allureIcons } from "@allurereport/web-components";
|
|
3
3
|
import type { FunctionComponent } from "preact";
|
|
4
4
|
import { useState } from "preact/hooks";
|
|
5
5
|
import { ArrowButton } from "@/components/ArrowButton";
|
|
6
6
|
import { MetadataList } from "@/components/Metadata";
|
|
7
7
|
import { type MetadataItem } from "@/components/ReportMetadata";
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
8
|
+
import { TrAttachment } from "@/components/TestResult/TrSteps/TrAttachment";
|
|
9
|
+
import { TrStepInfo } from "@/components/TestResult/TrSteps/TrStepInfo";
|
|
10
|
+
import * as styles from "@/components/TestResult/TrSteps/styles.scss";
|
|
11
11
|
import { collapsedTrees, toggleTree } from "@/stores/tree";
|
|
12
12
|
|
|
13
|
-
export const
|
|
13
|
+
export const TrStepParameters = (props: { parameters: DefaultTestStepResult["parameters"] }) => {
|
|
14
14
|
const { parameters } = props;
|
|
15
15
|
|
|
16
16
|
return (
|
|
@@ -19,21 +19,21 @@ export const TestResultStepParameters = (props: { parameters: DefaultTestStepRes
|
|
|
19
19
|
</div>
|
|
20
20
|
);
|
|
21
21
|
};
|
|
22
|
-
export const
|
|
22
|
+
export const TrStepsContent = (props: { item: DefaultTestStepResult }) => {
|
|
23
23
|
const { item } = props;
|
|
24
24
|
|
|
25
25
|
return (
|
|
26
26
|
<div className={styles["test-result-step-content"]}>
|
|
27
|
-
{Boolean(item?.parameters?.length) && <
|
|
27
|
+
{Boolean(item?.parameters?.length) && <TrStepParameters parameters={item.parameters} />}
|
|
28
28
|
{Boolean(item?.steps?.length) && (
|
|
29
29
|
<>
|
|
30
30
|
{item.steps?.map((subItem, key) => {
|
|
31
31
|
if (subItem.type === "step") {
|
|
32
|
-
return <
|
|
32
|
+
return <TrStep stepIndex={key + 1} key={key} item={subItem} />;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
if (subItem.type === "attachment") {
|
|
36
|
-
return <
|
|
36
|
+
return <TrAttachment stepIndex={key + 1} key={key} item={subItem} />;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
return null;
|
|
@@ -44,12 +44,21 @@ export const TestResultStepsContent = (props: { item: DefaultTestStepResult }) =
|
|
|
44
44
|
);
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
const hasFailedStep = (step: TestStepResult): boolean => {
|
|
48
|
+
if (step.type !== "step") {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return step.status !== "passed" || step.steps.some(hasFailedStep);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export const TrStep: FunctionComponent<{
|
|
48
56
|
item: DefaultTestStepResult;
|
|
49
57
|
stepIndex?: number;
|
|
50
58
|
className?: string;
|
|
51
59
|
}> = ({ item, stepIndex }) => {
|
|
52
|
-
const
|
|
60
|
+
const haveFailedSteps = hasFailedStep(item);
|
|
61
|
+
const isEarlyOpened = collapsedTrees.value.has(item.stepId) ? false : Boolean(haveFailedSteps);
|
|
53
62
|
const [isOpened, setIsOpen] = useState(isEarlyOpened || false);
|
|
54
63
|
const hasContent = Boolean(item?.steps?.length || item?.parameters?.length);
|
|
55
64
|
|
|
@@ -76,9 +85,9 @@ export const TestResultStep: FunctionComponent<{
|
|
|
76
85
|
{stepIndex}
|
|
77
86
|
</Code>
|
|
78
87
|
<Text className={styles["test-result-header-text"]}>{item.name}</Text>
|
|
79
|
-
<
|
|
88
|
+
<TrStepInfo item={item} />
|
|
80
89
|
</div>
|
|
81
|
-
{hasContent && isOpened && <
|
|
90
|
+
{hasContent && isOpened && <TrStepsContent item={item} />}
|
|
82
91
|
</div>
|
|
83
92
|
);
|
|
84
93
|
};
|
package/src/components/TestResult/{TestResultSteps/testResultStepInfo.tsx → TrSteps/TrStepInfo.tsx}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type DefaultTestStepResult, formatDuration } from "@allurereport/core-api";
|
|
2
2
|
import { SvgIcon, Text, allureIcons } from "@allurereport/web-components";
|
|
3
|
-
import * as styles from "@/components/TestResult/
|
|
3
|
+
import * as styles from "@/components/TestResult/TrSteps/styles.scss";
|
|
4
4
|
|
|
5
|
-
export const
|
|
5
|
+
export const TrStepInfo = (props: { item: DefaultTestStepResult }) => {
|
|
6
6
|
const { item } = props;
|
|
7
7
|
const formattedDuration = formatDuration(item?.duration as number);
|
|
8
8
|
const stepLength = item.steps?.length;
|
|
@@ -2,19 +2,19 @@ import { allureIcons } from "@allurereport/web-components";
|
|
|
2
2
|
import type { FunctionalComponent } from "preact";
|
|
3
3
|
import { useState } from "preact/hooks";
|
|
4
4
|
import type { AwesomeTestResult, AwesomeTestStepResult } from "types";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { TrDropdown } from "@/components/TestResult/TrDropdown";
|
|
6
|
+
import { TrAttachment } from "@/components/TestResult/TrSteps/TrAttachment";
|
|
7
|
+
import { TrStep } from "@/components/TestResult/TrSteps/TrStep";
|
|
8
8
|
import { useI18n } from "@/stores/locale";
|
|
9
9
|
import { collapsedTrees, toggleTree } from "@/stores/tree";
|
|
10
10
|
import * as styles from "./styles.scss";
|
|
11
11
|
|
|
12
12
|
const typeMap = {
|
|
13
|
-
step:
|
|
14
|
-
attachment:
|
|
13
|
+
step: TrStep,
|
|
14
|
+
attachment: TrAttachment,
|
|
15
15
|
} as const;
|
|
16
16
|
|
|
17
|
-
export type
|
|
17
|
+
export type TrStepsProps = {
|
|
18
18
|
steps: AwesomeTestResult["steps"];
|
|
19
19
|
id?: string;
|
|
20
20
|
};
|
|
@@ -24,7 +24,7 @@ type StepComponentProps = FunctionalComponent<{
|
|
|
24
24
|
stepIndex?: number;
|
|
25
25
|
}>;
|
|
26
26
|
|
|
27
|
-
export const
|
|
27
|
+
export const TrSteps: FunctionalComponent<TrStepsProps> = ({ steps, id }) => {
|
|
28
28
|
const stepsId = `${id}-steps`;
|
|
29
29
|
const isEarlyCollapsed = Boolean(!collapsedTrees.value.has(stepsId));
|
|
30
30
|
const [isOpened, setIsOpen] = useState<boolean>(isEarlyCollapsed);
|
|
@@ -37,7 +37,7 @@ export const TestResultSteps: FunctionalComponent<TestResultStepsProps> = ({ ste
|
|
|
37
37
|
const { t } = useI18n("execution");
|
|
38
38
|
return (
|
|
39
39
|
<div className={styles["test-result-steps"]}>
|
|
40
|
-
<
|
|
40
|
+
<TrDropdown
|
|
41
41
|
icon={allureIcons.lineHelpersPlayCircle}
|
|
42
42
|
isOpened={isOpened}
|
|
43
43
|
setIsOpen={handleClick}
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
.test-result-header-text {
|
|
57
57
|
padding-left: 4px;
|
|
58
58
|
word-break: break-word;
|
|
59
|
+
margin-right: auto;
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
.test-result-step-button {
|
|
@@ -82,7 +83,6 @@
|
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
.item-info {
|
|
85
|
-
margin-left: auto;
|
|
86
86
|
display: flex;
|
|
87
87
|
gap: 8px;
|
|
88
88
|
color: var(--on-text-secondary);
|
|
@@ -151,6 +151,7 @@
|
|
|
151
151
|
.test-result-attachment-text {
|
|
152
152
|
padding-left: 4px;
|
|
153
153
|
word-break: break-word;
|
|
154
|
+
margin-right: auto;
|
|
154
155
|
}
|
|
155
156
|
|
|
156
157
|
.test-result-attachment-image {
|
|
@@ -4,18 +4,18 @@ import { useContext, useEffect, useState } from "preact/hooks";
|
|
|
4
4
|
import { activeTab, navigateTo, route } from "@/stores/router";
|
|
5
5
|
import * as styles from "./styles.scss";
|
|
6
6
|
|
|
7
|
-
type
|
|
7
|
+
type TrTabsContextT = {
|
|
8
8
|
currentTab: string | undefined;
|
|
9
9
|
setCurrentTab: (id: string) => void;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
const TestResultTabsContext = createContext<
|
|
12
|
+
const TestResultTabsContext = createContext<TrTabsContextT | null>(null);
|
|
13
13
|
|
|
14
14
|
export const useTestResultTabsContext = () => {
|
|
15
15
|
const context = useContext(TestResultTabsContext);
|
|
16
16
|
|
|
17
17
|
if (!context) {
|
|
18
|
-
throw new Error("TestResultTabs components must be used within a
|
|
18
|
+
throw new Error("TestResultTabs components must be used within a TrTabs component");
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
return context;
|
|
@@ -30,15 +30,15 @@ export const TestResultTabsProvider = (props: { initialTab?: string; children: C
|
|
|
30
30
|
);
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
export const
|
|
33
|
+
export const TrTabs = (props: { children: ComponentChildren; initialTab?: string }) => {
|
|
34
34
|
return <TestResultTabsProvider {...props} />;
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
export const
|
|
37
|
+
export const TrTabsList = (props: { children: ComponentChildren }) => {
|
|
38
38
|
return <div className={styles.tabsList}>{props.children}</div>;
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
export const
|
|
41
|
+
export const TrTab = (props: { id: string; children: ComponentChildren; disabled?: boolean }) => {
|
|
42
42
|
const { currentTab, setCurrentTab } = useTestResultTabsContext();
|
|
43
43
|
const { id, children } = props;
|
|
44
44
|
const isActiveFromUrl = activeTab.value === id;
|
|
@@ -2,26 +2,26 @@ import { allureIcons } from "@allurereport/web-components";
|
|
|
2
2
|
import type { FunctionalComponent } from "preact";
|
|
3
3
|
import { useState } from "preact/hooks";
|
|
4
4
|
import type { AwesomeTestResult } from "types";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
5
|
+
import { TrDropdown } from "@/components/TestResult/TrDropdown";
|
|
6
|
+
import { TrAttachment } from "@/components/TestResult/TrSteps/TrAttachment";
|
|
7
|
+
import { TrStep } from "@/components/TestResult/TrSteps/TrStep";
|
|
8
|
+
import * as styles from "@/components/TestResult/TrSteps/styles.scss";
|
|
9
9
|
import { useI18n } from "@/stores/locale";
|
|
10
10
|
import { collapsedTrees, toggleTree } from "@/stores/tree";
|
|
11
11
|
|
|
12
12
|
const typeMap = {
|
|
13
|
-
before:
|
|
14
|
-
after:
|
|
15
|
-
step:
|
|
16
|
-
attachment:
|
|
13
|
+
before: TrStep,
|
|
14
|
+
after: TrStep,
|
|
15
|
+
step: TrStep,
|
|
16
|
+
attachment: TrAttachment,
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
export type
|
|
19
|
+
export type TrTeardownProps = {
|
|
20
20
|
teardown: AwesomeTestResult["teardown"];
|
|
21
21
|
id: string;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
export const
|
|
24
|
+
export const TrTeardown: FunctionalComponent<TrTeardownProps> = ({ teardown, id }) => {
|
|
25
25
|
const teardownId = `${id}-teardown`;
|
|
26
26
|
const isEarlyCollapsed = !collapsedTrees.value.has(teardownId);
|
|
27
27
|
const [isOpened, setIsOpen] = useState<boolean>(isEarlyCollapsed);
|
|
@@ -35,7 +35,7 @@ export const TestResultTeardown: FunctionalComponent<TestResultTeardownProps> =
|
|
|
35
35
|
|
|
36
36
|
return (
|
|
37
37
|
<div className={styles["test-result-steps"]}>
|
|
38
|
-
<
|
|
38
|
+
<TrDropdown
|
|
39
39
|
icon={allureIcons.lineHelpersFlag}
|
|
40
40
|
isOpened={isOpened}
|
|
41
41
|
setIsOpen={handleClick}
|
|
@@ -1,59 +1,71 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
2
|
import type { FunctionComponent, FunctionalComponent } from "preact";
|
|
3
|
+
import { useEffect } from "preact/hooks";
|
|
3
4
|
import type { AwesomeTestResult } from "types";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
5
|
+
import { TrAttachmentView } from "@/components/TestResult/TrAttachmentsView";
|
|
6
|
+
import TrEmpty from "@/components/TestResult/TrEmpty";
|
|
7
|
+
import { TrEnvironmentsView } from "@/components/TestResult/TrEnvironmentsView";
|
|
8
|
+
import { TrHeader } from "@/components/TestResult/TrHeader";
|
|
9
|
+
import TrHistoryView from "@/components/TestResult/TrHistory";
|
|
10
|
+
import { TrInfo } from "@/components/TestResult/TrInfo";
|
|
11
|
+
import { TrOverview } from "@/components/TestResult/TrOverview";
|
|
12
|
+
import { TrRetriesView } from "@/components/TestResult/TrRetriesView";
|
|
13
|
+
import { TrTabs, useTestResultTabsContext } from "@/components/TestResult/TrTabs";
|
|
14
|
+
import { fetchTestEnvGroup } from "@/stores/env";
|
|
12
15
|
import { isSplitMode } from "@/stores/layout";
|
|
13
16
|
import * as styles from "./styles.scss";
|
|
14
17
|
|
|
15
|
-
export type
|
|
18
|
+
export type TrViewProps = {
|
|
16
19
|
testResult?: AwesomeTestResult;
|
|
17
20
|
};
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
export type TrContentProps = {
|
|
23
|
+
testResult?: AwesomeTestResult;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type TrProps = {
|
|
27
|
+
testResult?: AwesomeTestResult;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const TrView: FunctionalComponent<TrViewProps> = ({ testResult }) => {
|
|
20
31
|
const { currentTab } = useTestResultTabsContext();
|
|
21
32
|
const viewMap: Record<string, any> = {
|
|
22
|
-
overview:
|
|
23
|
-
history:
|
|
24
|
-
attachments:
|
|
25
|
-
retries:
|
|
33
|
+
overview: TrOverview,
|
|
34
|
+
history: TrHistoryView,
|
|
35
|
+
attachments: TrAttachmentView,
|
|
36
|
+
retries: TrRetriesView,
|
|
37
|
+
environments: TrEnvironmentsView,
|
|
26
38
|
};
|
|
27
39
|
const ViewComponent = viewMap[currentTab];
|
|
28
40
|
|
|
29
41
|
return <ViewComponent testResult={testResult} />;
|
|
30
42
|
};
|
|
31
43
|
|
|
32
|
-
|
|
33
|
-
testResult?: AwesomeTestResult;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const TestResultContent: FunctionalComponent<TestResultContentProps> = ({ testResult }) => {
|
|
44
|
+
const TrContent: FunctionalComponent<TrContentProps> = ({ testResult }) => {
|
|
37
45
|
return (
|
|
38
|
-
<
|
|
39
|
-
<
|
|
40
|
-
<
|
|
41
|
-
</
|
|
46
|
+
<TrTabs initialTab="overview">
|
|
47
|
+
<TrInfo testResult={testResult} />
|
|
48
|
+
<TrView testResult={testResult} />
|
|
49
|
+
</TrTabs>
|
|
42
50
|
);
|
|
43
51
|
};
|
|
44
52
|
|
|
45
|
-
|
|
46
|
-
testResult?: AwesomeTestResult;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const TestResult: FunctionComponent<TestResultProps> = ({ testResult }) => {
|
|
53
|
+
const TestResult: FunctionComponent<TrProps> = ({ testResult }) => {
|
|
50
54
|
const splitModeClass = isSplitMode.value ? styles["scroll-inside"] : "";
|
|
51
55
|
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
const testCaseId = testResult?.testCase?.id;
|
|
58
|
+
|
|
59
|
+
if (testCaseId) {
|
|
60
|
+
fetchTestEnvGroup(testCaseId);
|
|
61
|
+
}
|
|
62
|
+
}, [testResult]);
|
|
63
|
+
|
|
52
64
|
return (
|
|
53
65
|
<>
|
|
54
|
-
{!isSplitMode.value && <
|
|
66
|
+
{!isSplitMode.value && <TrHeader testResult={testResult} />}
|
|
55
67
|
<div className={clsx(styles.content, splitModeClass)}>
|
|
56
|
-
{testResult ? <
|
|
68
|
+
{testResult ? <TrContent testResult={testResult} /> : <TrEmpty />}
|
|
57
69
|
</div>
|
|
58
70
|
</>
|
|
59
71
|
);
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { Button, Loadable, PageLoader, Text, Tree } from "@allurereport/web-components";
|
|
1
|
+
import { Button, Loadable, PageLoader, Text, Tree, TreeStatusBar } from "@allurereport/web-components";
|
|
2
2
|
import type { AwesomeStatus } from "types";
|
|
3
|
+
import { MetadataButton } from "@/components/MetadataButton";
|
|
3
4
|
import { useTabsContext } from "@/components/Tabs";
|
|
4
|
-
import {
|
|
5
|
+
import { reportStatsStore, statsByEnvStore } from "@/stores";
|
|
6
|
+
import { collapsedEnvironments, currentEnvironment, environmentsStore } from "@/stores/env";
|
|
5
7
|
import { useI18n } from "@/stores/locale";
|
|
6
8
|
import { navigateTo } from "@/stores/router";
|
|
7
9
|
import {
|
|
@@ -11,13 +13,13 @@ import {
|
|
|
11
13
|
noTests,
|
|
12
14
|
noTestsFound,
|
|
13
15
|
toggleTree,
|
|
14
|
-
treeFiltersStore,
|
|
15
16
|
treeStore,
|
|
16
17
|
} from "@/stores/tree";
|
|
17
18
|
import * as styles from "./styles.scss";
|
|
18
19
|
|
|
19
20
|
export const TreeList = () => {
|
|
20
21
|
const { t } = useI18n("empty");
|
|
22
|
+
const { t: tEnvironments } = useI18n("environments");
|
|
21
23
|
const { currentTab } = useTabsContext();
|
|
22
24
|
|
|
23
25
|
return (
|
|
@@ -25,6 +27,7 @@ export const TreeList = () => {
|
|
|
25
27
|
source={treeStore}
|
|
26
28
|
renderLoader={() => <PageLoader />}
|
|
27
29
|
renderData={() => {
|
|
30
|
+
// TODO: use function instead of computed
|
|
28
31
|
if (noTests.value) {
|
|
29
32
|
return (
|
|
30
33
|
<div className={styles["tree-list"]}>
|
|
@@ -55,19 +58,95 @@ export const TreeList = () => {
|
|
|
55
58
|
);
|
|
56
59
|
}
|
|
57
60
|
|
|
61
|
+
// render single tree for single environment
|
|
62
|
+
if (environmentsStore.value.data.length === 1) {
|
|
63
|
+
return (
|
|
64
|
+
<div className={styles["tree-list"]}>
|
|
65
|
+
<Tree
|
|
66
|
+
reportStatistic={reportStatsStore.value.data}
|
|
67
|
+
statistic={statsByEnvStore.value.data[currentEnvironment.value]}
|
|
68
|
+
collapsedTrees={collapsedTrees.value}
|
|
69
|
+
toggleTree={toggleTree}
|
|
70
|
+
navigateTo={navigateTo}
|
|
71
|
+
tree={filteredTree.value.default}
|
|
72
|
+
statusFilter={currentTab as AwesomeStatus}
|
|
73
|
+
root
|
|
74
|
+
/>
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const currentTree = currentEnvironment.value ? filteredTree.value[currentEnvironment.value] : undefined;
|
|
80
|
+
|
|
81
|
+
if (currentTree) {
|
|
82
|
+
return (
|
|
83
|
+
<div className={styles["tree-list"]}>
|
|
84
|
+
<Tree
|
|
85
|
+
reportStatistic={reportStatsStore.value.data}
|
|
86
|
+
statistic={statsByEnvStore.value.data[currentEnvironment.value]}
|
|
87
|
+
collapsedTrees={collapsedTrees.value}
|
|
88
|
+
toggleTree={toggleTree}
|
|
89
|
+
navigateTo={navigateTo}
|
|
90
|
+
tree={currentTree}
|
|
91
|
+
statusFilter={currentTab as AwesomeStatus}
|
|
92
|
+
root
|
|
93
|
+
/>
|
|
94
|
+
</div>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// render tree section for every environment
|
|
58
99
|
return (
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
100
|
+
<>
|
|
101
|
+
{Object.entries(filteredTree.value).map(([key, value]) => {
|
|
102
|
+
const { total } = value.statistic;
|
|
103
|
+
|
|
104
|
+
if (total === 0) {
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const isOpened = !collapsedEnvironments.value.includes(key);
|
|
109
|
+
const toggleEnv = () => {
|
|
110
|
+
collapsedEnvironments.value = isOpened
|
|
111
|
+
? collapsedEnvironments.value.concat(key)
|
|
112
|
+
: collapsedEnvironments.value.filter((env) => env !== key);
|
|
113
|
+
};
|
|
114
|
+
const stats = statsByEnvStore.value.data[key];
|
|
115
|
+
|
|
116
|
+
return (
|
|
117
|
+
<div key={key} className={styles["tree-section"]} data-testid={"tree-section"}>
|
|
118
|
+
<div className={styles["tree-env-button"]}>
|
|
119
|
+
<MetadataButton
|
|
120
|
+
isOpened={isOpened}
|
|
121
|
+
setIsOpen={toggleEnv}
|
|
122
|
+
title={`${tEnvironments("environment", { count: 1 })}: "${key}"`}
|
|
123
|
+
counter={total}
|
|
124
|
+
data-testid={"tree-section-env-button"}
|
|
125
|
+
/>
|
|
126
|
+
<TreeStatusBar
|
|
127
|
+
statistic={stats}
|
|
128
|
+
reportStatistic={reportStatsStore.value.data}
|
|
129
|
+
statusFilter={currentTab}
|
|
130
|
+
/>
|
|
131
|
+
</div>
|
|
132
|
+
{isOpened && (
|
|
133
|
+
<div className={styles["tree-list"]} data-testid={"tree-section-env-content"}>
|
|
134
|
+
<Tree
|
|
135
|
+
statistic={statsByEnvStore.value.data[key]}
|
|
136
|
+
reportStatistic={reportStatsStore.value.data}
|
|
137
|
+
collapsedTrees={collapsedTrees.value}
|
|
138
|
+
toggleTree={toggleTree}
|
|
139
|
+
statusFilter={currentTab}
|
|
140
|
+
navigateTo={navigateTo}
|
|
141
|
+
tree={value}
|
|
142
|
+
root
|
|
143
|
+
/>
|
|
144
|
+
</div>
|
|
145
|
+
)}
|
|
146
|
+
</div>
|
|
147
|
+
);
|
|
148
|
+
})}
|
|
149
|
+
</>
|
|
71
150
|
);
|
|
72
151
|
}}
|
|
73
152
|
/>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.tree-list {
|
|
10
|
-
min-height:
|
|
10
|
+
min-height: 320px;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.tree-header {
|
|
@@ -187,3 +187,18 @@
|
|
|
187
187
|
.tree-item-marked {
|
|
188
188
|
background: var(--bg-base-secondary);
|
|
189
189
|
}
|
|
190
|
+
|
|
191
|
+
.tree-section {
|
|
192
|
+
&:not(:last-child) {
|
|
193
|
+
padding-bottom: 8px;
|
|
194
|
+
margin-bottom: 14px;
|
|
195
|
+
border-bottom: 1px solid var(--on-border-muted);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.tree-env-button {
|
|
200
|
+
display: flex;
|
|
201
|
+
align-items: center;
|
|
202
|
+
justify-content: space-between;
|
|
203
|
+
padding: 0 8px 0 6px;
|
|
204
|
+
}
|
package/src/i18n/constants.ts
CHANGED
|
@@ -5,7 +5,7 @@ export const AVAILABLE_LOCALES = [
|
|
|
5
5
|
"es",
|
|
6
6
|
"pt",
|
|
7
7
|
"de",
|
|
8
|
-
"
|
|
8
|
+
"hy",
|
|
9
9
|
"az",
|
|
10
10
|
"fr",
|
|
11
11
|
"it",
|
|
@@ -61,8 +61,8 @@ export const LANG_LOCALE: Record<
|
|
|
61
61
|
full: "Deutsch",
|
|
62
62
|
iso: "de-DE",
|
|
63
63
|
},
|
|
64
|
-
|
|
65
|
-
short: "
|
|
64
|
+
hy: {
|
|
65
|
+
short: "Hy",
|
|
66
66
|
full: "Հայերեն",
|
|
67
67
|
iso: "hy-AM",
|
|
68
68
|
},
|
package/src/i18n/locales/az.json
CHANGED
|
@@ -67,7 +67,8 @@
|
|
|
67
67
|
"no-history-results": "Tarixçə məlumatı mövcud deyil",
|
|
68
68
|
"no-retries-results": "Təkrar məlumatı mövcud deyil",
|
|
69
69
|
"no-test-steps-results": "Test addımları haqqında məlumat mövcud deyil",
|
|
70
|
-
"no-test-case-results": "Test halları haqqında nəticələr yoxdur"
|
|
70
|
+
"no-test-case-results": "Test halları haqqında nəticələr yoxdur",
|
|
71
|
+
"no-environments-results": "Mühitlər haqqında məlumat mövcud deyil"
|
|
71
72
|
},
|
|
72
73
|
"severity": {
|
|
73
74
|
"blocker": "bloklayıcı",
|
|
@@ -82,6 +83,11 @@
|
|
|
82
83
|
"setup": "Hazırlıq",
|
|
83
84
|
"teardown": "Yekunlaşma"
|
|
84
85
|
},
|
|
86
|
+
"environments": {
|
|
87
|
+
"environment_one": "Mühit",
|
|
88
|
+
"environment_other": "Mühitlər",
|
|
89
|
+
"all": "Hamısı"
|
|
90
|
+
},
|
|
85
91
|
"ui": {
|
|
86
92
|
"labels": "Etiketlər",
|
|
87
93
|
"metadata": "Metaməlumat",
|
|
@@ -92,12 +98,16 @@
|
|
|
92
98
|
"history": "Tarixçə",
|
|
93
99
|
"attachments": "Əlavələr",
|
|
94
100
|
"retries": "Təkrarlar",
|
|
101
|
+
"environment_one": "Mühit",
|
|
102
|
+
"environment_other": "Mühitlər",
|
|
95
103
|
"error": "Səhv",
|
|
96
104
|
"goToStep": "Addıma keç",
|
|
97
105
|
"showLess": "Daha az göstər",
|
|
98
106
|
"showMore": "Daha çox göstər",
|
|
99
107
|
"copy": "Kopyala",
|
|
100
|
-
"at": "üçün"
|
|
108
|
+
"at": "üçün",
|
|
109
|
+
"openPwTrace": "Playwright Trace aç",
|
|
110
|
+
"variables": "Dəyişənlər"
|
|
101
111
|
},
|
|
102
112
|
"controls": {
|
|
103
113
|
"newTabAttachment": "Yeni sekmede aç",
|
package/src/i18n/locales/de.json
CHANGED
|
@@ -67,7 +67,8 @@
|
|
|
67
67
|
"no-history-results": "Keine Verlaufsinformationen verfügbar",
|
|
68
68
|
"no-retries-results": "Keine Wiederholungsinformationen verfügbar",
|
|
69
69
|
"no-test-steps-results": "Keine Informationen zu Testschritten verfügbar",
|
|
70
|
-
"no-test-case-results": "Keine Testergebnisse verfügbar"
|
|
70
|
+
"no-test-case-results": "Keine Testergebnisse verfügbar",
|
|
71
|
+
"no-environments-results": "Keine Umgebungsinformationen verfügbar"
|
|
71
72
|
},
|
|
72
73
|
"severity": {
|
|
73
74
|
"blocker": "Blocker",
|
|
@@ -82,6 +83,11 @@
|
|
|
82
83
|
"setup": "Vorbereitung",
|
|
83
84
|
"teardown": "Abbau"
|
|
84
85
|
},
|
|
86
|
+
"environments": {
|
|
87
|
+
"environment_one": "Umgebung",
|
|
88
|
+
"environment_other": "Umgebungen",
|
|
89
|
+
"all": "Alle"
|
|
90
|
+
},
|
|
85
91
|
"ui": {
|
|
86
92
|
"labels": "Labels",
|
|
87
93
|
"metadata": "Metadaten",
|
|
@@ -92,12 +98,15 @@
|
|
|
92
98
|
"history": "Verlauf",
|
|
93
99
|
"attachments": "Anhänge",
|
|
94
100
|
"retries": "Wiederholungen",
|
|
101
|
+
"environments": "Umgebungen",
|
|
95
102
|
"error": "Fehler",
|
|
96
103
|
"goToStep": "Zum Schritt gehen",
|
|
97
104
|
"showLess": "Weniger anzeigen",
|
|
98
105
|
"showMore": "Mehr anzeigen",
|
|
99
106
|
"copy": "Kopieren",
|
|
100
|
-
"at": "bei"
|
|
107
|
+
"at": "bei",
|
|
108
|
+
"variables": "Variablen",
|
|
109
|
+
"openPwTrace": "Playwright Trace öffnen"
|
|
101
110
|
},
|
|
102
111
|
"controls": {
|
|
103
112
|
"newTabAttachment": "Anhang in neuem Tab öffnen",
|