@allurereport/web-awesome 3.0.0-beta.7 → 3.0.0-beta.8

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 (251) hide show
  1. package/.eslintrc.cjs +4 -1
  2. package/dist/multi/141.app-4375537b.js +1 -0
  3. package/dist/multi/222.app-4375537b.js +1 -0
  4. package/dist/multi/335.app-4375537b.js +1 -0
  5. package/dist/multi/34.app-4375537b.js +1 -0
  6. package/dist/multi/349.app-4375537b.js +1 -0
  7. package/dist/multi/378.app-4375537b.js +1 -0
  8. package/dist/multi/406.app-4375537b.js +1 -0
  9. package/dist/multi/476.app-4375537b.js +1 -0
  10. package/dist/multi/53.app-4375537b.js +1 -0
  11. package/dist/multi/584.app-4375537b.js +1 -0
  12. package/dist/multi/690.app-4375537b.js +1 -0
  13. package/dist/multi/747.app-4375537b.js +1 -0
  14. package/dist/multi/767.app-4375537b.js +1 -0
  15. package/dist/multi/83.app-4375537b.js +1 -0
  16. package/dist/multi/873.app-4375537b.js +1 -0
  17. package/dist/multi/920.app-4375537b.js +1 -0
  18. package/dist/multi/991.app-4375537b.js +1 -0
  19. package/dist/multi/app-4375537b.js +2 -0
  20. package/dist/multi/manifest.json +20 -20
  21. package/dist/multi/styles-4375537b.css +283 -0
  22. package/dist/single/app-f16f6693.js +2 -0
  23. package/dist/single/manifest.json +1 -1
  24. package/package.json +6 -4
  25. package/src/assets/scss/fonts.scss +2 -20
  26. package/src/components/{app/ArrowButton → ArrowButton}/index.tsx +3 -4
  27. package/src/components/{app/BaseLayout → BaseLayout}/index.tsx +17 -16
  28. package/src/components/{app/Footer → Footer}/FooterLogo.tsx +2 -2
  29. package/src/components/Footer/FooterVersion.tsx +33 -0
  30. package/src/components/Footer/index.tsx +13 -0
  31. package/src/components/Header/index.tsx +14 -0
  32. package/src/components/{app/LanguagePicker → LanguagePicker}/index.tsx +2 -3
  33. package/src/components/MainReport/index.tsx +19 -0
  34. package/src/components/{app/Metadata → Metadata}/index.tsx +23 -16
  35. package/src/components/{app/Metadata → Metadata}/styles.scss +1 -1
  36. package/src/components/{app/MetadataButton → MetadataButton}/index.tsx +3 -4
  37. package/src/components/{app/Modal → Modal}/index.tsx +9 -19
  38. package/src/components/{app/ReportBody → ReportBody}/Filters.tsx +7 -11
  39. package/src/components/{app/ReportBody → ReportBody}/HeaderActions.tsx +1 -1
  40. package/src/components/{app/ReportBody → ReportBody}/SortBy.tsx +12 -14
  41. package/src/components/{app/ReportBody → ReportBody}/index.tsx +2 -2
  42. package/src/components/{app/ReportHeader → ReportHeader}/ReportHeaderLabelList.tsx +2 -2
  43. package/src/components/{app/ReportHeader → ReportHeader}/ReportHeaderLogo.tsx +2 -2
  44. package/src/components/{app/ReportHeader → ReportHeader}/ReportHeaderPie.tsx +2 -2
  45. package/src/components/{app/ReportHeader → ReportHeader}/index.tsx +5 -5
  46. package/src/components/{app/ReportLogo → ReportLogo}/index.tsx +3 -4
  47. package/src/components/{app/ReportLogoFull → ReportLogoFull}/index.tsx +3 -4
  48. package/src/components/{app/ReportMetadata → ReportMetadata}/MetadataItem.tsx +2 -2
  49. package/src/components/{app/ReportMetadata → ReportMetadata}/MetadataSummary.tsx +8 -10
  50. package/src/components/{app/ReportMetadata → ReportMetadata}/MetadataTestType.tsx +5 -5
  51. package/src/components/ReportMetadata/MetadataWithIcon.tsx +21 -0
  52. package/src/components/{app/ReportMetadata → ReportMetadata}/index.tsx +5 -5
  53. package/src/components/{app/ReportMetadata → ReportMetadata}/styles.scss +1 -1
  54. package/src/components/{app/Tabs → Tabs}/index.tsx +1 -1
  55. package/src/components/{app/TestResult → TestResult}/TestResultAttachmentsView/index.tsx +1 -1
  56. package/src/components/{app/TestResult → TestResult}/TestResultDescription/index.tsx +4 -4
  57. package/src/components/TestResult/TestResultDropdown/index.tsx +23 -0
  58. package/src/components/{app/TestResult → TestResult}/TestResultEmpty/index.tsx +5 -6
  59. package/src/components/TestResult/TestResultError/index.tsx +59 -0
  60. package/src/components/{app/TestResult → TestResult}/TestResultHeader/index.tsx +10 -10
  61. package/src/components/{app/TestResult → TestResult}/TestResultHistory/TestResultHistoryItem.tsx +16 -17
  62. package/src/components/{app/TestResult → TestResult}/TestResultHistory/index.tsx +2 -2
  63. package/src/components/{app/TestResult → TestResult}/TestResultInfo/TestResultInfoStatuses.tsx +8 -9
  64. package/src/components/{app/TestResult → TestResult}/TestResultInfo/index.tsx +8 -10
  65. package/src/components/{app/TestResult → TestResult}/TestResultLinks/index.tsx +12 -16
  66. package/src/components/{app/TestResult → TestResult}/TestResultMetadata/index.tsx +4 -4
  67. package/src/components/{app/TestResult → TestResult}/TestResultNavigation/index.tsx +7 -9
  68. package/src/components/{app/TestResult → TestResult}/TestResultOverview.tsx +13 -13
  69. package/src/components/{app/TestResult → TestResult}/TestResultParameters/index.tsx +4 -4
  70. package/src/components/{app/TestResult → TestResult}/TestResultPrevStatuses/index.tsx +6 -9
  71. package/src/components/TestResult/TestResultRetriesView/TestResultRetriesItem.tsx +52 -0
  72. package/src/components/TestResult/TestResultRetriesView/index.tsx +24 -0
  73. package/src/components/{app/TestResult → TestResult}/TestResultSetup/index.tsx +8 -9
  74. package/src/components/TestResult/TestResultSeverity/index.tsx +27 -0
  75. package/src/components/{app/TestResult → TestResult}/TestResultStatus/index.tsx +2 -2
  76. package/src/components/{app/TestResult → TestResult}/TestResultSteps/attachment.tsx +10 -10
  77. package/src/components/{app/TestResult → TestResult}/TestResultSteps/attachmentCode.tsx +7 -2
  78. package/src/components/{app/TestResult → TestResult}/TestResultSteps/attachmentImage.tsx +6 -3
  79. package/src/components/TestResult/TestResultSteps/attachmentVideo.tsx +15 -0
  80. package/src/components/{app/TestResult → TestResult}/TestResultSteps/index.tsx +5 -5
  81. package/src/components/{app/TestResult → TestResult}/TestResultSteps/testResultAttachment.tsx +25 -27
  82. package/src/components/{app/TestResult → TestResult}/TestResultSteps/testResultAttachmentInfo.tsx +8 -12
  83. package/src/components/{app/TestResult → TestResult}/TestResultSteps/testResultStep.tsx +25 -18
  84. package/src/components/TestResult/TestResultSteps/testResultStepInfo.tsx +30 -0
  85. package/src/components/{app/TestResult → TestResult}/TestResultSteps/wrongAttachment.tsx +1 -1
  86. package/src/components/{app/TestResult → TestResult}/TestResultTabs/index.tsx +1 -1
  87. package/src/components/{app/TestResult → TestResult}/TestResultTeardown/index.tsx +6 -6
  88. package/src/components/{app/TestResult → TestResult}/index.tsx +10 -10
  89. package/src/components/{app/ThemeButton → ThemeButton}/ThemeButton.tsx +2 -4
  90. package/src/components/{app/Tree → Tree}/Tree.tsx +3 -10
  91. package/src/components/{app/Tree → Tree}/TreeHeader.tsx +3 -3
  92. package/src/components/{app/Tree → Tree}/TreeItem.tsx +2 -2
  93. package/src/components/Tree/TreeItemIcon.tsx +32 -0
  94. package/src/components/{app/Tree → Tree}/index.tsx +7 -7
  95. package/src/i18n/locales/en.json +1 -0
  96. package/src/index.tsx +2 -2
  97. package/src/stores/index.ts +1 -1
  98. package/src/stores/testResults.ts +6 -2
  99. package/src/stores/tree.ts +1 -1
  100. package/src/utils/isMac.ts +6 -5
  101. package/src/utils/treeFilters.ts +107 -58
  102. package/test/utils/treeFilters.test.ts +25 -1
  103. package/tsconfig.json +5 -3
  104. package/vitest.config.ts +7 -1
  105. package/webpack.config.js +2 -0
  106. package/dist/multi/141.app-4468f0e2.js +0 -1
  107. package/dist/multi/222.app-4468f0e2.js +0 -1
  108. package/dist/multi/335.app-4468f0e2.js +0 -1
  109. package/dist/multi/34.app-4468f0e2.js +0 -1
  110. package/dist/multi/349.app-4468f0e2.js +0 -1
  111. package/dist/multi/378.app-4468f0e2.js +0 -1
  112. package/dist/multi/406.app-4468f0e2.js +0 -1
  113. package/dist/multi/476.app-4468f0e2.js +0 -1
  114. package/dist/multi/53.app-4468f0e2.js +0 -1
  115. package/dist/multi/584.app-4468f0e2.js +0 -1
  116. package/dist/multi/690.app-4468f0e2.js +0 -1
  117. package/dist/multi/747.app-4468f0e2.js +0 -1
  118. package/dist/multi/767.app-4468f0e2.js +0 -1
  119. package/dist/multi/83.app-4468f0e2.js +0 -1
  120. package/dist/multi/873.app-4468f0e2.js +0 -1
  121. package/dist/multi/920.app-4468f0e2.js +0 -1
  122. package/dist/multi/991.app-4468f0e2.js +0 -1
  123. package/dist/multi/app-4468f0e2.js +0 -2
  124. package/dist/multi/styles-4468f0e2.css +0 -363
  125. package/dist/single/app-33b3c367.js +0 -2
  126. package/src/assets/fonts/JetBrainsMono_vf.woff +0 -0
  127. package/src/assets/fonts/JetBrainsMono_vf.woff2 +0 -0
  128. package/src/assets/fonts/pt-root-ui_vf.woff +0 -0
  129. package/src/assets/fonts/pt-root-ui_vf.woff2 +0 -0
  130. package/src/assets/scss/mixins.scss +0 -26
  131. package/src/assets/svg/arrows-chevron-down.svg +0 -5
  132. package/src/assets/svg/github.svg +0 -5
  133. package/src/assets/svg/line-alerts-notification-box.svg +0 -3
  134. package/src/assets/svg/line-arrows-chevron-down-double.svg +0 -3
  135. package/src/assets/svg/line-arrows-chevron-down.svg +0 -3
  136. package/src/assets/svg/line-arrows-chevron-right.svg +0 -3
  137. package/src/assets/svg/line-arrows-chevron-up-double.svg +0 -3
  138. package/src/assets/svg/line-arrows-chevron-up.svg +0 -3
  139. package/src/assets/svg/line-arrows-corner-down-right.svg +0 -3
  140. package/src/assets/svg/line-arrows-expand-3.svg +0 -3
  141. package/src/assets/svg/line-arrows-refresh-ccw-1.svg +0 -3
  142. package/src/assets/svg/line-arrows-sort-line-asc.svg +0 -3
  143. package/src/assets/svg/line-arrows-sort-line-desc.svg +0 -3
  144. package/src/assets/svg/line-arrows-switch-vertical-1.svg +0 -3
  145. package/src/assets/svg/line-dev-bug-2.svg +0 -3
  146. package/src/assets/svg/line-dev-code-square.svg +0 -3
  147. package/src/assets/svg/line-files-file-attachment-2.svg +0 -3
  148. package/src/assets/svg/line-general-check.svg +0 -3
  149. package/src/assets/svg/line-general-checklist3.svg +0 -3
  150. package/src/assets/svg/line-general-copy-3.svg +0 -3
  151. package/src/assets/svg/line-general-download-cloud.svg +0 -3
  152. package/src/assets/svg/line-general-equal.svg +0 -3
  153. package/src/assets/svg/line-general-home-line.svg +0 -3
  154. package/src/assets/svg/line-general-link-1.svg +0 -3
  155. package/src/assets/svg/line-general-link-external.svg +0 -3
  156. package/src/assets/svg/line-general-search-md.svg +0 -3
  157. package/src/assets/svg/line-general-settings-1.svg +0 -3
  158. package/src/assets/svg/line-general-x-close.svg +0 -3
  159. package/src/assets/svg/line-general-zap.svg +0 -3
  160. package/src/assets/svg/line-helpers-flag.svg +0 -4
  161. package/src/assets/svg/line-helpers-play-circle.svg +0 -4
  162. package/src/assets/svg/line-images-image.svg +0 -3
  163. package/src/assets/svg/line-security-key.svg +0 -3
  164. package/src/assets/svg/line-shapes-dot-circle.svg +0 -3
  165. package/src/assets/svg/line-shapes-moon.svg +0 -3
  166. package/src/assets/svg/line-shapes-sun.svg +0 -3
  167. package/src/assets/svg/line-time-clock-stopwatch.svg +0 -3
  168. package/src/assets/svg/report-logo.svg +0 -64
  169. package/src/assets/svg/solid-alert-circle.svg +0 -3
  170. package/src/assets/svg/solid-check-circle.svg +0 -3
  171. package/src/assets/svg/solid-help-circle.svg +0 -3
  172. package/src/assets/svg/solid-minus-circle.svg +0 -3
  173. package/src/assets/svg/solid-x-circle.svg +0 -3
  174. package/src/assets/svg/spinner.svg +0 -18
  175. package/src/assets/svg/view-off.svg +0 -12
  176. package/src/assets/svg/view.svg +0 -11
  177. package/src/components/app/Footer/FooterVersion.tsx +0 -27
  178. package/src/components/app/Footer/index.tsx +0 -13
  179. package/src/components/app/Header/index.tsx +0 -17
  180. package/src/components/app/MainReport/index.tsx +0 -19
  181. package/src/components/app/ReportMetadata/MetadataWithIcon.tsx +0 -25
  182. package/src/components/app/TestResult/TestResultDropdown/index.tsx +0 -19
  183. package/src/components/app/TestResult/TestResultError/index.tsx +0 -53
  184. package/src/components/app/TestResult/TestResultRetriesView/TestResultRetriesItem.tsx +0 -50
  185. package/src/components/app/TestResult/TestResultRetriesView/index.tsx +0 -24
  186. package/src/components/app/TestResult/TestResultSeverity/index.tsx +0 -34
  187. package/src/components/app/TestResult/TestResultSteps/attachmentVideo.tsx +0 -12
  188. package/src/components/app/TestResult/TestResultSteps/testResultStepInfo.tsx +0 -33
  189. package/src/components/app/Tree/TreeItemIcon.tsx +0 -35
  190. package/src/components/commons/Button/index.tsx +0 -176
  191. package/src/components/commons/Button/styles.scss +0 -560
  192. package/src/components/commons/Counter/index.tsx +0 -29
  193. package/src/components/commons/Counter/styles.scss +0 -21
  194. package/src/components/commons/Label/index.tsx +0 -11
  195. package/src/components/commons/Label/styles.scss +0 -7
  196. package/src/components/commons/Link/index.tsx +0 -20
  197. package/src/components/commons/Link/styles.scss +0 -46
  198. package/src/components/commons/Loadable/index.tsx +0 -32
  199. package/src/components/commons/Menu/index.tsx +0 -198
  200. package/src/components/commons/Menu/styles.scss +0 -94
  201. package/src/components/commons/PageLoader/index.tsx +0 -10
  202. package/src/components/commons/PageLoader/styles.scss +0 -29
  203. package/src/components/commons/SearchBox/index.tsx +0 -64
  204. package/src/components/commons/SearchBox/styles.scss +0 -58
  205. package/src/components/commons/Spinner/index.tsx +0 -8
  206. package/src/components/commons/SuccessRatePieChart/index.tsx +0 -52
  207. package/src/components/commons/SuccessRatePieChart/styles.scss +0 -11
  208. package/src/components/commons/SvgIcon/index.tsx +0 -46
  209. package/src/components/commons/SvgIcon/styles.scss +0 -26
  210. package/src/components/commons/Toggle/index.tsx +0 -30
  211. package/src/components/commons/Toggle/styles.scss +0 -48
  212. package/src/components/commons/Tooltip/index.tsx +0 -123
  213. package/src/components/commons/Tooltip/styles.scss +0 -38
  214. package/src/components/commons/Typography/index.tsx +0 -99
  215. package/src/hooks/useDebouncedCallback.ts +0 -31
  216. /package/dist/multi/{816.app-4468f0e2.js → 816.app-4375537b.js} +0 -0
  217. /package/dist/multi/{app-4468f0e2.js.LICENSE.txt → app-4375537b.js.LICENSE.txt} +0 -0
  218. /package/dist/single/{app-33b3c367.js.LICENSE.txt → app-f16f6693.js.LICENSE.txt} +0 -0
  219. /package/src/assets/scss/{code.css → code.scss} +0 -0
  220. /package/src/components/{app/ArrowButton → ArrowButton}/styles.scss +0 -0
  221. /package/src/components/{app/BaseLayout → BaseLayout}/styles.scss +0 -0
  222. /package/src/components/{app/Footer → Footer}/styles.scss +0 -0
  223. /package/src/components/{app/Header → Header}/styles.scss +0 -0
  224. /package/src/components/{app/MetadataButton → MetadataButton}/styles.scss +0 -0
  225. /package/src/components/{app/Modal → Modal}/styles.scss +0 -0
  226. /package/src/components/{app/ReportBody → ReportBody}/context.tsx +0 -0
  227. /package/src/components/{app/ReportBody → ReportBody}/styles.scss +0 -0
  228. /package/src/components/{app/ReportHeader → ReportHeader}/styles.scss +0 -0
  229. /package/src/components/{app/ReportLogo → ReportLogo}/styles.scss +0 -0
  230. /package/src/components/{app/ReportLogoFull → ReportLogoFull}/styles.scss +0 -0
  231. /package/src/components/{app/Tabs → Tabs}/styles.scss +0 -0
  232. /package/src/components/{app/TestResult → TestResult}/TestResultAttachmentsView/styles.scss +0 -0
  233. /package/src/components/{app/TestResult → TestResult}/TestResultDescription/styles.scss +0 -0
  234. /package/src/components/{app/TestResult → TestResult}/TestResultDropdown/styles.scss +0 -0
  235. /package/src/components/{app/TestResult → TestResult}/TestResultEmpty/styles.scss +0 -0
  236. /package/src/components/{app/TestResult → TestResult}/TestResultError/styles.scss +0 -0
  237. /package/src/components/{app/TestResult → TestResult}/TestResultHeader/styles.scss +0 -0
  238. /package/src/components/{app/TestResult → TestResult}/TestResultHistory/styles.scss +0 -0
  239. /package/src/components/{app/TestResult → TestResult}/TestResultInfo/styles.scss +0 -0
  240. /package/src/components/{app/TestResult → TestResult}/TestResultLinks/styles.scss +0 -0
  241. /package/src/components/{app/TestResult → TestResult}/TestResultMetadata/styles.scss +0 -0
  242. /package/src/components/{app/TestResult → TestResult}/TestResultNavigation/styles.scss +0 -0
  243. /package/src/components/{app/TestResult → TestResult}/TestResultParameters/styles.scss +0 -0
  244. /package/src/components/{app/TestResult → TestResult}/TestResultPrevStatuses/styles.scss +0 -0
  245. /package/src/components/{app/TestResult → TestResult}/TestResultRetriesView/styles.scss +0 -0
  246. /package/src/components/{app/TestResult → TestResult}/TestResultSeverity/styles.scss +0 -0
  247. /package/src/components/{app/TestResult → TestResult}/TestResultStatus/styles.scss +0 -0
  248. /package/src/components/{app/TestResult → TestResult}/TestResultSteps/HtmlAttachmentPreview.tsx +0 -0
  249. /package/src/components/{app/TestResult → TestResult}/TestResultSteps/styles.scss +0 -0
  250. /package/src/components/{app/TestResult → TestResult}/TestResultTabs/styles.scss +0 -0
  251. /package/src/components/{app/Tree → Tree}/styles.scss +0 -0
@@ -1,8 +1,7 @@
1
1
  import { getReportOptions } from "@allurereport/web-commons";
2
+ import { SvgIcon, allureIcons } from "@allurereport/web-components";
2
3
  import { clsx } from "clsx";
3
- import reportLogoDefault from "@/assets/svg/report-logo.svg";
4
- import { AllureAwesomeReportOptions } from "../../../../types";
5
- import { SvgIcon } from "../../commons/SvgIcon";
4
+ import type { AllureAwesomeReportOptions } from "types";
6
5
  import * as styles from "./styles.scss";
7
6
 
8
7
  export const ReportLogo = (props: { className?: string; logo?: never }) => {
@@ -11,7 +10,7 @@ export const ReportLogo = (props: { className?: string; logo?: never }) => {
11
10
 
12
11
  return (
13
12
  <div className={clsx(styles["report-logo"], className)}>
14
- {logo ? <img src={logo} alt="report logo" /> : <SvgIcon id={reportLogoDefault.id} inline />}
13
+ {logo ? <img src={logo} alt="report logo" /> : <SvgIcon id={allureIcons.reportLogo} inline />}
15
14
  </div>
16
15
  );
17
16
  };
@@ -1,7 +1,6 @@
1
+ import { SvgIcon, allureIcons } from "@allurereport/web-components";
2
+ import { Text } from "@allurereport/web-components";
1
3
  import { clsx } from "clsx";
2
- import reportLogo from "@/assets/svg/report-logo.svg";
3
- import { SvgIcon } from "../../commons/SvgIcon";
4
- import { Text } from "../../commons/Typography";
5
4
  import * as styles from "./styles.scss";
6
5
 
7
6
  export const ReportLogoFull = (props: {
@@ -14,7 +13,7 @@ export const ReportLogoFull = (props: {
14
13
 
15
14
  return (
16
15
  <Text type="paragraph" size="m" bold className={clsx(className, styles.text)}>
17
- <SvgIcon id={reportLogo.id} size="m" inline className={styles.logo} />
16
+ <SvgIcon id={allureIcons.reportLogo} size="m" inline className={styles.logo} />
18
17
  <span>Allure Report</span>
19
18
  </Text>
20
19
  );
@@ -1,6 +1,6 @@
1
+ import { Text } from "@allurereport/web-components";
1
2
  import { clsx } from "clsx";
2
- import { FunctionalComponent } from "preact";
3
- import { Text } from "@/components/commons/Typography";
3
+ import type { FunctionalComponent } from "preact";
4
4
  import * as styles from "./styles.scss";
5
5
 
6
6
  export type MetadataProps = {
@@ -1,13 +1,11 @@
1
- import type { Statistic } from "@allurereport/core-api";
2
- import { statusesList } from "@allurereport/core-api";
1
+ import { type Statistic, statusesList } from "@allurereport/core-api";
2
+ import { Loadable } from "@allurereport/web-components";
3
3
  import { computed } from "@preact/signals";
4
4
  import type { FunctionComponent } from "preact";
5
- import type { MetadataProps } from "@/components/app/ReportMetadata/MetadataItem";
6
- import MetadataItem from "@/components/app/ReportMetadata/MetadataItem";
7
- import { MetadataTestType } from "@/components/app/ReportMetadata/MetadataTestType";
8
- import { MetadataWithIcon } from "@/components/app/ReportMetadata/MetadataWithIcon";
9
- import * as styles from "@/components/app/ReportMetadata/styles.scss";
10
- import { Loadable } from "@/components/commons/Loadable";
5
+ import MetadataItem, { type MetadataProps } from "@/components/ReportMetadata/MetadataItem";
6
+ import { MetadataTestType } from "@/components/ReportMetadata/MetadataTestType";
7
+ import { MetadataWithIcon } from "@/components/ReportMetadata/MetadataWithIcon";
8
+ import * as styles from "@/components/ReportMetadata/styles.scss";
11
9
  import { statsStore } from "@/stores";
12
10
  import { useI18n } from "@/stores/locale";
13
11
  import { capitalize } from "@/utils/capitalize";
@@ -28,11 +26,11 @@ export const MetadataSummary: FunctionComponent = () => {
28
26
  }));
29
27
  const metaDataTests = ["flaky", "retry"]
30
28
  .map((key) => {
31
- if (!stats[key]) {
29
+ if (!stats[key as keyof Statistic]) {
32
30
  return;
33
31
  }
34
32
  const title = testSummary(key);
35
- const props = { title, count: stats[key] || 0, type: key };
33
+ const props = { title, count: stats[key as keyof Statistic] || 0, type: key };
36
34
 
37
35
  return (
38
36
  <div key={key}>
@@ -1,13 +1,13 @@
1
+ import { Text } from "@allurereport/web-components";
1
2
  import { clsx } from "clsx";
2
- import { FunctionComponent } from "preact";
3
- import { MetadataProps } from "@/components/app/ReportMetadata/MetadataItem";
4
- import * as styles from "@/components/app/ReportMetadata/styles.scss";
5
- import { Text } from "@/components/commons/Typography";
3
+ import type { FunctionComponent } from "preact";
4
+ import type { MetadataProps } from "@/components/ReportMetadata/MetadataItem";
5
+ import * as styles from "@/components/ReportMetadata/styles.scss";
6
6
 
7
7
  export const MetadataTestType: FunctionComponent<MetadataProps> = ({ status, count }) => {
8
8
  return (
9
9
  <div data-testid="metadata-value" className={styles["metadata-test-type"]}>
10
- <div className={clsx(styles["metadata-color-badge"], styles?.[`status-${status}`])}></div>
10
+ <div className={clsx(styles["metadata-color-badge"], styles?.[`status-${status}`])} />
11
11
  <Text type={"ui"} size={"m"} bold>
12
12
  {count}
13
13
  </Text>
@@ -0,0 +1,21 @@
1
+ import { SvgIcon, Text, allureIcons } from "@allurereport/web-components";
2
+ import type { FunctionComponent } from "preact";
3
+ import type { MetadataProps } from "@/components/ReportMetadata/MetadataItem";
4
+ import * as styles from "./styles.scss";
5
+
6
+ const icons: Record<string, string> = {
7
+ flaky: allureIcons.lineGeneralZap,
8
+ retry: allureIcons.lineArrowsRefreshCcw1,
9
+ new: allureIcons.lineAlertsNotificationBox,
10
+ };
11
+
12
+ export const MetadataWithIcon: FunctionComponent<MetadataProps> = ({ type, count }) => {
13
+ return (
14
+ <div data-testid="metadata-value" className={styles["metadata-with-icon"]}>
15
+ {type !== "all" && <SvgIcon className={styles["metadata-icon"]} id={icons[type]} size={"s"} />}
16
+ <Text size={"m"} bold>
17
+ {count}
18
+ </Text>
19
+ </div>
20
+ );
21
+ };
@@ -1,10 +1,10 @@
1
1
  import type { EnvironmentItem } from "@allurereport/core-api";
2
- import { FunctionalComponent } from "preact";
2
+ import { Loadable } from "@allurereport/web-components";
3
+ import type { FunctionalComponent } from "preact";
3
4
  import { useState } from "preact/hooks";
4
- import { MetadataList } from "@/components/app/Metadata";
5
- import { MetadataButton } from "@/components/app/MetadataButton";
6
- import { MetadataSummary } from "@/components/app/ReportMetadata/MetadataSummary";
7
- import { Loadable } from "@/components/commons/Loadable";
5
+ import { MetadataList } from "@/components/Metadata";
6
+ import { MetadataButton } from "@/components/MetadataButton";
7
+ import { MetadataSummary } from "@/components/ReportMetadata/MetadataSummary";
8
8
  import { envInfoStore } from "@/stores/envInfo";
9
9
  import * as styles from "./styles.scss";
10
10
 
@@ -1,4 +1,4 @@
1
- @import "../../../assets/scss/mixins.scss";
1
+ @import "~@allurereport/web-components/mixins.scss";
2
2
 
3
3
  .report-metadata {
4
4
  padding-top: 20px;
@@ -1,6 +1,6 @@
1
+ import { Text } from "@allurereport/web-components";
1
2
  import { type ComponentChildren, createContext } from "preact";
2
3
  import { useContext, useState } from "preact/hooks";
3
- import { Text } from "../../commons/Typography";
4
4
  import * as styles from "./styles.scss";
5
5
 
6
6
  type TabsContextT = {
@@ -1,7 +1,7 @@
1
1
  import type { AttachmentTestStepResult } from "@allurereport/core-api";
2
2
  import type { FunctionalComponent } from "preact";
3
3
  import type { AllureAwesomeTestResult } from "types";
4
- import { TestResultAttachment } from "@/components/app/TestResult/TestResultSteps/testResultAttachment";
4
+ import { TestResultAttachment } from "@/components/TestResult/TestResultSteps/testResultAttachment";
5
5
  import { useI18n } from "@/stores";
6
6
  import * as styles from "./styles.scss";
7
7
 
@@ -1,8 +1,8 @@
1
- import { FunctionalComponent } from "preact";
1
+ import { Text } from "@allurereport/web-components";
2
+ import type { FunctionalComponent } from "preact";
2
3
  import { useState } from "preact/hooks";
3
- import { MetadataButton } from "@/components/app/MetadataButton";
4
- import { Text } from "@/components/commons/Typography";
5
- import { AllureAwesomeTestResult } from "../../../../../types";
4
+ import type { AllureAwesomeTestResult } from "types";
5
+ import { MetadataButton } from "@/components/MetadataButton";
6
6
  import * as styles from "./styles.scss";
7
7
 
8
8
  export type TestResultDescriptionProps = {
@@ -0,0 +1,23 @@
1
+ import { Counter, SvgIcon, Text, allureIcons } from "@allurereport/web-components";
2
+ import { type FunctionalComponent } from "preact";
3
+ import { ArrowButton } from "@/components/ArrowButton";
4
+ import * as styles from "./styles.scss";
5
+
6
+ export const TestResultDropdown: FunctionalComponent<{
7
+ isOpened: boolean;
8
+ setIsOpen: (isOpened: boolean) => void;
9
+ title: string;
10
+ icon: string;
11
+ counter: number;
12
+ }> = ({ isOpened, setIsOpen, title, icon, counter }) => {
13
+ return (
14
+ <div className={styles["test-result-dropdown"]} onClick={() => setIsOpen(!isOpened)}>
15
+ <ArrowButton isOpened={isOpened} icon={allureIcons.arrowsChevronDown} />
16
+ <div className={styles["test-result-dropdown-wrap"]}>
17
+ <SvgIcon id={icon} />
18
+ <Text bold>{title}</Text>
19
+ <Counter count={counter} size="s" />
20
+ </div>
21
+ </div>
22
+ );
23
+ };
@@ -1,8 +1,7 @@
1
- import LineDevCodeSquare from "@/assets/svg/line-dev-code-square.svg";
2
- import * as baseStyles from "@/components/app/BaseLayout/styles.scss";
3
- import { TestResultInfo } from "@/components/app/TestResult/TestResultInfo";
4
- import { SvgIcon } from "@/components/commons/SvgIcon";
5
- import { Text } from "@/components/commons/Typography";
1
+ import { SvgIcon, allureIcons } from "@allurereport/web-components";
2
+ import { Text } from "@allurereport/web-components";
3
+ import * as baseStyles from "@/components/BaseLayout/styles.scss";
4
+ import { TestResultInfo } from "@/components/TestResult/TestResultInfo";
6
5
  import * as styles from "./styles.scss";
7
6
 
8
7
  const TestResultThumb = () => {
@@ -13,7 +12,7 @@ const TestResultThumb = () => {
13
12
  size={"m"}
14
13
  width={"32px"}
15
14
  height={"32px"}
16
- id={LineDevCodeSquare.id}
15
+ id={allureIcons.lineDevCodeSquare}
17
16
  className={styles["test-result-thumb-icon"]}
18
17
  />
19
18
  <Text className={styles["test-result-thumb-text"]}>No test case results</Text>
@@ -0,0 +1,59 @@
1
+ import type { TestError } from "@allurereport/core-api";
2
+ import { Code, IconButton, Text, TooltipWrapper, allureIcons } from "@allurereport/web-components";
3
+ import { type FunctionalComponent } from "preact";
4
+ import { useState } from "preact/hooks";
5
+ import { useI18n } from "@/stores/locale";
6
+ import { copyToClipboard } from "@/utils/copyToClipboard";
7
+ import * as styles from "./styles.scss";
8
+
9
+ const TestResultErrorTrace = ({ trace }: { trace: string }) => {
10
+ return (
11
+ <div data-testid="test-result-error-trace" className={styles["test-result-error-trace"]}>
12
+ <Code size={"s"} type={"ui"}>
13
+ <pre>{trace}</pre>
14
+ </Code>
15
+ </div>
16
+ );
17
+ };
18
+
19
+ export const TestResultError: FunctionalComponent<TestError> = ({ message, trace }) => {
20
+ const [isOpen, setIsOpen] = useState(false);
21
+ const { t } = useI18n("ui");
22
+ const { t: tooltip } = useI18n("controls");
23
+ const { t: empty } = useI18n("empty");
24
+
25
+ return (
26
+ <div data-testid="test-result-error" className={styles["test-result-error"]}>
27
+ {message ? (
28
+ <>
29
+ <div data-testid="test-result-error-header" className={styles["test-result-error-header"]}>
30
+ <Text tag={"p"} size={"m"} bold className={styles["test-result-error-text"]}>
31
+ {t("error")}
32
+ </Text>
33
+ <TooltipWrapper tooltipText={tooltip("clipboard")} tooltipTextAfterClick={tooltip("clipboardSuccess")}>
34
+ <IconButton
35
+ style={"ghost"}
36
+ size={"s"}
37
+ icon={allureIcons.lineGeneralCopy3}
38
+ onClick={() => {
39
+ copyToClipboard(message);
40
+ }}
41
+ />
42
+ </TooltipWrapper>
43
+ </div>
44
+ <div className={styles["test-result-error-message"]} onClick={() => setIsOpen(!isOpen)}>
45
+ <Code data-testid="test-result-error-message" size={"s"}>
46
+ <pre>{message}</pre>
47
+ </Code>
48
+ </div>
49
+ </>
50
+ ) : (
51
+ // TODO add translations
52
+ empty("no-message-provided")
53
+ )}
54
+
55
+ {/* TODO no trace? message is still clickable */}
56
+ {isOpen && trace && <TestResultErrorTrace trace={trace} />}
57
+ </div>
58
+ );
59
+ };
@@ -1,13 +1,11 @@
1
+ import { IconButton, allureIcons } from "@allurereport/web-components";
2
+ import { SvgIcon } from "@allurereport/web-components";
3
+ import { Text } from "@allurereport/web-components";
1
4
  import clsx from "clsx";
2
5
  import type { FunctionalComponent } from "preact";
3
6
  import type { AllureAwesomeTestResult } from "types";
4
- import LineArrowsChevronDown from "@/assets/svg/line-arrows-chevron-down.svg";
5
- import LineGeneralHomeLine from "@/assets/svg/line-general-home-line.svg";
6
- import { LanguagePicker } from "@/components/app/LanguagePicker";
7
- import { ThemeButton } from "@/components/app/ThemeButton/ThemeButton";
8
- import { IconButton } from "@/components/commons/Button";
9
- import { SvgIcon } from "@/components/commons/SvgIcon";
10
- import { Text } from "@/components/commons/Typography";
7
+ import { LanguagePicker } from "@/components/LanguagePicker";
8
+ import { ThemeButton } from "@/components/ThemeButton/ThemeButton";
11
9
  import { navigateTo } from "@/index";
12
10
  import * as styles from "./styles.scss";
13
11
 
@@ -23,7 +21,7 @@ export const TestResultHeader: FunctionalComponent<TestResultHeaderProps> = ({ t
23
21
  <div className={styles["test-result-breadcrumbs"]}>
24
22
  <div className={clsx(styles["test-result-breadcrumb"], styles["test-result-home"])}>
25
23
  <IconButton
26
- icon={LineGeneralHomeLine.id}
24
+ icon={allureIcons.lineGeneralHomeLine}
27
25
  size={"s"}
28
26
  style={"ghost"}
29
27
  className={styles["test-result-breadcrumb-link"]}
@@ -34,7 +32,7 @@ export const TestResultHeader: FunctionalComponent<TestResultHeaderProps> = ({ t
34
32
  breadcrumbs?.[0]?.map((item, key) => {
35
33
  return (
36
34
  <div className={styles["test-result-breadcrumb"]} key={key}>
37
- <SvgIcon id={LineArrowsChevronDown.id} className={styles["test-result-breadcrumb-arrow"]} />
35
+ <SvgIcon id={allureIcons.lineArrowsChevronDown} className={styles["test-result-breadcrumb-arrow"]} />
38
36
  <Text size={"s"} bold className={styles["test-result-breadcrumb-title"]}>
39
37
  {item}
40
38
  </Text>
@@ -42,7 +40,9 @@ export const TestResultHeader: FunctionalComponent<TestResultHeaderProps> = ({ t
42
40
  );
43
41
  })}
44
42
  <div className={styles["test-result-breadcrumb"]}>
45
- {name && <SvgIcon id={LineArrowsChevronDown.id} className={styles["test-result-breadcrumb-arrow"]} />}
43
+ {name && (
44
+ <SvgIcon id={allureIcons.lineArrowsChevronDown} className={styles["test-result-breadcrumb-arrow"]} />
45
+ )}
46
46
  <Text size={"s"} bold className={styles["test-result-breadcrumb-title"]}>
47
47
  {name}
48
48
  </Text>
@@ -1,20 +1,19 @@
1
- import { formatDuration } from "@allurereport/core-api";
1
+ import { type HistoryTestResult, formatDuration } from "@allurereport/core-api";
2
+ import { IconButton, Text, TooltipWrapper, allureIcons } from "@allurereport/web-components";
3
+ import { type FunctionalComponent } from "preact";
2
4
  import { useState } from "preact/hooks";
3
- import arrowsChevronDown from "@/assets/svg/arrows-chevron-down.svg";
4
- import LineGeneralLinkExternal from "@/assets/svg/line-general-link-external.svg";
5
- import { ArrowButton } from "@/components/app/ArrowButton";
6
- import { TestResultError } from "@/components/app/TestResult/TestResultError";
7
- import * as styles from "@/components/app/TestResult/TestResultHistory/styles.scss";
8
- import TreeItemIcon from "@/components/app/Tree/TreeItemIcon";
9
- import { IconButton } from "@/components/commons/Button";
10
- import { TooltipWrapper } from "@/components/commons/Tooltip";
11
- import { Text } from "@/components/commons/Typography";
5
+ import { ArrowButton } from "@/components/ArrowButton";
6
+ import { TestResultError } from "@/components/TestResult/TestResultError";
7
+ import * as styles from "@/components/TestResult/TestResultHistory/styles.scss";
8
+ import TreeItemIcon from "@/components/Tree/TreeItemIcon";
12
9
  import { navigateTo, openInNewTab } from "@/index";
13
10
  import { useI18n } from "@/stores";
14
11
  import { timestampToDate } from "@/utils/time";
15
12
 
16
- export const TestResultHistoryItem = ({ testResultItem }) => {
17
- const { status, message, trace, stop, duration, id } = testResultItem;
13
+ export const TestResultHistoryItem: FunctionalComponent<{
14
+ testResultItem: HistoryTestResult;
15
+ }> = ({ testResultItem }: { testResultItem: HistoryTestResult }) => {
16
+ const { status, error, stop, duration, id } = testResultItem;
18
17
  const [isOpened, setIsOpen] = useState(false);
19
18
  const convertedStop = timestampToDate(stop);
20
19
  const formattedDuration = formatDuration(duration as number);
@@ -25,9 +24,9 @@ export const TestResultHistoryItem = ({ testResultItem }) => {
25
24
  return (
26
25
  <div>
27
26
  <div className={styles["test-result-history-item-header"]}>
28
- {Boolean(message) && (
27
+ {Boolean(error) && (
29
28
  <span onClick={() => setIsOpen(!isOpened)}>
30
- <ArrowButton isOpened={isOpened} icon={arrowsChevronDown.id} />
29
+ <ArrowButton isOpened={isOpened} icon={allureIcons.arrowsChevronDown} />
31
30
  </span>
32
31
  )}
33
32
  <div
@@ -45,7 +44,7 @@ export const TestResultHistoryItem = ({ testResultItem }) => {
45
44
  </Text>
46
45
  <TooltipWrapper tooltipText={t("openInNewTab")}>
47
46
  <IconButton
48
- icon={LineGeneralLinkExternal.id}
47
+ icon={allureIcons.lineGeneralLinkExternal}
49
48
  style={"ghost"}
50
49
  size={"s"}
51
50
  className={styles["test-result-history-item-link"]}
@@ -58,9 +57,9 @@ export const TestResultHistoryItem = ({ testResultItem }) => {
58
57
  </div>
59
58
  </div>
60
59
  </div>
61
- {isOpened && message && (
60
+ {isOpened && error && (
62
61
  <div>
63
- <TestResultError message={message} trace={trace} />
62
+ <TestResultError {...error} />
64
63
  </div>
65
64
  )}
66
65
  </div>
@@ -1,7 +1,7 @@
1
1
  import type { FunctionalComponent } from "preact";
2
- import type { AllureAwesomeTestResult } from "types";
3
- import { TestResultHistoryItem } from "@/components/app/TestResult/TestResultHistory/TestResultHistoryItem";
2
+ import { TestResultHistoryItem } from "@/components/TestResult/TestResultHistory/TestResultHistoryItem";
4
3
  import { useI18n } from "@/stores";
4
+ import { type AllureAwesomeTestResult } from "../../../../types";
5
5
  import * as styles from "./styles.scss";
6
6
 
7
7
  export type TestResultHistoryViewProps = {
@@ -1,19 +1,18 @@
1
- import lineAlertsAlertCircle from "@/assets/svg/line-alerts-alert-circle.svg";
2
- import lineGeneralEye from "@/assets/svg/line-general-eye.svg";
3
- import lineIconBomb2 from "@/assets/svg/line-icon-bomb-2.svg";
4
- import { SvgIcon } from "@/components/commons/SvgIcon";
1
+ import { SvgIcon, allureIcons } from "@allurereport/web-components";
2
+ import { type FunctionalComponent } from "preact";
5
3
  import { useI18n } from "@/stores";
6
4
  import { capitalize } from "@/utils/capitalize";
7
5
  import * as styles from "./styles.scss";
8
6
 
9
- const icons = {
10
- flaky: lineIconBomb2.id,
11
- known: lineAlertsAlertCircle.id,
12
- muted: lineGeneralEye.id,
7
+ const icons: Record<string, string> = {
8
+ flaky: allureIcons.lineIconBomb2,
9
+ known: allureIcons.lineAlertsAlertCircle,
10
+ muted: allureIcons.lineGeneralEye,
13
11
  };
14
12
 
15
- export const TestResultInfoStatuses = ({ statuses }) => {
13
+ export const TestResultInfoStatuses: FunctionalComponent<{ statuses: [string, boolean][] }> = ({ statuses }) => {
16
14
  const { t } = useI18n("filters");
15
+
17
16
  return (
18
17
  <div className={styles["test-result-info-statuses"]}>
19
18
  {statuses.map(([status], key: number) => {
@@ -1,15 +1,13 @@
1
1
  import { formatDuration } from "@allurereport/core-api";
2
+ import { Counter, Heading, Text, TooltipWrapper } from "@allurereport/web-components";
2
3
  import type { FunctionalComponent } from "preact";
3
4
  import type { AllureAwesomeTestResult } from "types";
4
- import { TestResultInfoStatuses } from "@/components/app/TestResult/TestResultInfo/TestResultInfoStatuses";
5
- import { TestResultNavigation } from "@/components/app/TestResult/TestResultNavigation";
6
- import { TestResultPrevStatuses } from "@/components/app/TestResult/TestResultPrevStatuses";
7
- import { TestResultSeverity } from "@/components/app/TestResult/TestResultSeverity";
8
- import { TestResultStatus } from "@/components/app/TestResult/TestResultStatus";
9
- import { TestResultTab, TestResultTabsList } from "@/components/app/TestResult/TestResultTabs";
10
- import { Counter } from "@/components/commons/Counter";
11
- import { TooltipWrapper } from "@/components/commons/Tooltip";
12
- import { Heading, Text } from "@/components/commons/Typography";
5
+ import { TestResultInfoStatuses } from "@/components/TestResult/TestResultInfo/TestResultInfoStatuses";
6
+ import { TestResultNavigation } from "@/components/TestResult/TestResultNavigation";
7
+ import { TestResultPrevStatuses } from "@/components/TestResult/TestResultPrevStatuses";
8
+ import { TestResultSeverity } from "@/components/TestResult/TestResultSeverity";
9
+ import { TestResultStatus } from "@/components/TestResult/TestResultStatus";
10
+ import { TestResultTab, TestResultTabsList } from "@/components/TestResult/TestResultTabs";
13
11
  import { useI18n } from "@/stores/locale";
14
12
  import { timestampToDate } from "@/utils/time";
15
13
  import * as styles from "./styles.scss";
@@ -20,7 +18,7 @@ export type TestResultInfoProps = {
20
18
 
21
19
  export const TestResultInfo: FunctionalComponent<TestResultInfoProps> = ({ testResult }) => {
22
20
  const { name, status, muted, flaky, known, duration, labels, history, retries, attachments, stop } = testResult ?? {};
23
- const formattedDuration = formatDuration(duration);
21
+ const formattedDuration = formatDuration(duration as number);
24
22
  const fullDate = stop && timestampToDate(stop);
25
23
  const severity = labels?.find((label) => label.name === "severity")?.value ?? "normal";
26
24
  const { t } = useI18n("ui");
@@ -1,13 +1,8 @@
1
- import { FunctionalComponent } from "preact";
1
+ import { SvgIcon, Text, allureIcons } from "@allurereport/web-components";
2
+ import type { FunctionalComponent } from "preact";
2
3
  import { useState } from "preact/hooks";
3
- import { AllureAwesomeTestResult } from "types";
4
- import githubIcon from "@/assets/svg/github.svg";
5
- import Bug from "@/assets/svg/line-dev-bug-2.svg";
6
- import TmsLink from "@/assets/svg/line-general-checklist3.svg";
7
- import Link from "@/assets/svg/line-general-link-1.svg";
8
- import { MetadataButton } from "@/components/app/MetadataButton";
9
- import { SvgIcon } from "@/components/commons/SvgIcon";
10
- import { Text } from "@/components/commons/Typography";
4
+ import type { AllureAwesomeTestResult } from "types";
5
+ import { MetadataButton } from "@/components/MetadataButton";
11
6
  import { useI18n } from "@/stores/locale";
12
7
  import * as styles from "./styles.scss";
13
8
 
@@ -17,20 +12,21 @@ interface TestResultLinkProps {
17
12
  type: string;
18
13
  }
19
14
 
15
+ const linksIconMap: Record<string, string> = {
16
+ issue: allureIcons.lineDevBug2,
17
+ link: allureIcons.lineGeneralLink1,
18
+ tms: allureIcons.lineGeneralChecklist3,
19
+ github: allureIcons.github,
20
+ };
21
+
20
22
  const TestResultLink: FunctionalComponent<{
21
23
  link: TestResultLinkProps;
22
24
  }> = ({ link }) => {
23
25
  const { url, type } = link;
24
- const iconMap = {
25
- issue: Bug.id,
26
- link: Link.id,
27
- tms: TmsLink.id,
28
- github: githubIcon.id,
29
- };
30
26
 
31
27
  return (
32
28
  <div className={styles["test-result-link"]}>
33
- <SvgIcon id={iconMap[type] ?? Link.id} />
29
+ <SvgIcon id={linksIconMap[type] ?? allureIcons.lineGeneralLink1} />
34
30
  <Text tag={"a"} href={url} target={"_blank"} size={"m"} className={styles["test-result-link-text"]}>
35
31
  {url}
36
32
  </Text>
@@ -1,8 +1,8 @@
1
- import { FunctionalComponent } from "preact";
1
+ import type { FunctionalComponent } from "preact";
2
2
  import { useState } from "preact/hooks";
3
- import { AllureAwesomeTestResult } from "types";
4
- import { TestResultMetadataList } from "@/components/app/Metadata";
5
- import { MetadataButton } from "@/components/app/MetadataButton";
3
+ import type { AllureAwesomeTestResult } from "types";
4
+ import { TestResultMetadataList } from "@/components/Metadata";
5
+ import { MetadataButton } from "@/components/MetadataButton";
6
6
  import { useI18n } from "@/stores/locale";
7
7
  import * as styles from "./styles.scss";
8
8
 
@@ -1,11 +1,9 @@
1
+ import { IconButton, allureIcons } from "@allurereport/web-components";
2
+ import { Loadable } from "@allurereport/web-components";
3
+ import { TooltipWrapper } from "@allurereport/web-components";
4
+ import { Code } from "@allurereport/web-components";
1
5
  import type { FunctionalComponent } from "preact";
2
6
  import type { AllureAwesomeTestResult } from "types";
3
- import LineArrowsChevronDown from "@/assets/svg/line-arrows-chevron-down.svg";
4
- import LineGeneralCopy3 from "@/assets/svg/line-general-copy-3.svg";
5
- import { IconButton } from "@/components/commons/Button";
6
- import { Loadable } from "@/components/commons/Loadable";
7
- import { TooltipWrapper } from "@/components/commons/Tooltip";
8
- import { Code } from "@/components/commons/Typography";
9
7
  import { navigateTo } from "@/index";
10
8
  import { useI18n } from "@/stores";
11
9
  import { testResultNavStore } from "@/stores/testResults";
@@ -28,7 +26,7 @@ export const TestResultNavigation: FunctionalComponent<TestResultNavigationProps
28
26
  data-testid="test-result-fullname-copy"
29
27
  style={"ghost"}
30
28
  size={"s"}
31
- icon={LineGeneralCopy3.id}
29
+ icon={allureIcons.lineGeneralCopy3}
32
30
  onClick={() => copyToClipboard(fullName)}
33
31
  />
34
32
  </TooltipWrapper>
@@ -51,7 +49,7 @@ export const TestResultNavigation: FunctionalComponent<TestResultNavigationProps
51
49
  <div className={styles["test-result-navigator"]}>
52
50
  <TooltipWrapper tooltipText={tooltip("prevTR")} isTriggerActive={currentIndex > 1}>
53
51
  <IconButton
54
- icon={LineArrowsChevronDown.id}
52
+ icon={allureIcons.lineArrowsChevronDown}
55
53
  style={"ghost"}
56
54
  isDisabled={currentIndex === data.length}
57
55
  data-testid="test-result-nav-prev"
@@ -68,7 +66,7 @@ export const TestResultNavigation: FunctionalComponent<TestResultNavigationProps
68
66
  </Code>
69
67
  <TooltipWrapper tooltipText={tooltip("nextTR")}>
70
68
  <IconButton
71
- icon={LineArrowsChevronDown.id}
69
+ icon={allureIcons.lineArrowsChevronDown}
72
70
  style={"ghost"}
73
71
  isDisabled={currentIndex <= 1}
74
72
  data-testid="test-result-nav-next"
@@ -1,27 +1,27 @@
1
1
  import type { FunctionalComponent } from "preact";
2
- import * as styles from "@/components/app/BaseLayout/styles.scss";
3
- import { TestResultDescription } from "@/components/app/TestResult/TestResultDescription";
4
- import { TestResultError } from "@/components/app/TestResult/TestResultError";
5
- import { TestResultLinks } from "@/components/app/TestResult/TestResultLinks";
6
- import { TestResultMetadata } from "@/components/app/TestResult/TestResultMetadata";
7
- import { TestResultParameters } from "@/components/app/TestResult/TestResultParameters";
8
- import { TestResultSetup } from "@/components/app/TestResult/TestResultSetup";
9
- import { TestResultSteps } from "@/components/app/TestResult/TestResultSteps";
10
- import { TestResultTeardown } from "@/components/app/TestResult/TestResultTeardown";
11
- import type { AllureAwesomeTestResult } from "../../../../types.js";
2
+ import type { AllureAwesomeTestResult } from "types";
3
+ import * as styles from "@/components/BaseLayout/styles.scss";
4
+ import { TestResultDescription } from "@/components/TestResult/TestResultDescription";
5
+ import { TestResultError } from "@/components/TestResult/TestResultError";
6
+ import { TestResultLinks } from "@/components/TestResult/TestResultLinks";
7
+ import { TestResultMetadata } from "@/components/TestResult/TestResultMetadata";
8
+ import { TestResultParameters } from "@/components/TestResult/TestResultParameters";
9
+ import { TestResultSetup } from "@/components/TestResult/TestResultSetup";
10
+ import { TestResultSteps } from "@/components/TestResult/TestResultSteps";
11
+ import { TestResultTeardown } from "@/components/TestResult/TestResultTeardown";
12
12
 
13
13
  export type TestResultOverviewProps = {
14
14
  testResult?: AllureAwesomeTestResult;
15
15
  };
16
16
 
17
17
  export const TestResultOverview: FunctionalComponent<TestResultOverviewProps> = ({ testResult }) => {
18
- const { message, trace, parameters, groupedLabels, links, description, setup, steps, teardown } = testResult || {};
18
+ const { error, parameters, groupedLabels, links, description, setup, steps, teardown } = testResult || {};
19
19
 
20
20
  return (
21
21
  <>
22
- {Boolean(message) && (
22
+ {Boolean(error?.message) && (
23
23
  <div className={styles["test-result-errors"]}>
24
- <TestResultError message={message} trace={trace} />
24
+ <TestResultError {...error} />
25
25
  </div>
26
26
  )}
27
27
  {Boolean(parameters?.length) && <TestResultParameters parameters={parameters} />}