@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.
Files changed (167) hide show
  1. package/dist/multi/173.app-52d1decd.js +1 -0
  2. package/dist/multi/174.app-52d1decd.js +1 -0
  3. package/dist/multi/252.app-52d1decd.js +1 -0
  4. package/dist/multi/282.app-52d1decd.js +1 -0
  5. package/dist/multi/29.app-52d1decd.js +1 -0
  6. package/dist/multi/416.app-52d1decd.js +1 -0
  7. package/dist/multi/527.app-52d1decd.js +1 -0
  8. package/dist/multi/600.app-52d1decd.js +1 -0
  9. package/dist/multi/605.app-52d1decd.js +1 -0
  10. package/dist/multi/638.app-52d1decd.js +1 -0
  11. package/dist/multi/672.app-52d1decd.js +1 -0
  12. package/dist/multi/686.app-52d1decd.js +1 -0
  13. package/dist/multi/725.app-52d1decd.js +1 -0
  14. package/dist/multi/741.app-52d1decd.js +1 -0
  15. package/dist/multi/755.app-52d1decd.js +1 -0
  16. package/dist/multi/894.app-52d1decd.js +1 -0
  17. package/dist/multi/943.app-52d1decd.js +1 -0
  18. package/dist/multi/980.app-52d1decd.js +1 -0
  19. package/dist/multi/app-52d1decd.js +2 -0
  20. package/dist/multi/{app-d01d0c66.js.LICENSE.txt → app-52d1decd.js.LICENSE.txt} +7 -0
  21. package/dist/multi/manifest.json +20 -20
  22. package/dist/multi/styles-52d1decd.css +41 -0
  23. package/dist/single/app-83b0c4fc.js +2 -0
  24. package/dist/single/{app-6596cb08.js.LICENSE.txt → app-83b0c4fc.js.LICENSE.txt} +7 -0
  25. package/dist/single/manifest.json +1 -1
  26. package/package.json +4 -4
  27. package/src/assets/scss/palette.scss +391 -391
  28. package/src/assets/scss/theme.scss +9 -1
  29. package/src/assets/scss/vars.scss +0 -1
  30. package/src/components/BaseLayout/styles.scss +10 -2
  31. package/src/components/EnvironmentPicker/index.tsx +51 -0
  32. package/src/components/EnvironmentPicker/styles.scss +9 -0
  33. package/src/components/Footer/FooterLogo.tsx +1 -2
  34. package/src/components/Header/index.tsx +4 -10
  35. package/src/components/HeaderControls/index.tsx +20 -0
  36. package/src/components/MainReport/styles.scss +2 -1
  37. package/src/components/Metadata/index.tsx +6 -4
  38. package/src/components/MetadataButton/index.tsx +12 -4
  39. package/src/components/MetadataButton/styles.scss +3 -0
  40. package/src/components/ReportBody/index.tsx +3 -2
  41. package/src/components/ReportHeader/ReportHeaderLogo.tsx +6 -2
  42. package/src/components/ReportHeader/ReportHeaderPie.tsx +1 -2
  43. package/src/components/ReportMetadata/MetadataSummary.tsx +56 -63
  44. package/src/components/ReportMetadata/MetadataWithIcon.tsx +1 -1
  45. package/src/components/ReportMetadata/index.tsx +50 -3
  46. package/src/components/SideBySide/styles.scss +2 -3
  47. package/src/components/SplitLayout/index.tsx +2 -2
  48. package/src/components/SplitLayout/styles.scss +2 -1
  49. package/src/components/TestResult/TestStepsEmpty/index.tsx +2 -2
  50. package/src/components/TestResult/{TestResultAttachmentsView → TrAttachmentsView}/index.tsx +4 -4
  51. package/src/components/TestResult/{TestResultDescription → TrDescription}/index.tsx +2 -2
  52. package/src/components/TestResult/{TestResultDropdown → TrDropdown}/index.tsx +1 -1
  53. package/src/components/TestResult/{TestResultEmpty → TrEmpty}/index.tsx +6 -6
  54. package/src/components/TestResult/TrEnvironmentItem/index.tsx +82 -0
  55. package/src/components/TestResult/TrEnvironmentItem/styles.scss +60 -0
  56. package/src/components/TestResult/TrEnvironmentsView/index.tsx +64 -0
  57. package/src/components/TestResult/TrEnvironmentsView/styles.scss +11 -0
  58. package/src/components/TestResult/TrError/TrDiff.tsx +3 -5
  59. package/src/components/TestResult/TrError/index.tsx +21 -6
  60. package/src/components/TestResult/TrError/styles.scss +92 -2
  61. package/src/components/TestResult/{TestResultHeader/TestResultBreadcrumbs.tsx → TrHeader/TrBreadcrumbs.tsx} +3 -3
  62. package/src/components/TestResult/TrHeader/index.tsx +15 -0
  63. package/src/components/TestResult/{TestResultHistory/TestResultHistoryItem.tsx → TrHistory/TrHistoryItem.tsx} +3 -3
  64. package/src/components/TestResult/{TestResultHistory → TrHistory}/index.tsx +5 -5
  65. package/src/components/TestResult/{TestResultInfo/TestResultInfoStatuses.tsx → TrInfo/TrInfoStatuses.tsx} +1 -1
  66. package/src/components/TestResult/{TestResultInfo → TrInfo}/index.tsx +37 -23
  67. package/src/components/TestResult/{TestResultLinks → TrLinks}/index.tsx +6 -6
  68. package/src/components/TestResult/{TestResultMetadata → TrMetadata}/index.tsx +4 -4
  69. package/src/components/TestResult/{TestResultNavigation → TrNavigation}/index.tsx +3 -2
  70. package/src/components/TestResult/TrOverview.tsx +47 -0
  71. package/src/components/TestResult/{TestResultParameters → TrParameters}/index.tsx +2 -2
  72. package/src/components/TestResult/{TestResultPrevStatuses → TrPrevStatuses}/index.tsx +6 -6
  73. package/src/components/TestResult/TrPwTraces/PwTrace.tsx +34 -0
  74. package/src/components/TestResult/TrPwTraces/PwTraceButton.tsx +33 -0
  75. package/src/components/TestResult/TrPwTraces/index.tsx +29 -0
  76. package/src/components/TestResult/TrPwTraces/styles.scss +20 -0
  77. package/src/components/TestResult/{TestResultRetriesView/TestResultRetriesItem.tsx → TrRetriesView/TrRetriesItem.tsx} +3 -3
  78. package/src/components/TestResult/{TestResultRetriesView → TrRetriesView}/index.tsx +4 -6
  79. package/src/components/TestResult/{TestResultSetup → TrSetup}/index.tsx +11 -11
  80. package/src/components/TestResult/{TestResultSeverity → TrSeverity}/index.tsx +1 -1
  81. package/src/components/TestResult/{TestResultStatus → TrStatus}/index.tsx +3 -2
  82. package/src/components/TestResult/{TestResultSteps/testResultAttachment.tsx → TrSteps/TrAttachment.tsx} +10 -7
  83. package/src/components/TestResult/{TestResultSteps/testResultAttachmentInfo.tsx → TrSteps/TrAttachmentInfo.tsx} +8 -8
  84. package/src/components/TestResult/{TestResultSteps/testResultStep.tsx → TrSteps/TrStep.tsx} +25 -14
  85. package/src/components/TestResult/{TestResultSteps/testResultStepInfo.tsx → TrSteps/TrStepInfo.tsx} +2 -2
  86. package/src/components/TestResult/{TestResultSteps → TrSteps}/index.tsx +8 -8
  87. package/src/components/TestResult/{TestResultSteps → TrSteps}/styles.scss +2 -1
  88. package/src/components/TestResult/{TestResultSteps → TrSteps}/wrongAttachment.tsx +1 -1
  89. package/src/components/TestResult/{TestResultTabs → TrTabs}/index.tsx +6 -6
  90. package/src/components/TestResult/{TestResultTeardown → TrTeardown}/index.tsx +11 -11
  91. package/src/components/TestResult/index.tsx +42 -30
  92. package/src/components/TestResult/styles.scss +2 -1
  93. package/src/components/Tree/index.tsx +99 -16
  94. package/src/components/Tree/styles.scss +16 -1
  95. package/src/index.tsx +36 -33
  96. package/src/{i18n/locales → locales}/az.json +14 -4
  97. package/src/{i18n/locales → locales}/de.json +13 -4
  98. package/src/{i18n/locales → locales}/en.json +15 -6
  99. package/src/{i18n/locales → locales}/es.json +13 -4
  100. package/src/{i18n/locales → locales}/fr.json +13 -4
  101. package/src/{i18n/locales → locales}/he.json +13 -4
  102. package/src/{i18n/locales/am.json → locales/hy.json} +13 -4
  103. package/src/{i18n/locales → locales}/it.json +13 -4
  104. package/src/{i18n/locales → locales}/ja.json +13 -4
  105. package/src/{i18n/locales → locales}/ka.json +16 -7
  106. package/src/{i18n/locales → locales}/kr.json +15 -6
  107. package/src/{i18n/locales → locales}/nl.json +13 -4
  108. package/src/{i18n/locales → locales}/pl.json +14 -5
  109. package/src/{i18n/locales → locales}/pt.json +12 -4
  110. package/src/{i18n/locales → locales}/ru.json +14 -5
  111. package/src/{i18n/locales → locales}/sv.json +13 -4
  112. package/src/{i18n/locales → locales}/tr.json +13 -4
  113. package/src/{i18n/locales → locales}/zh.json +13 -4
  114. package/src/stores/chart.ts +3 -3
  115. package/src/stores/env.ts +88 -0
  116. package/src/stores/locale.ts +4 -4
  117. package/src/stores/stats.ts +52 -7
  118. package/src/stores/testResults.ts +6 -6
  119. package/src/stores/tree.ts +48 -17
  120. package/src/stores/variables.ts +38 -0
  121. package/types.d.ts +2 -1
  122. package/dist/multi/141.app-d01d0c66.js +0 -1
  123. package/dist/multi/222.app-d01d0c66.js +0 -1
  124. package/dist/multi/335.app-d01d0c66.js +0 -1
  125. package/dist/multi/34.app-d01d0c66.js +0 -1
  126. package/dist/multi/349.app-d01d0c66.js +0 -1
  127. package/dist/multi/378.app-d01d0c66.js +0 -1
  128. package/dist/multi/406.app-d01d0c66.js +0 -1
  129. package/dist/multi/476.app-d01d0c66.js +0 -1
  130. package/dist/multi/53.app-d01d0c66.js +0 -1
  131. package/dist/multi/584.app-d01d0c66.js +0 -1
  132. package/dist/multi/690.app-d01d0c66.js +0 -1
  133. package/dist/multi/747.app-d01d0c66.js +0 -1
  134. package/dist/multi/767.app-d01d0c66.js +0 -1
  135. package/dist/multi/816.app-d01d0c66.js +0 -1
  136. package/dist/multi/83.app-d01d0c66.js +0 -1
  137. package/dist/multi/873.app-d01d0c66.js +0 -1
  138. package/dist/multi/920.app-d01d0c66.js +0 -1
  139. package/dist/multi/991.app-d01d0c66.js +0 -1
  140. package/dist/multi/app-d01d0c66.js +0 -2
  141. package/dist/multi/styles-d01d0c66.css +0 -39
  142. package/dist/single/app-6596cb08.js +0 -2
  143. package/src/components/LanguagePicker/index.tsx +0 -40
  144. package/src/components/ReportLogo/index.tsx +0 -16
  145. package/src/components/ReportLogo/styles.scss +0 -20
  146. package/src/components/ReportLogoFull/index.tsx +0 -20
  147. package/src/components/ReportLogoFull/styles.scss +0 -7
  148. package/src/components/TestResult/TestResultHeader/index.tsx +0 -21
  149. package/src/components/TestResult/TestResultOverview.tsx +0 -43
  150. package/src/components/ThemeButton/ThemeButton.tsx +0 -20
  151. package/src/i18n/constants.ts +0 -124
  152. /package/src/components/TestResult/{TestResultAttachmentsView → TrAttachmentsView}/styles.scss +0 -0
  153. /package/src/components/TestResult/{TestResultDescription → TrDescription}/styles.scss +0 -0
  154. /package/src/components/TestResult/{TestResultDropdown → TrDropdown}/styles.scss +0 -0
  155. /package/src/components/TestResult/{TestResultEmpty → TrEmpty}/styles.scss +0 -0
  156. /package/src/components/TestResult/{TestResultHeader → TrHeader}/styles.scss +0 -0
  157. /package/src/components/TestResult/{TestResultHistory → TrHistory}/styles.scss +0 -0
  158. /package/src/components/TestResult/{TestResultInfo → TrInfo}/styles.scss +0 -0
  159. /package/src/components/TestResult/{TestResultLinks → TrLinks}/styles.scss +0 -0
  160. /package/src/components/TestResult/{TestResultMetadata → TrMetadata}/styles.scss +0 -0
  161. /package/src/components/TestResult/{TestResultNavigation → TrNavigation}/styles.scss +0 -0
  162. /package/src/components/TestResult/{TestResultParameters → TrParameters}/styles.scss +0 -0
  163. /package/src/components/TestResult/{TestResultPrevStatuses → TrPrevStatuses}/styles.scss +0 -0
  164. /package/src/components/TestResult/{TestResultRetriesView → TrRetriesView}/styles.scss +0 -0
  165. /package/src/components/TestResult/{TestResultSeverity → TrSeverity}/styles.scss +0 -0
  166. /package/src/components/TestResult/{TestResultStatus → TrStatus}/styles.scss +0 -0
  167. /package/src/components/TestResult/{TestResultTabs → TrTabs}/styles.scss +0 -0
@@ -1,15 +1,15 @@
1
1
  import type { AttachmentTestStepResult } from "@allurereport/core-api";
2
2
  import type { FunctionalComponent } from "preact";
3
3
  import type { AwesomeTestResult } from "types";
4
- import { TestResultAttachment } from "@/components/TestResult/TestResultSteps/testResultAttachment";
4
+ import { TrAttachment } from "@/components/TestResult/TrSteps/TrAttachment";
5
5
  import { useI18n } from "@/stores";
6
6
  import * as styles from "./styles.scss";
7
7
 
8
- export type TestResultAttachmentViewProps = {
8
+ export type TrAttachmentViewProps = {
9
9
  testResult?: AwesomeTestResult;
10
10
  };
11
11
 
12
- export const TestResultAttachmentView: FunctionalComponent<TestResultAttachmentViewProps> = ({ testResult }) => {
12
+ export const TrAttachmentView: FunctionalComponent<TrAttachmentViewProps> = ({ testResult }) => {
13
13
  const { attachments } = testResult ?? {};
14
14
  const { t } = useI18n("empty");
15
15
 
@@ -17,7 +17,7 @@ export const TestResultAttachmentView: FunctionalComponent<TestResultAttachmentV
17
17
  <div className={styles["test-result-attachments-view"]}>
18
18
  {attachments.length ? (
19
19
  attachments?.map((attach, key) => (
20
- <TestResultAttachment item={attach as AttachmentTestStepResult} key={key} stepIndex={key + 1} />
20
+ <TrAttachment item={attach as AttachmentTestStepResult} key={key} stepIndex={key + 1} />
21
21
  ))
22
22
  ) : (
23
23
  <div className={styles["test-result-empty"]}>{t("no-attachments-results")}</div>
@@ -5,11 +5,11 @@ import type { AwesomeTestResult } from "types";
5
5
  import { MetadataButton } from "@/components/MetadataButton";
6
6
  import * as styles from "./styles.scss";
7
7
 
8
- export type TestResultDescriptionProps = {
8
+ export type TrDescriptionProps = {
9
9
  description: AwesomeTestResult["description"];
10
10
  };
11
11
 
12
- export const TestResultDescription: FunctionalComponent<TestResultDescriptionProps> = ({ description }) => {
12
+ export const TrDescription: FunctionalComponent<TrDescriptionProps> = ({ description }) => {
13
13
  const [isOpen, setIsOpen] = useState<boolean>(true);
14
14
 
15
15
  return (
@@ -5,7 +5,7 @@ import { type FunctionalComponent } from "preact";
5
5
  import { ArrowButton } from "@/components/ArrowButton";
6
6
  import * as styles from "./styles.scss";
7
7
 
8
- export const TestResultDropdown: FunctionalComponent<{
8
+ export const TrDropdown: FunctionalComponent<{
9
9
  isOpened: boolean;
10
10
  setIsOpen: (isOpened: boolean) => void;
11
11
  title: string;
@@ -1,10 +1,10 @@
1
1
  import { SvgIcon, Text, allureIcons } from "@allurereport/web-components";
2
2
  import * as baseStyles from "@/components/BaseLayout/styles.scss";
3
- import { TestResultInfo } from "@/components/TestResult/TestResultInfo";
3
+ import { TrInfo } from "@/components/TestResult/TrInfo";
4
4
  import { useI18n } from "@/stores";
5
5
  import * as styles from "./styles.scss";
6
6
 
7
- const TestResultThumb = () => {
7
+ const TrThumb = () => {
8
8
  const { t } = useI18n("empty");
9
9
  return (
10
10
  <div className={styles["test-result-thumb"]}>
@@ -22,13 +22,13 @@ const TestResultThumb = () => {
22
22
  );
23
23
  };
24
24
 
25
- const TestResultEmpty = () => {
25
+ const TrEmpty = () => {
26
26
  return (
27
27
  <div className={baseStyles.content}>
28
- <TestResultInfo />
29
- <TestResultThumb />
28
+ <TrInfo />
29
+ <TrThumb />
30
30
  </div>
31
31
  );
32
32
  };
33
33
 
34
- export default TestResultEmpty;
34
+ export default TrEmpty;
@@ -0,0 +1,82 @@
1
+ import { formatDuration } from "@allurereport/core-api";
2
+ import { IconButton, Text, TooltipWrapper, TreeItemIcon, allureIcons } from "@allurereport/web-components";
3
+ import cx from "clsx";
4
+ import { type FunctionalComponent } from "preact";
5
+ import { useState } from "preact/hooks";
6
+ import { ArrowButton } from "@/components/ArrowButton";
7
+ import { TrError } from "@/components/TestResult/TrError";
8
+ import { useI18n } from "@/stores";
9
+ import { navigateTo, openInNewTab } from "@/stores/router";
10
+ import { timestampToDate } from "@/utils/time";
11
+ import type { AwesomeTestResult } from "../../../../types";
12
+ import * as styles from "./styles.scss";
13
+
14
+ export const TrEnvironmentItem: FunctionalComponent<{
15
+ env: string;
16
+ testResult: AwesomeTestResult;
17
+ current?: boolean;
18
+ }> = ({ env, testResult, current = false }) => {
19
+ const { status, error, stop, duration, id } = testResult;
20
+ const [isOpened, setIsOpen] = useState(false);
21
+ const hasEmptyError = !error || !Object.keys(error).length;
22
+ const convertedStop = timestampToDate(stop);
23
+ const formattedDuration = formatDuration(duration as number);
24
+ const { t } = useI18n("controls");
25
+ const navigateUrl = id;
26
+
27
+ return (
28
+ <div data-testid={"test-result-env-item"}>
29
+ <div className={styles["test-result-environment-item-header"]}>
30
+ {!hasEmptyError && (
31
+ <span onClick={() => setIsOpen(!isOpened)}>
32
+ <ArrowButton isOpened={isOpened} icon={allureIcons.arrowsChevronDown} />
33
+ </span>
34
+ )}
35
+ <div
36
+ className={cx(styles["test-result-environment-item-wrap"], {
37
+ [styles.current]: current,
38
+ })}
39
+ onClick={(e) => {
40
+ if (current) {
41
+ return;
42
+ }
43
+
44
+ e.stopPropagation();
45
+ navigateTo(navigateUrl);
46
+ }}
47
+ >
48
+ <TreeItemIcon status={status} className={styles["test-result-environment-item-status"]} />
49
+ <Text className={styles["test-result-environment-item-env"]} bold>
50
+ {env}
51
+ </Text>
52
+ <Text className={styles["test-result-environment-item-text"]}>{convertedStop}</Text>
53
+ <div className={styles["test-result-environment-item-info"]}>
54
+ <Text type="ui" size={"s"} className={styles["test-result-environment-item-time"]}>
55
+ {formattedDuration}
56
+ </Text>
57
+ {!current && (
58
+ <TooltipWrapper tooltipText={t("openInNewTab")}>
59
+ <IconButton
60
+ icon={allureIcons.lineGeneralLinkExternal}
61
+ style={"ghost"}
62
+ size={"s"}
63
+ className={styles["test-result-environment-item-link"]}
64
+ data-testid={"test-result-env-item-new-tab-button"}
65
+ onClick={(e) => {
66
+ e.stopPropagation();
67
+ openInNewTab(navigateUrl);
68
+ }}
69
+ />
70
+ </TooltipWrapper>
71
+ )}
72
+ </div>
73
+ </div>
74
+ </div>
75
+ {isOpened && !hasEmptyError && (
76
+ <div>
77
+ <TrError status={status} {...error} />
78
+ </div>
79
+ )}
80
+ </div>
81
+ );
82
+ };
@@ -0,0 +1,60 @@
1
+ .test-result-environment-item {
2
+ &:not(.current) {
3
+ cursor: pointer;
4
+
5
+ &:hover {
6
+ background: var(--bg-control-flat-medium);
7
+ }
8
+ }
9
+ }
10
+
11
+ .test-result-environment-item-header {
12
+ display: flex;
13
+ width: 100%;
14
+ gap: 4px;
15
+ align-items: center;
16
+ }
17
+
18
+ .test-result-environment-item-wrap {
19
+ transition: background-color 300ms;
20
+ display: flex;
21
+ gap: 4px;
22
+ justify-content: space-between;
23
+ border-radius: 6px;
24
+ padding: 4px 4px 4px 4px;
25
+ width: 100%;
26
+ align-items: flex-start;
27
+ }
28
+
29
+ .test-result-environment-item-text {
30
+ padding-top: 2px;
31
+ }
32
+
33
+ .test-result-environment-item-env {
34
+ margin-top: 1px;
35
+ }
36
+
37
+ .test-result-environment-item-info {
38
+ display: flex;
39
+ gap: 4px;
40
+ align-items: center;
41
+ margin-left: auto;
42
+ }
43
+
44
+ .test-result-environment-item-time {
45
+ margin-left: auto;
46
+ line-height: 20px;
47
+ color: var(--on-text-secondary);
48
+ }
49
+
50
+ .test-result-environment-item-link {
51
+ :root {
52
+ --allure-btn-icon-color: var(--bg-control-flat);
53
+ }
54
+
55
+ color: var(--on-icon-secondary);
56
+ }
57
+
58
+ .test-result-environment-item-status {
59
+ padding-top: 4px;
60
+ }
@@ -0,0 +1,64 @@
1
+ import type { TestEnvGroup } from "@allurereport/core-api";
2
+ import { Loadable } from "@allurereport/web-components";
3
+ import type { FunctionalComponent } from "preact";
4
+ import { useEffect } from "preact/hooks";
5
+ import type { AwesomeTestResult } from "types";
6
+ import { TrEnvironmentItem } from "@/components/TestResult/TrEnvironmentItem";
7
+ import { useI18n } from "@/stores";
8
+ import { testEnvGroupsStore } from "@/stores/env";
9
+ import { fetchTestResult, testResultStore } from "@/stores/testResults";
10
+ import * as styles from "./styles.scss";
11
+
12
+ export const TrEnvironmentSection: FunctionalComponent<{
13
+ env: string;
14
+ activeTestResultId: string;
15
+ testResultId: string;
16
+ }> = ({ env, activeTestResultId, testResultId }) => {
17
+ useEffect(() => {
18
+ fetchTestResult(testResultId);
19
+ }, [testResultId]);
20
+
21
+ return (
22
+ <Loadable<Record<string, AwesomeTestResult>, AwesomeTestResult | undefined>
23
+ source={testResultStore}
24
+ transformData={(data) => data[testResultId]}
25
+ renderData={(tr) =>
26
+ tr && <TrEnvironmentItem env={env} testResult={tr} current={activeTestResultId === testResultId} />
27
+ }
28
+ />
29
+ );
30
+ };
31
+
32
+ export const TrEnvironmentsView: FunctionalComponent<{
33
+ testResult: AwesomeTestResult;
34
+ }> = ({ testResult }) => {
35
+ const { t } = useI18n("empty");
36
+
37
+ return (
38
+ <div className={styles["test-result-environments"]}>
39
+ <Loadable<Record<string, TestEnvGroup>, TestEnvGroup | undefined>
40
+ source={testEnvGroupsStore}
41
+ renderData={(group) => {
42
+ if (!group) {
43
+ return <div className={styles["test-result-empty"]}>{t("no-environments-results")}</div>;
44
+ }
45
+
46
+ const envs = Object.entries(group.testResultsByEnv).sort(([a], [b]) => b.localeCompare(a));
47
+
48
+ return (
49
+ <ul>
50
+ {envs.map(([env, trId]) => {
51
+ return (
52
+ <li key={`${env}-${trId}`}>
53
+ <TrEnvironmentSection env={env} testResultId={trId} activeTestResultId={testResult.id} />
54
+ </li>
55
+ );
56
+ })}
57
+ </ul>
58
+ );
59
+ }}
60
+ transformData={(groups) => groups[testResult?.testCase?.id]}
61
+ />
62
+ </div>
63
+ );
64
+ };
@@ -0,0 +1,11 @@
1
+ .test-result-environments {
2
+ padding: 12px 24px 32px;
3
+ min-height: 320px;
4
+ }
5
+
6
+ .test-result-empty {
7
+ display: flex;
8
+ padding: 48px 0;
9
+ width: 100%;
10
+ justify-content: center;
11
+ }
@@ -16,11 +16,9 @@ type DiffType = keyof typeof diffFunctions;
16
16
  type ViewMode = "unified" | "side-by-side";
17
17
 
18
18
  export const TrDiff = ({ expected, actual }: { expected: string; actual: string }) => {
19
- const stringifiedExpected = JSON.stringify(expected);
20
- const stringifiedActual = JSON.stringify(actual);
21
19
  const [diffType, setDiffType] = useState<DiffType>("lines");
22
20
  const [viewMode, setViewMode] = useState<ViewMode>("unified");
23
- const [diff, setDiff] = useState<Change[]>(() => diffLines(stringifiedExpected, stringifiedActual));
21
+ const [diff, setDiff] = useState<Change[]>(() => diffLines(expected, actual));
24
22
  const { t } = useI18n("controls");
25
23
 
26
24
  const DiffCode = () => {
@@ -37,8 +35,8 @@ export const TrDiff = ({ expected, actual }: { expected: string; actual: string
37
35
  const changeTypeDiff = (type: DiffType = "chars") => {
38
36
  const diffFn = diffFunctions[type];
39
37
  const result = (diffFn as (oldStr: string, newStr: string, options?: BaseOptions) => Change[])(
40
- stringifiedExpected,
41
- stringifiedActual,
38
+ expected,
39
+ actual,
42
40
  {},
43
41
  );
44
42
 
@@ -1,6 +1,7 @@
1
- import type { TestError } from "@allurereport/core-api";
1
+ import type { TestError, TestResult, TestStatus } from "@allurereport/core-api";
2
2
  import { Button, Code, IconButton, Text, TooltipWrapper, allureIcons } from "@allurereport/web-components";
3
3
  import AnsiToHtml from "ansi-to-html";
4
+ import clsx from "clsx";
4
5
  import { type FunctionalComponent } from "preact";
5
6
  import { useState } from "preact/hooks";
6
7
  import { TrDiff } from "@/components/TestResult/TrError/TrDiff";
@@ -10,7 +11,10 @@ import { copyToClipboard } from "@/utils/copyToClipboard";
10
11
  import * as styles from "./styles.scss";
11
12
 
12
13
  const TrErrorTrace = ({ trace }: { trace: string }) => {
13
- const ansiTrace = new AnsiToHtml().toHtml(trace);
14
+ const ansiTrace = new AnsiToHtml({
15
+ fg: "var(--on-text-primary)",
16
+ colors: {},
17
+ }).toHtml(trace);
14
18
  return (
15
19
  <div data-testid="test-result-error-trace" className={styles["test-result-error-trace"]}>
16
20
  <Code size={"s"} type={"ui"}>
@@ -21,7 +25,13 @@ const TrErrorTrace = ({ trace }: { trace: string }) => {
21
25
  );
22
26
  };
23
27
 
24
- export const TrError: FunctionalComponent<TestError> = ({ message, trace, actual, expected }) => {
28
+ export const TrError: FunctionalComponent<TestError & { status?: TestStatus }> = ({
29
+ message,
30
+ trace,
31
+ actual,
32
+ expected,
33
+ status,
34
+ }) => {
25
35
  const [isOpen, setIsOpen] = useState(false);
26
36
  const { t } = useI18n("ui");
27
37
  const { t: tooltip } = useI18n("controls");
@@ -35,11 +45,16 @@ export const TrError: FunctionalComponent<TestError> = ({ message, trace, actual
35
45
  });
36
46
 
37
47
  return (
38
- <div data-testid="test-result-error" className={styles["test-result-error"]}>
48
+ <div data-testid="test-result-error" className={clsx(styles["test-result-error"], styles[`tr-status-${status}`])}>
39
49
  {message ? (
40
50
  <>
41
51
  <div data-testid="test-result-error-header" className={styles["test-result-error-header"]}>
42
- <Text tag={"p"} size={"m"} bold className={styles["test-result-error-text"]}>
52
+ <Text
53
+ tag={"p"}
54
+ size={"m"}
55
+ bold
56
+ className={clsx(styles["test-result-error-text"], styles[`tr-color-${status}`])}
57
+ >
43
58
  {t("error")}
44
59
  </Text>
45
60
  <TooltipWrapper tooltipText={tooltip("clipboard")} tooltipTextAfterClick={tooltip("clipboardSuccess")}>
@@ -63,7 +78,7 @@ export const TrError: FunctionalComponent<TestError> = ({ message, trace, actual
63
78
  empty("no-message-provided")
64
79
  )}
65
80
 
66
- {Boolean(actual && expected) && (
81
+ {Boolean(actual && actual !== "undefined" && expected && expected !== "undefined") && (
67
82
  <Button
68
83
  style={"flat"}
69
84
  data-testId={"test-result-diff-button"}
@@ -13,7 +13,43 @@
13
13
  position: absolute;
14
14
  left: 0;
15
15
  top: 0;
16
- background: var(--on-support-capella);
16
+ //background: var(--on-support-capella);
17
+ //background: var(--on-support-capella);
18
+ }
19
+ }
20
+
21
+ .tr-status-failed {
22
+ background-color: var(--bg-alpha-capella);
23
+ &:before {
24
+ background-color: var(--bg-support-capella);
25
+ }
26
+ }
27
+
28
+ .tr-status-broken {
29
+ background-color: var(--bg-alpha-atlas);
30
+ &:before {
31
+ background-color: var(--bg-support-atlas);
32
+ }
33
+ }
34
+
35
+ .tr-status-skipped {
36
+ background-color: var(--bg-alpha-rau);
37
+ &:before {
38
+ background-color: var(--bg-support-rau);
39
+ }
40
+ }
41
+
42
+ .tr-status-unknown {
43
+ background-color: var(--bg-alpha-skat);
44
+ &:before {
45
+ background-color: var(--bg-support-skat);
46
+ }
47
+ }
48
+
49
+ .tr-status-passed {
50
+ background-color: var(--bg-alpha-castor);
51
+ &:before {
52
+ background-color: var(--bg-support-castor);
17
53
  }
18
54
  }
19
55
 
@@ -30,6 +66,48 @@
30
66
  margin-right: auto;
31
67
  }
32
68
 
69
+ .tr-color-failed {
70
+ color: var(--on-support-capella);
71
+ }
72
+
73
+ .tr-color-broken {
74
+ color: var(--on-support-atlas);
75
+ }
76
+
77
+ .tr-color-skipped {
78
+ color: var(--on-support-rau);
79
+ }
80
+
81
+ .tr-color-passed {
82
+ color: var(--on-support-castor);
83
+ }
84
+ .tr-color-unknown {
85
+ color: var(--on-support-skat);
86
+ }
87
+
88
+ .tr-bg-failed {
89
+ background: var(--bg-support-capella);
90
+ }
91
+
92
+ .tr-bg-broken {
93
+ background: var(--bg-support-atlas);
94
+ }
95
+
96
+ .tr-bg-skipped {
97
+ background: var(--bg-support-rau);
98
+ }
99
+
100
+ .tr-bg-passed {
101
+ background: var(--bg-support-castor);
102
+ }
103
+
104
+ .tr-bg-failed {
105
+ background: var(--bg-support-capella);
106
+ }
107
+ .tr-bg-unknown {
108
+ background: var(--bg-support-skat);
109
+ }
110
+
33
111
  .test-result-error-trace {
34
112
  margin-top: 8px;
35
113
  padding-left: 8px;
@@ -48,7 +126,7 @@
48
126
  margin-bottom: 4px;
49
127
 
50
128
  &:hover {
51
- background: var(--bg-alpha-capella);
129
+ background: inherit;
52
130
  }
53
131
  }
54
132
 
@@ -56,18 +134,28 @@
56
134
  width: 100%;
57
135
  line-height: 1.28;
58
136
  padding: 0 16px 16px;
137
+ display: flex;
138
+ flex-direction: column;
139
+ height: 100%;
140
+ overflow: hidden;
59
141
 
60
142
  .side {
61
143
  flex: 1 1 auto;
62
144
  gap: 4px;
145
+ height: 100%;
146
+ overflow: hidden;
63
147
  }
64
148
 
65
149
  .unified {
66
150
  flex: 1 1 auto;
151
+ overflow: auto;
67
152
  }
68
153
 
69
154
  .diff-screen {
70
155
  min-height: 320px;
156
+ height: 100%;
157
+ overflow: auto;
158
+ padding-bottom: 48px;
71
159
  }
72
160
  }
73
161
 
@@ -125,6 +213,8 @@
125
213
  .side-by-side {
126
214
  display: flex;
127
215
  gap: 4px;
216
+ height: 100%;
217
+ overflow: hidden;
128
218
  }
129
219
 
130
220
  .diff-buttons-title {
@@ -1,14 +1,14 @@
1
1
  import { IconButton, SvgIcon, Text, allureIcons } from "@allurereport/web-components";
2
2
  import clsx from "clsx";
3
3
  import type { AwesomeTestResult } from "types";
4
- import * as styles from "@/components/TestResult/TestResultHeader/styles.scss";
4
+ import * as styles from "@/components/TestResult/TrHeader/styles.scss";
5
5
  import { navigateTo } from "@/stores/router";
6
6
 
7
- interface TestResultBreadcrumbsProps {
7
+ interface TrBreadcrumbs {
8
8
  testResult?: AwesomeTestResult;
9
9
  }
10
10
 
11
- export const TestResultBreadcrumbs = ({ testResult }: TestResultBreadcrumbsProps) => {
11
+ export const TrBreadcrumbs = ({ testResult }: TrBreadcrumbs) => {
12
12
  const { breadcrumbs, name } = testResult || {};
13
13
 
14
14
  return (
@@ -0,0 +1,15 @@
1
+ import type { FunctionalComponent } from "preact";
2
+ import { HeaderControls } from "@/components/HeaderControls";
3
+ import type { TrProps } from "@/components/TestResult";
4
+ import { TrBreadcrumbs } from "@/components/TestResult/TrHeader/TrBreadcrumbs";
5
+ import { isSplitMode } from "@/stores/layout";
6
+ import * as styles from "./styles.scss";
7
+
8
+ export const TrHeader: FunctionalComponent<TrProps> = ({ testResult }) => {
9
+ return (
10
+ <div className={styles.above}>
11
+ {!isSplitMode.value ? <TrBreadcrumbs testResult={testResult} /> : ""}
12
+ <HeaderControls className={styles.right} />
13
+ </div>
14
+ );
15
+ };
@@ -3,13 +3,13 @@ import { IconButton, Text, TooltipWrapper, TreeItemIcon, allureIcons } from "@al
3
3
  import { type FunctionalComponent } from "preact";
4
4
  import { useState } from "preact/hooks";
5
5
  import { ArrowButton } from "@/components/ArrowButton";
6
- import * as styles from "@/components/TestResult/TestResultHistory/styles.scss";
7
6
  import { TrError } from "@/components/TestResult/TrError";
7
+ import * as styles from "@/components/TestResult/TrHistory/styles.scss";
8
8
  import { useI18n } from "@/stores";
9
9
  import { navigateTo, openInNewTab } from "@/stores/router";
10
10
  import { timestampToDate } from "@/utils/time";
11
11
 
12
- export const TestResultHistoryItem: FunctionalComponent<{
12
+ export const TrHistoryItem: FunctionalComponent<{
13
13
  testResultItem: HistoryTestResult;
14
14
  }> = ({ testResultItem }: { testResultItem: HistoryTestResult }) => {
15
15
  const { status, error, stop, duration, id } = testResultItem;
@@ -58,7 +58,7 @@ export const TestResultHistoryItem: FunctionalComponent<{
58
58
  </div>
59
59
  {isOpened && error && (
60
60
  <div>
61
- <TrError {...error} />
61
+ <TrError {...error} status={status} />
62
62
  </div>
63
63
  )}
64
64
  </div>
@@ -1,21 +1,21 @@
1
1
  import type { FunctionalComponent } from "preact";
2
- import { TestResultHistoryItem } from "@/components/TestResult/TestResultHistory/TestResultHistoryItem";
2
+ import { TrHistoryItem } from "@/components/TestResult/TrHistory/TrHistoryItem";
3
3
  import { useI18n } from "@/stores";
4
4
  import { type AwesomeTestResult } from "../../../../types";
5
5
  import * as styles from "./styles.scss";
6
6
 
7
- export type TestResultHistoryViewProps = {
7
+ export type TrHistoryViewProps = {
8
8
  testResult?: AwesomeTestResult;
9
9
  };
10
10
 
11
- const TestResultHistoryView: FunctionalComponent<TestResultHistoryViewProps> = ({ testResult }) => {
11
+ const TrHistoryView: FunctionalComponent<TrHistoryViewProps> = ({ testResult }) => {
12
12
  const { history } = testResult ?? {};
13
13
  const { t } = useI18n("empty");
14
14
 
15
15
  return (
16
16
  <div className={styles["test-result-history"]}>
17
17
  {history.length ? (
18
- history?.map((item, key) => <TestResultHistoryItem testResultItem={item} key={key} />)
18
+ history?.map((item, key) => <TrHistoryItem testResultItem={item} key={key} />)
19
19
  ) : (
20
20
  <div className={styles["test-result-empty"]}>{t("no-history-results")}</div>
21
21
  )}
@@ -23,4 +23,4 @@ const TestResultHistoryView: FunctionalComponent<TestResultHistoryViewProps> = (
23
23
  );
24
24
  };
25
25
 
26
- export default TestResultHistoryView;
26
+ export default TrHistoryView;
@@ -10,7 +10,7 @@ const icons: Record<string, string> = {
10
10
  muted: allureIcons.lineGeneralEye,
11
11
  };
12
12
 
13
- export const TestResultInfoStatuses: FunctionalComponent<{ statuses: [string, boolean][] }> = ({ statuses }) => {
13
+ export const TrInfoStatuses: FunctionalComponent<{ statuses: [string, boolean][] }> = ({ statuses }) => {
14
14
  const { t } = useI18n("filters");
15
15
 
16
16
  return (