@allurereport/web-awesome 3.8.1 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +112 -0
- package/allurerc-dev.mjs +10 -0
- package/dist/multi/121.app-d36b0855e3e7a53eeee9.js +1 -0
- package/dist/multi/173.app-d36b0855e3e7a53eeee9.js +1 -0
- package/dist/multi/174.app-d36b0855e3e7a53eeee9.js +1 -0
- package/dist/multi/252.app-d36b0855e3e7a53eeee9.js +1 -0
- package/dist/multi/282.app-d36b0855e3e7a53eeee9.js +1 -0
- package/dist/multi/29.app-d36b0855e3e7a53eeee9.js +1 -0
- package/dist/multi/310.app-d36b0855e3e7a53eeee9.js +1 -0
- package/dist/multi/{416.app-200938be3feda27d7b80.js → 416.app-d36b0855e3e7a53eeee9.js} +1 -1
- package/dist/multi/{507.app-200938be3feda27d7b80.js → 507.app-d36b0855e3e7a53eeee9.js} +1 -1
- package/dist/multi/527.app-d36b0855e3e7a53eeee9.js +1 -0
- package/dist/multi/600.app-d36b0855e3e7a53eeee9.js +1 -0
- package/dist/multi/605.app-d36b0855e3e7a53eeee9.js +1 -0
- package/dist/multi/638.app-d36b0855e3e7a53eeee9.js +1 -0
- package/dist/multi/672.app-d36b0855e3e7a53eeee9.js +1 -0
- package/dist/multi/686.app-d36b0855e3e7a53eeee9.js +1 -0
- package/dist/multi/725.app-d36b0855e3e7a53eeee9.js +1 -0
- package/dist/multi/741.app-d36b0855e3e7a53eeee9.js +1 -0
- package/dist/multi/749.app-d36b0855e3e7a53eeee9.js +1 -0
- package/dist/multi/755.app-d36b0855e3e7a53eeee9.js +1 -0
- package/dist/multi/779.app-d36b0855e3e7a53eeee9.js +1 -0
- package/dist/multi/{894.app-200938be3feda27d7b80.js → 894.app-d36b0855e3e7a53eeee9.js} +1 -1
- package/dist/multi/943.app-d36b0855e3e7a53eeee9.js +1 -0
- package/dist/multi/980.app-d36b0855e3e7a53eeee9.js +1 -0
- package/dist/multi/app-d36b0855e3e7a53eeee9.js +2 -0
- package/dist/multi/manifest.json +26 -23
- package/dist/multi/styles-212da6c68fa0beb4c6c5.css +1 -0
- package/dist/multi/styles-468416ffee9a9dea6cae.css +58 -0
- package/dist/multi/styles-5c882b14b6f3112e40c4.css +1 -0
- package/dist/single/app-62171f5f51b5954a787c.js +2 -0
- package/dist/single/manifest.json +1 -1
- package/package.json +13 -8
- package/src/assets/scss/_common.scss +2 -2
- package/src/assets/scss/index.scss +8 -6
- package/src/components/BaseLayout/index.tsx +14 -2
- package/src/components/BaseLayout/styles.scss +5 -5
- package/src/components/Categories/CategoryHeaderItem/styles.scss +2 -2
- package/src/components/Categories/CategoryTreeItem/styles.scss +2 -2
- package/src/components/Categories/GroupTreeItem/styles.scss +4 -5
- package/src/components/Categories/HistoryTreeItem/styles.scss +2 -2
- package/src/components/Categories/LabelTreeItem/styles.scss +2 -2
- package/src/components/Categories/MessageTreeItem/index.tsx +1 -1
- package/src/components/Categories/MessageTreeItem/styles.scss +18 -18
- package/src/components/Categories/sticky.ts +1 -1
- package/src/components/Footer/styles.scss +2 -2
- package/src/components/Header/CiInfo/styles.scss +1 -1
- package/src/components/Header/styles.scss +2 -2
- package/src/components/HotkeysProvider/index.tsx +556 -0
- package/src/components/KeyboardShortcuts/index.tsx +73 -0
- package/src/components/KeyboardShortcuts/shortcutsConfig.ts +91 -0
- package/src/components/KeyboardShortcuts/styles.scss +69 -0
- package/src/components/MainReport/index.tsx +89 -72
- package/src/components/MainReport/styles.scss +40 -4
- package/src/components/Metadata/styles.scss +9 -9
- package/src/components/MetadataButton/index.tsx +2 -0
- package/src/components/MetadataButton/styles.scss +1 -1
- package/src/components/NavTabs/styles.scss +8 -8
- package/src/components/ReportBody/index.tsx +11 -2
- package/src/components/ReportBody/styles.scss +24 -4
- package/src/components/ReportCategories/styles.scss +1 -1
- package/src/components/ReportFilters/styles.scss +1 -1
- package/src/components/ReportGlobalAttachments/styles.scss +1 -1
- package/src/components/ReportGlobalErrors/styles.scss +1 -1
- package/src/components/ReportHeader/styles.scss +2 -2
- package/src/components/ReportMetadata/index.tsx +9 -11
- package/src/components/ReportMetadata/styles.scss +6 -6
- package/src/components/ReportQualityGateResults/styles.scss +2 -2
- package/src/components/ReportSearch/index.tsx +1 -5
- package/src/components/ReportTabs/styles.scss +9 -9
- package/src/components/SectionSwitcher/index.tsx +87 -10
- package/src/components/SideBySide/index.tsx +20 -2
- package/src/components/SideBySide/styles.scss +9 -1
- package/src/components/SplitLayout/index.tsx +10 -1
- package/src/components/SplitLayout/styles.scss +20 -4
- package/src/components/TestResult/TestStepsEmpty/styles.scss +1 -1
- package/src/components/TestResult/TrDescription/styles.scss +1 -1
- package/src/components/TestResult/TrDropdown/index.tsx +2 -2
- package/src/components/TestResult/TrDropdown/styles.scss +1 -1
- package/src/components/TestResult/TrEmpty/styles.scss +1 -1
- package/src/components/TestResult/TrEnvironmentItem/styles.scss +4 -4
- package/src/components/TestResult/TrError/index.tsx +32 -7
- package/src/components/TestResult/TrError/styles.scss +23 -23
- package/src/components/TestResult/TrHeader/styles.scss +2 -2
- package/src/components/TestResult/TrHistory/styles.scss +6 -6
- package/src/components/TestResult/TrInfo/styles.scss +8 -8
- package/src/components/TestResult/TrLinks/index.tsx +2 -2
- package/src/components/TestResult/TrLinks/styles.scss +2 -2
- package/src/components/TestResult/TrMetadata/index.tsx +1 -1
- package/src/components/TestResult/TrMetadata/styles.scss +1 -1
- package/src/components/TestResult/TrNavigation/index.tsx +1 -1
- package/src/components/TestResult/TrNavigation/styles.scss +2 -2
- package/src/components/TestResult/TrOverview.tsx +2 -0
- package/src/components/TestResult/TrParameters/index.tsx +1 -1
- package/src/components/TestResult/TrParameters/styles.scss +1 -1
- package/src/components/TestResult/TrPrevStatuses/styles.scss +8 -8
- package/src/components/TestResult/TrPwTraces/openPwTraceInNewTab.ts +2 -2
- package/src/components/TestResult/TrPwTraces/styles.scss +1 -1
- package/src/components/TestResult/TrRetriesView/styles.scss +3 -3
- package/src/components/TestResult/TrSetup/index.tsx +9 -3
- package/src/components/TestResult/TrSeverity/styles.scss +7 -7
- package/src/components/TestResult/TrStatus/styles.scss +2 -35
- package/src/components/TestResult/TrSteps/TrAttachment.tsx +79 -43
- package/src/components/TestResult/TrSteps/TrAttachmentInfo.tsx +44 -17
- package/src/components/TestResult/TrSteps/TrErrorStep.tsx +3 -0
- package/src/components/TestResult/TrSteps/TrStep.tsx +9 -4
- package/src/components/TestResult/TrSteps/TrStepHeader.tsx +8 -5
- package/src/components/TestResult/TrSteps/index.tsx +7 -4
- package/src/components/TestResult/TrSteps/stepTreeExpansion.ts +27 -9
- package/src/components/TestResult/TrSteps/styles.scss +80 -20
- package/src/components/TestResult/TrTeardown/index.tsx +9 -3
- package/src/components/TestResult/bodyItems.ts +1 -1
- package/src/components/TestResult/index.tsx +8 -2
- package/src/components/TestResult/styles.scss +10 -1
- package/src/components/TestResult/trOverviewFocus.scss +4 -0
- package/src/components/Timeline/styles.scss +6 -6
- package/src/components/Tree/index.tsx +54 -5
- package/src/components/Tree/styles.scss +55 -35
- package/src/hooks/useTestResultOverviewFocusScroll.ts +23 -0
- package/src/index.html +30 -33
- package/src/index.tsx +12 -6
- package/src/locales/ar.json +61 -1
- package/src/locales/az.json +61 -1
- package/src/locales/de.json +61 -1
- package/src/locales/en.json +61 -1
- package/src/locales/es.json +61 -1
- package/src/locales/fr.json +61 -1
- package/src/locales/he.json +61 -1
- package/src/locales/hy.json +61 -1
- package/src/locales/it.json +61 -1
- package/src/locales/ja.json +61 -1
- package/src/locales/ka.json +61 -1
- package/src/locales/kr.json +61 -1
- package/src/locales/nl.json +61 -1
- package/src/locales/pl.json +61 -1
- package/src/locales/pt.json +61 -1
- package/src/locales/ru.json +61 -1
- package/src/locales/sv.json +61 -1
- package/src/locales/tr.json +61 -1
- package/src/locales/uk.json +61 -1
- package/src/locales/zh-TW.json +61 -1
- package/src/locales/zh.json +61 -1
- package/src/stores/keyboard.ts +371 -0
- package/src/stores/keyboardActions.ts +769 -0
- package/src/stores/locale.ts +1 -0
- package/src/stores/reportEnvSections.ts +6 -0
- package/src/stores/reportRootTabs.ts +95 -0
- package/src/stores/search.ts +147 -0
- package/src/stores/testResultOverviewNav.ts +119 -0
- package/src/stores/testResultTabs.ts +62 -0
- package/src/stores/timeline.ts +1 -1
- package/src/stores/tree.ts +42 -4
- package/src/stores/treeFilters/store.ts +3 -36
- package/src/styles/_pane-active.scss +8 -0
- package/src/styles.scss +1 -1
- package/src/utils/flattenTestResultOverview.ts +182 -0
- package/src/utils/trOverviewFocus.ts +18 -0
- package/test/components/EnvironmentPicker.test.tsx +21 -3
- package/test/components/Header/CiInfo.test.tsx +8 -0
- package/test/components/Header.test.tsx +8 -0
- package/test/components/ReportGlobals.test.tsx +9 -1
- package/test/components/TestResult/PwTraceButton.test.tsx +8 -0
- package/test/components/TestResult/TrErrorStep.test.tsx +8 -0
- package/test/components/TestResult/TrOverview.test.tsx +30 -10
- package/test/components/TestResult/TrSteps.test.tsx +73 -0
- package/test/components/TestResult/bodyItems.test.ts +9 -1
- package/test/components/TestResult/openPwTraceInNewTab.test.ts +8 -0
- package/test/components/TestResult/stepTreeExpansion.test.ts +10 -2
- package/test/components/Timeline.test.tsx +15 -7
- package/test/stores/keyboard/keyboardActions.test.ts +615 -0
- package/test/stores/search.test.ts +143 -0
- package/test/stores/treeFilters/actions.test.ts +8 -0
- package/test/utils/flattenTestResultOverview.test.ts +57 -0
- package/test/utils/ownerAddress.test.ts +9 -1
- package/test/utils/treeFilters.test.ts +9 -1
- package/types.d.ts +17 -0
- package/webpack.config.js +3 -0
- package/CONTRIBUTING.md +0 -34
- package/dist/multi/173.app-200938be3feda27d7b80.js +0 -1
- package/dist/multi/174.app-200938be3feda27d7b80.js +0 -1
- package/dist/multi/252.app-200938be3feda27d7b80.js +0 -1
- package/dist/multi/282.app-200938be3feda27d7b80.js +0 -1
- package/dist/multi/29.app-200938be3feda27d7b80.js +0 -1
- package/dist/multi/310.app-200938be3feda27d7b80.js +0 -1
- package/dist/multi/527.app-200938be3feda27d7b80.js +0 -1
- package/dist/multi/600.app-200938be3feda27d7b80.js +0 -1
- package/dist/multi/605.app-200938be3feda27d7b80.js +0 -1
- package/dist/multi/638.app-200938be3feda27d7b80.js +0 -1
- package/dist/multi/672.app-200938be3feda27d7b80.js +0 -1
- package/dist/multi/686.app-200938be3feda27d7b80.js +0 -1
- package/dist/multi/725.app-200938be3feda27d7b80.js +0 -1
- package/dist/multi/741.app-200938be3feda27d7b80.js +0 -1
- package/dist/multi/749.app-200938be3feda27d7b80.js +0 -1
- package/dist/multi/755.app-200938be3feda27d7b80.js +0 -1
- package/dist/multi/943.app-200938be3feda27d7b80.js +0 -1
- package/dist/multi/980.app-200938be3feda27d7b80.js +0 -1
- package/dist/multi/app-200938be3feda27d7b80.js +0 -2
- package/dist/multi/styles-9f7a23a0c8b79fa76981.css +0 -58
- package/dist/single/app-17629d1b119f6c611d49.js +0 -2
- package/src/assets/scss/day.scss +0 -53
- package/src/assets/scss/fonts.scss +0 -3
- package/src/assets/scss/night.scss +0 -63
- package/src/assets/scss/palette.scss +0 -393
- package/src/assets/scss/theme.scss +0 -330
- package/src/assets/scss/vars.scss +0 -11
- /package/dist/multi/{app-200938be3feda27d7b80.js.LICENSE.txt → app-d36b0855e3e7a53eeee9.js.LICENSE.txt} +0 -0
- /package/dist/single/{app-17629d1b119f6c611d49.js.LICENSE.txt → app-62171f5f51b5954a787c.js.LICENSE.txt} +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
justify-content: space-between;
|
|
5
5
|
padding: 24px 24px 0;
|
|
6
6
|
align-items: flex-start;
|
|
7
|
-
background: var(--bg-
|
|
7
|
+
background: var(--color-bg-primary);
|
|
8
8
|
border-radius: 8px;
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.report-date {
|
|
23
|
-
color: var(--
|
|
23
|
+
color: var(--color-text-secondary);
|
|
24
24
|
display: block;
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -9,6 +9,7 @@ import { MetadataSummary } from "@/components/ReportMetadata/MetadataSummary";
|
|
|
9
9
|
import { reportStatsStore, statsByEnvStore, useI18n } from "@/stores";
|
|
10
10
|
import { currentEnvironment } from "@/stores/env";
|
|
11
11
|
import { envInfoStore } from "@/stores/envInfo";
|
|
12
|
+
import { getReportEnvSectionId } from "@/stores/reportEnvSections";
|
|
12
13
|
import { collapsedTrees, toggleTree } from "@/stores/tree";
|
|
13
14
|
import { fetchVariables, variables } from "@/stores/variables";
|
|
14
15
|
|
|
@@ -34,9 +35,8 @@ export type MetadataVariablesProps = {
|
|
|
34
35
|
};
|
|
35
36
|
|
|
36
37
|
const Metadata: FunctionalComponent<MetadataProps> = ({ envInfo = [] }) => {
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
const showAllId = `report-${envKey}-metadata-showAll`;
|
|
38
|
+
const sectionId = getReportEnvSectionId("metadata");
|
|
39
|
+
const showAllId = `${sectionId}-showAll`;
|
|
40
40
|
const isOpened = !collapsedTrees.value.has(sectionId);
|
|
41
41
|
const showAll = collapsedTrees.value.has(showAllId);
|
|
42
42
|
const list = envInfo.map((env) => ({ ...env, value: env.values.join(", ") }));
|
|
@@ -71,9 +71,8 @@ const Metadata: FunctionalComponent<MetadataProps> = ({ envInfo = [] }) => {
|
|
|
71
71
|
|
|
72
72
|
const MetadataVariables: FunctionalComponent<MetadataVariablesProps> = (props) => {
|
|
73
73
|
const { t } = useI18n("ui");
|
|
74
|
-
const
|
|
75
|
-
const
|
|
76
|
-
const showAllId = `report-${envKey}-variables-showAll`;
|
|
74
|
+
const sectionId = getReportEnvSectionId("variables");
|
|
75
|
+
const showAllId = `${sectionId}-showAll`;
|
|
77
76
|
const isOpened = !collapsedTrees.value.has(sectionId);
|
|
78
77
|
const showAll = collapsedTrees.value.has(showAllId);
|
|
79
78
|
const fullList = Object.entries(props.variables).map(([key, value]) => ({
|
|
@@ -111,13 +110,12 @@ const MetadataVariables: FunctionalComponent<MetadataVariablesProps> = (props) =
|
|
|
111
110
|
};
|
|
112
111
|
|
|
113
112
|
export const ReportMetadata = () => {
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
: reportStatsStore.value.data;
|
|
113
|
+
const envId = currentEnvironment.value;
|
|
114
|
+
const stats = envId ? statsByEnvStore.value.data[envId] : reportStatsStore.value.data;
|
|
117
115
|
|
|
118
116
|
useEffect(() => {
|
|
119
|
-
fetchVariables(
|
|
120
|
-
}, [
|
|
117
|
+
fetchVariables(envId);
|
|
118
|
+
}, [envId]);
|
|
121
119
|
|
|
122
120
|
return (
|
|
123
121
|
<div className={styles["report-metadata-wrapper"]}>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.report-metadata-separator {
|
|
13
|
-
border-left: 1px solid var(--
|
|
13
|
+
border-left: 1px solid var(--color-border-default);
|
|
14
14
|
height: 24px;
|
|
15
15
|
margin: 11px 0;
|
|
16
16
|
}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
justify-content: space-between;
|
|
27
27
|
align-items: baseline;
|
|
28
28
|
padding: 16px 0;
|
|
29
|
-
border-bottom: 1px solid var(--
|
|
29
|
+
border-bottom: 1px solid var(--color-border-default);
|
|
30
30
|
width: 100%;
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.metadata-item-title {
|
|
40
|
-
color: var(--
|
|
40
|
+
color: var(--color-text-secondary);
|
|
41
41
|
margin-bottom: 6px;
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
.report-metadata {
|
|
49
|
-
border-bottom: 1px solid var(--
|
|
49
|
+
border-bottom: 1px solid var(--color-border-default);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.report-metadata-keyvalue {
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
width: 4px;
|
|
81
81
|
height: 12px;
|
|
82
82
|
border-radius: 2px;
|
|
83
|
-
background: var(--
|
|
83
|
+
background: var(--color-text-secondary);
|
|
84
84
|
margin-right: 8px;
|
|
85
85
|
align-self: center;
|
|
86
86
|
@include status-bg-and-text();
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
|
|
94
94
|
.metadata-icon {
|
|
95
95
|
margin-right: 8px;
|
|
96
|
-
color: var(--
|
|
96
|
+
color: var(--color-icon-secondary);
|
|
97
97
|
}
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
.report-quality-gate-result-icon {
|
|
34
34
|
flex: 0 0 auto;
|
|
35
35
|
margin-top: 3px;
|
|
36
|
-
color: var(--
|
|
36
|
+
color: var(--color-status-failed-chart);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.report-quality-gate-result-content {
|
|
@@ -52,6 +52,6 @@
|
|
|
52
52
|
&:not(:last-child) {
|
|
53
53
|
padding-bottom: 8px;
|
|
54
54
|
margin-bottom: 14px;
|
|
55
|
-
border-bottom: 1px solid var(--
|
|
55
|
+
border-bottom: 1px solid var(--color-border-subtle);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -12,7 +12,7 @@ const handleQuerySearch = (value: string) => {
|
|
|
12
12
|
setTreeQueryFilter(value);
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
export const ReportSearch = () => {
|
|
16
16
|
const { t } = useI18n("search");
|
|
17
17
|
|
|
18
18
|
return (
|
|
@@ -24,7 +24,3 @@ const QuerySearch = () => {
|
|
|
24
24
|
/>
|
|
25
25
|
);
|
|
26
26
|
};
|
|
27
|
-
|
|
28
|
-
export const ReportSearch = () => {
|
|
29
|
-
return <QuerySearch />;
|
|
30
|
-
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.tabsList {
|
|
2
|
-
background-color: var(--bg-
|
|
2
|
+
background-color: var(--color-bg-secondary);
|
|
3
3
|
padding: 2px;
|
|
4
4
|
border-radius: 8px;
|
|
5
5
|
display: flex;
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.tab {
|
|
12
|
-
background-color: var(--
|
|
13
|
-
color: var(--
|
|
12
|
+
background-color: var(--color-control-bg-ghost);
|
|
13
|
+
color: var(--color-text-primary);
|
|
14
14
|
border-radius: 6px;
|
|
15
15
|
border: 1px solid transparent;
|
|
16
16
|
padding: 2px 8px;
|
|
@@ -28,17 +28,17 @@
|
|
|
28
28
|
border-color var(--color-change-transition-duration);
|
|
29
29
|
|
|
30
30
|
&[aria-current] {
|
|
31
|
-
background-color: var(--bg-
|
|
32
|
-
border-color: var(--
|
|
31
|
+
background-color: var(--color-bg-raised);
|
|
32
|
+
border-color: var(--color-border-default);
|
|
33
33
|
cursor: default;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
&:hover:not([aria-current]) {
|
|
37
|
-
background-color: var(--
|
|
37
|
+
background-color: var(--color-control-bg-ghost-hover);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
&:active:not([aria-current]) {
|
|
41
|
-
background-color: var(--
|
|
41
|
+
background-color: var(--color-control-bg-ghost-active);
|
|
42
42
|
transform: scale(0.94);
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
&:focus-visible {
|
|
50
|
-
outline: 1px solid var(--
|
|
50
|
+
outline: 1px solid var(--color-focus-ring);
|
|
51
51
|
|
|
52
52
|
&:not([aria-current]) {
|
|
53
|
-
background-color: var(--
|
|
53
|
+
background-color: var(--color-control-bg-ghost-hover);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -1,19 +1,96 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PageLoader } from "@allurereport/web-components";
|
|
2
|
+
import type { ComponentType } from "preact";
|
|
3
|
+
import { useEffect, useState } from "preact/hooks";
|
|
2
4
|
|
|
3
|
-
import { Charts } from "@/components/Charts";
|
|
4
5
|
import { Report } from "@/components/Report";
|
|
5
6
|
import { currentSection } from "@/stores/sections";
|
|
6
7
|
|
|
7
|
-
import { Timeline } from "../Timeline";
|
|
8
|
-
|
|
9
8
|
import * as styles from "./styles.scss";
|
|
10
9
|
|
|
10
|
+
type SectionName = "report" | "charts" | "timeline";
|
|
11
|
+
|
|
12
|
+
const sectionLoaders: Record<Exclude<SectionName, "report">, () => Promise<ComponentType>> = {
|
|
13
|
+
charts: () => import("@/components/Charts").then((module) => module.Charts),
|
|
14
|
+
timeline: () => import("@/components/Timeline").then((module) => module.Timeline),
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const sectionCache = new Map<string, ComponentType>();
|
|
18
|
+
|
|
19
|
+
type LoadedSection = {
|
|
20
|
+
section: SectionName;
|
|
21
|
+
Component: ComponentType;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const LazySection = ({ section }: { section: SectionName }) => {
|
|
25
|
+
const cached = sectionCache.get(section);
|
|
26
|
+
const [loaded, setLoaded] = useState<LoadedSection | null>(cached ? { section, Component: cached } : null);
|
|
27
|
+
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
if (section === "report") {
|
|
30
|
+
setLoaded({ section, Component: Report });
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const loader = sectionLoaders[section];
|
|
35
|
+
let mounted = true;
|
|
36
|
+
|
|
37
|
+
if (!loader) {
|
|
38
|
+
setLoaded(null);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const cachedComponent = sectionCache.get(section);
|
|
43
|
+
if (cachedComponent) {
|
|
44
|
+
if (mounted) {
|
|
45
|
+
setLoaded({ section, Component: cachedComponent });
|
|
46
|
+
}
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
setLoaded(null);
|
|
51
|
+
|
|
52
|
+
loader()
|
|
53
|
+
.then((LoadedComponent) => {
|
|
54
|
+
if (mounted) {
|
|
55
|
+
sectionCache.set(section, LoadedComponent);
|
|
56
|
+
setLoaded({ section, Component: LoadedComponent });
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
.catch((err) => {
|
|
60
|
+
console.error(`Failed to load section "${section}":`, err);
|
|
61
|
+
if (mounted) {
|
|
62
|
+
setLoaded({ section, Component: Report });
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
return () => {
|
|
67
|
+
mounted = false;
|
|
68
|
+
};
|
|
69
|
+
}, [section]);
|
|
70
|
+
|
|
71
|
+
if (section === "report" || !sectionLoaders[section]) {
|
|
72
|
+
return <Report />;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (!loaded || loaded.section !== section) {
|
|
76
|
+
return <PageLoader />;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const { Component } = loaded;
|
|
80
|
+
|
|
81
|
+
return <Component />;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const VALID_SECTIONS: SectionName[] = ["report", "charts", "timeline"];
|
|
85
|
+
|
|
11
86
|
export const SectionSwitcher = () => {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
timeline: <Timeline />,
|
|
16
|
-
};
|
|
87
|
+
const section = VALID_SECTIONS.includes(currentSection.value as SectionName)
|
|
88
|
+
? (currentSection.value as SectionName)
|
|
89
|
+
: "report";
|
|
17
90
|
|
|
18
|
-
return
|
|
91
|
+
return (
|
|
92
|
+
<div className={styles.layout}>
|
|
93
|
+
<LazySection section={section} />
|
|
94
|
+
</div>
|
|
95
|
+
);
|
|
19
96
|
};
|
|
@@ -2,6 +2,8 @@ import type { JSX } from "preact";
|
|
|
2
2
|
import { useEffect, useMemo, useRef } from "preact/hooks";
|
|
3
3
|
import Split from "split.js";
|
|
4
4
|
|
|
5
|
+
import { activePane, focusTestResultPane, focusTreePane } from "@/stores/keyboard";
|
|
6
|
+
|
|
5
7
|
import * as styles from "./styles.scss";
|
|
6
8
|
|
|
7
9
|
const SideBySide = ({ left, right }: { left: JSX.Element; right: JSX.Element }) => {
|
|
@@ -42,10 +44,26 @@ const SideBySide = ({ left, right }: { left: JSX.Element; right: JSX.Element })
|
|
|
42
44
|
};
|
|
43
45
|
}, []);
|
|
44
46
|
|
|
47
|
+
const pane = activePane.value;
|
|
48
|
+
|
|
45
49
|
return (
|
|
46
50
|
<div class={styles.side} ref={containerRef}>
|
|
47
|
-
<div
|
|
48
|
-
|
|
51
|
+
<div
|
|
52
|
+
class={styles["side-left"]}
|
|
53
|
+
data-pane="tree"
|
|
54
|
+
data-pane-active={pane === "tree" ? "true" : undefined}
|
|
55
|
+
onMouseDown={() => focusTreePane()}
|
|
56
|
+
>
|
|
57
|
+
{leftContent}
|
|
58
|
+
</div>
|
|
59
|
+
<div
|
|
60
|
+
class={styles["side-right"]}
|
|
61
|
+
data-pane="testResult"
|
|
62
|
+
data-pane-active={pane === "testResult" ? "true" : undefined}
|
|
63
|
+
onMouseDown={() => focusTestResultPane()}
|
|
64
|
+
>
|
|
65
|
+
{rightContent}
|
|
66
|
+
</div>
|
|
49
67
|
</div>
|
|
50
68
|
);
|
|
51
69
|
};
|
|
@@ -15,10 +15,18 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.side-left {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
18
20
|
margin-right: auto;
|
|
19
21
|
border-radius: 12px 0 0 12px;
|
|
20
22
|
box-shadow: var(--shadow-small);
|
|
21
23
|
overflow: hidden;
|
|
24
|
+
min-height: 0;
|
|
25
|
+
|
|
26
|
+
> * {
|
|
27
|
+
flex: 1 1 auto;
|
|
28
|
+
min-height: 0;
|
|
29
|
+
}
|
|
22
30
|
}
|
|
23
31
|
|
|
24
32
|
.side-right {
|
|
@@ -56,7 +64,7 @@
|
|
|
56
64
|
}
|
|
57
65
|
|
|
58
66
|
.gutter {
|
|
59
|
-
background: var(--bg-
|
|
67
|
+
background: var(--color-bg-secondary) no-repeat 50%;
|
|
60
68
|
height: 100%;
|
|
61
69
|
}
|
|
62
70
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Loadable, PageLoader, Text } from "@allurereport/web-components";
|
|
2
2
|
import { computed } from "@preact/signals";
|
|
3
|
+
import clsx from "clsx";
|
|
3
4
|
import type { JSX } from "preact";
|
|
4
5
|
import { useEffect, useRef, useState } from "preact/hooks";
|
|
5
6
|
|
|
@@ -7,6 +8,8 @@ import MainReport from "@/components/MainReport";
|
|
|
7
8
|
import SideBySide from "@/components/SideBySide";
|
|
8
9
|
import TestResult from "@/components/TestResult";
|
|
9
10
|
import { useI18n } from "@/stores";
|
|
11
|
+
import { activePane } from "@/stores/keyboard";
|
|
12
|
+
import { isSplitMode } from "@/stores/layout";
|
|
10
13
|
import { rootTabRoute, testResultRoute } from "@/stores/router";
|
|
11
14
|
import { currentTrId } from "@/stores/testResult";
|
|
12
15
|
import { testResultStore } from "@/stores/testResults";
|
|
@@ -59,7 +62,13 @@ export const SplitLayout = () => {
|
|
|
59
62
|
}}
|
|
60
63
|
/>
|
|
61
64
|
) : (
|
|
62
|
-
<div
|
|
65
|
+
<div
|
|
66
|
+
className={clsx(
|
|
67
|
+
styles.empty,
|
|
68
|
+
isSplitMode.value && styles["empty-split-pane"],
|
|
69
|
+
isSplitMode.value && activePane.value === "testResult" && styles["pane-active"],
|
|
70
|
+
)}
|
|
71
|
+
>
|
|
63
72
|
<Text>{t("noSelectedTR")}</Text>
|
|
64
73
|
</div>
|
|
65
74
|
);
|
|
@@ -1,22 +1,26 @@
|
|
|
1
|
+
@use "../../styles/pane-active" as paneActive;
|
|
2
|
+
|
|
1
3
|
.layout {
|
|
2
4
|
margin: auto;
|
|
3
5
|
padding: 12px 32px;
|
|
4
|
-
background: var(--bg-
|
|
5
|
-
color: var(--
|
|
6
|
+
background: var(--color-bg-canvas);
|
|
7
|
+
color: var(--color-text-primary);
|
|
6
8
|
font-size: 14px;
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
.wrapper {
|
|
12
|
+
display: flex;
|
|
10
13
|
width: 100%;
|
|
11
14
|
flex-direction: column;
|
|
12
15
|
margin: auto;
|
|
13
16
|
position: relative;
|
|
14
17
|
height: 100%;
|
|
18
|
+
min-height: 0;
|
|
15
19
|
}
|
|
16
20
|
|
|
17
21
|
.content {
|
|
18
22
|
box-shadow: var(--shadow-small);
|
|
19
|
-
background: var(--bg-
|
|
23
|
+
background: var(--color-bg-primary);
|
|
20
24
|
border-radius: 12px;
|
|
21
25
|
width: 100%;
|
|
22
26
|
overflow: hidden;
|
|
@@ -39,7 +43,7 @@
|
|
|
39
43
|
.title {
|
|
40
44
|
font-size: 14px;
|
|
41
45
|
line-height: 1.25;
|
|
42
|
-
color: var(--
|
|
46
|
+
color: var(--color-text-primary);
|
|
43
47
|
margin-bottom: 8px;
|
|
44
48
|
}
|
|
45
49
|
|
|
@@ -79,6 +83,18 @@
|
|
|
79
83
|
height: 100%;
|
|
80
84
|
}
|
|
81
85
|
|
|
86
|
+
.empty-split-pane {
|
|
87
|
+
position: relative;
|
|
88
|
+
background: var(--bg-base-primary);
|
|
89
|
+
border-radius: 12px;
|
|
90
|
+
overflow: auto;
|
|
91
|
+
@include paneActive.split-pane-indicator;
|
|
92
|
+
|
|
93
|
+
&.pane-active {
|
|
94
|
+
@include paneActive.split-pane-indicator-active;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
82
98
|
.header {
|
|
83
99
|
padding: 8px;
|
|
84
100
|
margin-bottom: 0;
|
|
@@ -13,9 +13,9 @@ export const TrDropdown: FunctionalComponent<{
|
|
|
13
13
|
counter: number;
|
|
14
14
|
actions?: preact.ComponentChildren;
|
|
15
15
|
className?: ClassValue;
|
|
16
|
-
}> = ({ isOpened, setIsOpen, title, icon, counter, actions, className }) => {
|
|
16
|
+
}> = ({ isOpened, setIsOpen, title, icon, counter, actions, className, ...rest }) => {
|
|
17
17
|
return (
|
|
18
|
-
<div className={clsx(styles["test-result-dropdown"], className)} onClick={() => setIsOpen(!isOpened)}>
|
|
18
|
+
<div className={clsx(styles["test-result-dropdown"], className)} onClick={() => setIsOpen(!isOpened)} {...rest}>
|
|
19
19
|
<ArrowButton isOpened={isOpened} icon={allureIcons.arrowsChevronDown} />
|
|
20
20
|
<div className={styles["test-result-dropdown-wrap"]}>
|
|
21
21
|
<SvgIcon id={icon} />
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
cursor: pointer;
|
|
4
4
|
|
|
5
5
|
&:hover {
|
|
6
|
-
background: var(--
|
|
6
|
+
background: var(--color-row-bg-hover);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
}
|
|
@@ -44,15 +44,15 @@
|
|
|
44
44
|
.test-result-environment-item-time {
|
|
45
45
|
margin-left: auto;
|
|
46
46
|
line-height: 20px;
|
|
47
|
-
color: var(--
|
|
47
|
+
color: var(--color-text-secondary);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.test-result-environment-item-link {
|
|
51
51
|
:root {
|
|
52
|
-
--allure-btn-icon-color: var(--
|
|
52
|
+
--allure-btn-icon-color: var(--color-control-bg-ghost);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
color: var(--
|
|
55
|
+
color: var(--color-icon-secondary);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.test-result-environment-item-status {
|
|
@@ -15,15 +15,15 @@ import * as styles from "./styles.scss";
|
|
|
15
15
|
|
|
16
16
|
const TrErrorTrace = ({ trace }: { trace: string }) => {
|
|
17
17
|
const sanitizedTrace = ansiToHTML(trace, {
|
|
18
|
-
fg: "var(--
|
|
18
|
+
fg: "var(--color-text-primary)",
|
|
19
19
|
bg: "none",
|
|
20
20
|
colors: {
|
|
21
21
|
0: "none",
|
|
22
22
|
1: "none",
|
|
23
|
-
2: "var(--
|
|
24
|
-
3: "var(--
|
|
25
|
-
4: "var(--
|
|
26
|
-
5: "var(--
|
|
23
|
+
2: "var(--color-intent-info-text)",
|
|
24
|
+
3: "var(--color-intent-warning-text)",
|
|
25
|
+
4: "var(--color-status-unknown-chart)",
|
|
26
|
+
5: "var(--color-syntax-type)",
|
|
27
27
|
},
|
|
28
28
|
});
|
|
29
29
|
|
|
@@ -55,7 +55,7 @@ export const TrError: FunctionalComponent<
|
|
|
55
55
|
const sanitizedMessage =
|
|
56
56
|
showMessage && message
|
|
57
57
|
? ansiToHTML(message, {
|
|
58
|
-
fg: "var(--
|
|
58
|
+
fg: "var(--color-text-primary)",
|
|
59
59
|
colors: {},
|
|
60
60
|
})
|
|
61
61
|
: "";
|
|
@@ -98,7 +98,32 @@ export const TrError: FunctionalComponent<
|
|
|
98
98
|
) : showMessage ? (
|
|
99
99
|
empty("no-message-provided")
|
|
100
100
|
) : null}
|
|
101
|
-
{
|
|
101
|
+
{!showMessage && message && (
|
|
102
|
+
<div className={styles["test-result-error-header"]}>
|
|
103
|
+
{hasDiff ? (
|
|
104
|
+
<Button
|
|
105
|
+
style={"flat"}
|
|
106
|
+
data-testId={"test-result-diff-button"}
|
|
107
|
+
size={"s"}
|
|
108
|
+
text={tooltip("showDiff")}
|
|
109
|
+
onClick={openDiff}
|
|
110
|
+
/>
|
|
111
|
+
) : (
|
|
112
|
+
<span />
|
|
113
|
+
)}
|
|
114
|
+
<TooltipWrapper tooltipText={tooltip("clipboard")} tooltipTextAfterClick={tooltip("clipboardSuccess")}>
|
|
115
|
+
<IconButton
|
|
116
|
+
style={"ghost"}
|
|
117
|
+
size={"s"}
|
|
118
|
+
icon={allureIcons.lineGeneralCopy3}
|
|
119
|
+
onClick={() => {
|
|
120
|
+
copyToClipboard(message);
|
|
121
|
+
}}
|
|
122
|
+
/>
|
|
123
|
+
</TooltipWrapper>
|
|
124
|
+
</div>
|
|
125
|
+
)}
|
|
126
|
+
{(showMessage || !message) && hasDiff && (
|
|
102
127
|
<Button
|
|
103
128
|
style={"flat"}
|
|
104
129
|
data-testId={"test-result-diff-button"}
|