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

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 (274) hide show
  1. package/.eslintrc.cjs +4 -1
  2. package/dist/multi/141.app-f32e4213.js +1 -0
  3. package/dist/multi/222.app-f32e4213.js +1 -0
  4. package/dist/multi/335.app-f32e4213.js +1 -0
  5. package/dist/multi/34.app-f32e4213.js +1 -0
  6. package/dist/multi/349.app-f32e4213.js +1 -0
  7. package/dist/multi/378.app-f32e4213.js +1 -0
  8. package/dist/multi/406.app-f32e4213.js +1 -0
  9. package/dist/multi/476.app-f32e4213.js +1 -0
  10. package/dist/multi/53.app-f32e4213.js +1 -0
  11. package/dist/multi/584.app-f32e4213.js +1 -0
  12. package/dist/multi/690.app-f32e4213.js +1 -0
  13. package/dist/multi/747.app-f32e4213.js +1 -0
  14. package/dist/multi/767.app-f32e4213.js +1 -0
  15. package/dist/multi/{816.app-4468f0e2.js → 816.app-f32e4213.js} +1 -1
  16. package/dist/multi/83.app-f32e4213.js +1 -0
  17. package/dist/multi/873.app-f32e4213.js +1 -0
  18. package/dist/multi/920.app-f32e4213.js +1 -0
  19. package/dist/multi/991.app-f32e4213.js +1 -0
  20. package/dist/multi/app-f32e4213.js +2 -0
  21. package/dist/multi/manifest.json +20 -20
  22. package/dist/multi/styles-f32e4213.css +284 -0
  23. package/dist/single/app-7fa8e43f.js +2 -0
  24. package/dist/single/manifest.json +1 -1
  25. package/package.json +7 -4
  26. package/src/assets/scss/fonts.scss +2 -20
  27. package/src/components/{app/ArrowButton → ArrowButton}/index.tsx +3 -4
  28. package/src/components/{app/BaseLayout → BaseLayout}/index.tsx +18 -16
  29. package/src/components/{app/Footer → Footer}/FooterLogo.tsx +2 -2
  30. package/src/components/Footer/FooterVersion.tsx +33 -0
  31. package/src/components/Footer/index.tsx +13 -0
  32. package/src/components/Header/index.tsx +14 -0
  33. package/src/components/{app/LanguagePicker → LanguagePicker}/index.tsx +2 -3
  34. package/src/components/MainReport/index.tsx +19 -0
  35. package/src/components/{app/Metadata → Metadata}/index.tsx +23 -16
  36. package/src/components/{app/Metadata → Metadata}/styles.scss +1 -1
  37. package/src/components/{app/MetadataButton → MetadataButton}/index.tsx +3 -4
  38. package/src/components/{app/Modal → Modal}/index.tsx +9 -19
  39. package/src/components/{app/ReportBody → ReportBody}/Filters.tsx +5 -11
  40. package/src/components/{app/ReportBody → ReportBody}/HeaderActions.tsx +1 -1
  41. package/src/components/{app/ReportBody → ReportBody}/SortBy.tsx +12 -14
  42. package/src/components/{app/ReportBody → ReportBody}/index.tsx +4 -3
  43. package/src/components/{app/ReportHeader → ReportHeader}/ReportHeaderLabelList.tsx +2 -2
  44. package/src/components/{app/ReportHeader → ReportHeader}/ReportHeaderLogo.tsx +2 -2
  45. package/src/components/{app/ReportHeader → ReportHeader}/ReportHeaderPie.tsx +2 -2
  46. package/src/components/{app/ReportHeader → ReportHeader}/index.tsx +5 -5
  47. package/src/components/{app/ReportLogo → ReportLogo}/index.tsx +3 -4
  48. package/src/components/{app/ReportLogoFull → ReportLogoFull}/index.tsx +3 -4
  49. package/src/components/{app/ReportMetadata → ReportMetadata}/MetadataItem.tsx +2 -2
  50. package/src/components/{app/ReportMetadata → ReportMetadata}/MetadataSummary.tsx +8 -10
  51. package/src/components/{app/ReportMetadata → ReportMetadata}/MetadataTestType.tsx +5 -5
  52. package/src/components/ReportMetadata/MetadataWithIcon.tsx +21 -0
  53. package/src/components/{app/ReportMetadata → ReportMetadata}/index.tsx +5 -5
  54. package/src/components/{app/ReportMetadata → ReportMetadata}/styles.scss +1 -1
  55. package/src/components/{app/Tabs → Tabs}/index.tsx +6 -1
  56. package/src/components/{app/TestResult → TestResult}/TestResultAttachmentsView/index.tsx +1 -1
  57. package/src/components/{app/TestResult → TestResult}/TestResultDescription/index.tsx +4 -4
  58. package/src/components/TestResult/TestResultDropdown/index.tsx +23 -0
  59. package/src/components/{app/TestResult → TestResult}/TestResultEmpty/index.tsx +7 -7
  60. package/src/components/TestResult/TestResultError/index.tsx +59 -0
  61. package/src/components/{app/TestResult → TestResult}/TestResultHeader/index.tsx +10 -10
  62. package/src/components/{app/TestResult → TestResult}/TestResultHistory/TestResultHistoryItem.tsx +16 -17
  63. package/src/components/{app/TestResult → TestResult}/TestResultHistory/index.tsx +2 -2
  64. package/src/components/{app/TestResult → TestResult}/TestResultInfo/TestResultInfoStatuses.tsx +8 -9
  65. package/src/components/{app/TestResult → TestResult}/TestResultInfo/index.tsx +8 -10
  66. package/src/components/{app/TestResult → TestResult}/TestResultLinks/index.tsx +12 -16
  67. package/src/components/{app/TestResult → TestResult}/TestResultMetadata/index.tsx +4 -4
  68. package/src/components/{app/TestResult → TestResult}/TestResultNavigation/index.tsx +7 -9
  69. package/src/components/TestResult/TestResultOverview.tsx +43 -0
  70. package/src/components/{app/TestResult → TestResult}/TestResultParameters/index.tsx +4 -4
  71. package/src/components/{app/TestResult → TestResult}/TestResultPrevStatuses/index.tsx +6 -9
  72. package/src/components/TestResult/TestResultRetriesView/TestResultRetriesItem.tsx +52 -0
  73. package/src/components/TestResult/TestResultRetriesView/index.tsx +24 -0
  74. package/src/components/{app/TestResult → TestResult}/TestResultSetup/index.tsx +20 -12
  75. package/src/components/TestResult/TestResultSeverity/index.tsx +27 -0
  76. package/src/components/{app/TestResult → TestResult}/TestResultStatus/index.tsx +2 -2
  77. package/src/components/{app/TestResult → TestResult}/TestResultSteps/attachment.tsx +10 -10
  78. package/src/components/{app/TestResult → TestResult}/TestResultSteps/attachmentCode.tsx +7 -2
  79. package/src/components/{app/TestResult → TestResult}/TestResultSteps/attachmentImage.tsx +6 -3
  80. package/src/components/TestResult/TestResultSteps/attachmentVideo.tsx +15 -0
  81. package/src/components/{app/TestResult → TestResult}/TestResultSteps/index.tsx +17 -8
  82. package/src/components/{app/TestResult → TestResult}/TestResultSteps/testResultAttachment.tsx +25 -27
  83. package/src/components/{app/TestResult → TestResult}/TestResultSteps/testResultAttachmentInfo.tsx +8 -12
  84. package/src/components/{app/TestResult → TestResult}/TestResultSteps/testResultStep.tsx +34 -20
  85. package/src/components/TestResult/TestResultSteps/testResultStepInfo.tsx +30 -0
  86. package/src/components/{app/TestResult → TestResult}/TestResultSteps/wrongAttachment.tsx +1 -1
  87. package/src/components/{app/TestResult → TestResult}/TestResultTabs/index.tsx +1 -1
  88. package/src/components/{app/TestResult → TestResult}/TestResultTeardown/index.tsx +19 -9
  89. package/src/components/TestResult/TestStepsEmpty/index.tsx +23 -0
  90. package/src/components/TestResult/TestStepsEmpty/styles.scss +25 -0
  91. package/src/components/{app/TestResult → TestResult}/index.tsx +10 -10
  92. package/src/components/{app/ThemeButton → ThemeButton}/ThemeButton.tsx +2 -4
  93. package/src/components/{app/Tree → Tree}/Tree.tsx +10 -10
  94. package/src/components/{app/Tree → Tree}/TreeHeader.tsx +3 -3
  95. package/src/components/{app/Tree → Tree}/TreeItem.tsx +2 -2
  96. package/src/components/Tree/TreeItemIcon.tsx +32 -0
  97. package/src/components/{app/Tree → Tree}/index.tsx +5 -13
  98. package/src/i18n/locales/am.json +3 -1
  99. package/src/i18n/locales/az.json +3 -1
  100. package/src/i18n/locales/de.json +3 -1
  101. package/src/i18n/locales/en.json +4 -1
  102. package/src/i18n/locales/es.json +3 -1
  103. package/src/i18n/locales/fr.json +3 -1
  104. package/src/i18n/locales/he.json +3 -1
  105. package/src/i18n/locales/it.json +3 -1
  106. package/src/i18n/locales/ja.json +3 -1
  107. package/src/i18n/locales/ka.json +3 -1
  108. package/src/i18n/locales/kr.json +3 -1
  109. package/src/i18n/locales/nl.json +3 -1
  110. package/src/i18n/locales/pl.json +3 -1
  111. package/src/i18n/locales/pt.json +3 -1
  112. package/src/i18n/locales/ru.json +3 -1
  113. package/src/i18n/locales/sv.json +3 -1
  114. package/src/i18n/locales/tr.json +3 -1
  115. package/src/i18n/locales/zh.json +3 -1
  116. package/src/index.html +1 -0
  117. package/src/index.tsx +2 -2
  118. package/src/stores/index.ts +1 -1
  119. package/src/stores/testResults.ts +6 -2
  120. package/src/stores/tree.ts +43 -12
  121. package/src/utils/isMac.ts +6 -5
  122. package/src/utils/loadFromLocalStorage.ts +8 -0
  123. package/src/utils/treeFilters.ts +107 -58
  124. package/test/utils/treeFilters.test.ts +25 -1
  125. package/tsconfig.json +5 -3
  126. package/types.d.ts +15 -2
  127. package/vitest.config.ts +7 -1
  128. package/webpack.config.js +4 -0
  129. package/dist/multi/141.app-4468f0e2.js +0 -1
  130. package/dist/multi/222.app-4468f0e2.js +0 -1
  131. package/dist/multi/335.app-4468f0e2.js +0 -1
  132. package/dist/multi/34.app-4468f0e2.js +0 -1
  133. package/dist/multi/349.app-4468f0e2.js +0 -1
  134. package/dist/multi/378.app-4468f0e2.js +0 -1
  135. package/dist/multi/406.app-4468f0e2.js +0 -1
  136. package/dist/multi/476.app-4468f0e2.js +0 -1
  137. package/dist/multi/53.app-4468f0e2.js +0 -1
  138. package/dist/multi/584.app-4468f0e2.js +0 -1
  139. package/dist/multi/690.app-4468f0e2.js +0 -1
  140. package/dist/multi/747.app-4468f0e2.js +0 -1
  141. package/dist/multi/767.app-4468f0e2.js +0 -1
  142. package/dist/multi/83.app-4468f0e2.js +0 -1
  143. package/dist/multi/873.app-4468f0e2.js +0 -1
  144. package/dist/multi/920.app-4468f0e2.js +0 -1
  145. package/dist/multi/991.app-4468f0e2.js +0 -1
  146. package/dist/multi/app-4468f0e2.js +0 -2
  147. package/dist/multi/styles-4468f0e2.css +0 -363
  148. package/dist/single/app-33b3c367.js +0 -2
  149. package/src/assets/fonts/JetBrainsMono_vf.woff +0 -0
  150. package/src/assets/fonts/JetBrainsMono_vf.woff2 +0 -0
  151. package/src/assets/fonts/pt-root-ui_vf.woff +0 -0
  152. package/src/assets/fonts/pt-root-ui_vf.woff2 +0 -0
  153. package/src/assets/scss/mixins.scss +0 -26
  154. package/src/assets/svg/arrows-chevron-down.svg +0 -5
  155. package/src/assets/svg/github.svg +0 -5
  156. package/src/assets/svg/line-alerts-notification-box.svg +0 -3
  157. package/src/assets/svg/line-arrows-chevron-down-double.svg +0 -3
  158. package/src/assets/svg/line-arrows-chevron-down.svg +0 -3
  159. package/src/assets/svg/line-arrows-chevron-right.svg +0 -3
  160. package/src/assets/svg/line-arrows-chevron-up-double.svg +0 -3
  161. package/src/assets/svg/line-arrows-chevron-up.svg +0 -3
  162. package/src/assets/svg/line-arrows-corner-down-right.svg +0 -3
  163. package/src/assets/svg/line-arrows-expand-3.svg +0 -3
  164. package/src/assets/svg/line-arrows-refresh-ccw-1.svg +0 -3
  165. package/src/assets/svg/line-arrows-sort-line-asc.svg +0 -3
  166. package/src/assets/svg/line-arrows-sort-line-desc.svg +0 -3
  167. package/src/assets/svg/line-arrows-switch-vertical-1.svg +0 -3
  168. package/src/assets/svg/line-dev-bug-2.svg +0 -3
  169. package/src/assets/svg/line-dev-code-square.svg +0 -3
  170. package/src/assets/svg/line-files-file-attachment-2.svg +0 -3
  171. package/src/assets/svg/line-general-check.svg +0 -3
  172. package/src/assets/svg/line-general-checklist3.svg +0 -3
  173. package/src/assets/svg/line-general-copy-3.svg +0 -3
  174. package/src/assets/svg/line-general-download-cloud.svg +0 -3
  175. package/src/assets/svg/line-general-equal.svg +0 -3
  176. package/src/assets/svg/line-general-home-line.svg +0 -3
  177. package/src/assets/svg/line-general-link-1.svg +0 -3
  178. package/src/assets/svg/line-general-link-external.svg +0 -3
  179. package/src/assets/svg/line-general-search-md.svg +0 -3
  180. package/src/assets/svg/line-general-settings-1.svg +0 -3
  181. package/src/assets/svg/line-general-x-close.svg +0 -3
  182. package/src/assets/svg/line-general-zap.svg +0 -3
  183. package/src/assets/svg/line-helpers-flag.svg +0 -4
  184. package/src/assets/svg/line-helpers-play-circle.svg +0 -4
  185. package/src/assets/svg/line-images-image.svg +0 -3
  186. package/src/assets/svg/line-security-key.svg +0 -3
  187. package/src/assets/svg/line-shapes-dot-circle.svg +0 -3
  188. package/src/assets/svg/line-shapes-moon.svg +0 -3
  189. package/src/assets/svg/line-shapes-sun.svg +0 -3
  190. package/src/assets/svg/line-time-clock-stopwatch.svg +0 -3
  191. package/src/assets/svg/report-logo.svg +0 -64
  192. package/src/assets/svg/solid-alert-circle.svg +0 -3
  193. package/src/assets/svg/solid-check-circle.svg +0 -3
  194. package/src/assets/svg/solid-help-circle.svg +0 -3
  195. package/src/assets/svg/solid-minus-circle.svg +0 -3
  196. package/src/assets/svg/solid-x-circle.svg +0 -3
  197. package/src/assets/svg/spinner.svg +0 -18
  198. package/src/assets/svg/view-off.svg +0 -12
  199. package/src/assets/svg/view.svg +0 -11
  200. package/src/components/app/Footer/FooterVersion.tsx +0 -27
  201. package/src/components/app/Footer/index.tsx +0 -13
  202. package/src/components/app/Header/index.tsx +0 -17
  203. package/src/components/app/MainReport/index.tsx +0 -19
  204. package/src/components/app/ReportMetadata/MetadataWithIcon.tsx +0 -25
  205. package/src/components/app/TestResult/TestResultDropdown/index.tsx +0 -19
  206. package/src/components/app/TestResult/TestResultError/index.tsx +0 -53
  207. package/src/components/app/TestResult/TestResultOverview.tsx +0 -40
  208. package/src/components/app/TestResult/TestResultRetriesView/TestResultRetriesItem.tsx +0 -50
  209. package/src/components/app/TestResult/TestResultRetriesView/index.tsx +0 -24
  210. package/src/components/app/TestResult/TestResultSeverity/index.tsx +0 -34
  211. package/src/components/app/TestResult/TestResultSteps/attachmentVideo.tsx +0 -12
  212. package/src/components/app/TestResult/TestResultSteps/testResultStepInfo.tsx +0 -33
  213. package/src/components/app/Tree/TreeItemIcon.tsx +0 -35
  214. package/src/components/commons/Button/index.tsx +0 -176
  215. package/src/components/commons/Button/styles.scss +0 -560
  216. package/src/components/commons/Counter/index.tsx +0 -29
  217. package/src/components/commons/Counter/styles.scss +0 -21
  218. package/src/components/commons/Label/index.tsx +0 -11
  219. package/src/components/commons/Label/styles.scss +0 -7
  220. package/src/components/commons/Link/index.tsx +0 -20
  221. package/src/components/commons/Link/styles.scss +0 -46
  222. package/src/components/commons/Loadable/index.tsx +0 -32
  223. package/src/components/commons/Menu/index.tsx +0 -198
  224. package/src/components/commons/Menu/styles.scss +0 -94
  225. package/src/components/commons/PageLoader/index.tsx +0 -10
  226. package/src/components/commons/PageLoader/styles.scss +0 -29
  227. package/src/components/commons/SearchBox/index.tsx +0 -64
  228. package/src/components/commons/SearchBox/styles.scss +0 -58
  229. package/src/components/commons/Spinner/index.tsx +0 -8
  230. package/src/components/commons/SuccessRatePieChart/index.tsx +0 -52
  231. package/src/components/commons/SuccessRatePieChart/styles.scss +0 -11
  232. package/src/components/commons/SvgIcon/index.tsx +0 -46
  233. package/src/components/commons/SvgIcon/styles.scss +0 -26
  234. package/src/components/commons/Toggle/index.tsx +0 -30
  235. package/src/components/commons/Toggle/styles.scss +0 -48
  236. package/src/components/commons/Tooltip/index.tsx +0 -123
  237. package/src/components/commons/Tooltip/styles.scss +0 -38
  238. package/src/components/commons/Typography/index.tsx +0 -99
  239. package/src/hooks/useDebouncedCallback.ts +0 -31
  240. /package/dist/multi/{app-4468f0e2.js.LICENSE.txt → app-f32e4213.js.LICENSE.txt} +0 -0
  241. /package/dist/single/{app-33b3c367.js.LICENSE.txt → app-7fa8e43f.js.LICENSE.txt} +0 -0
  242. /package/src/assets/scss/{code.css → code.scss} +0 -0
  243. /package/src/components/{app/ArrowButton → ArrowButton}/styles.scss +0 -0
  244. /package/src/components/{app/BaseLayout → BaseLayout}/styles.scss +0 -0
  245. /package/src/components/{app/Footer → Footer}/styles.scss +0 -0
  246. /package/src/components/{app/Header → Header}/styles.scss +0 -0
  247. /package/src/components/{app/MetadataButton → MetadataButton}/styles.scss +0 -0
  248. /package/src/components/{app/Modal → Modal}/styles.scss +0 -0
  249. /package/src/components/{app/ReportBody → ReportBody}/context.tsx +0 -0
  250. /package/src/components/{app/ReportBody → ReportBody}/styles.scss +0 -0
  251. /package/src/components/{app/ReportHeader → ReportHeader}/styles.scss +0 -0
  252. /package/src/components/{app/ReportLogo → ReportLogo}/styles.scss +0 -0
  253. /package/src/components/{app/ReportLogoFull → ReportLogoFull}/styles.scss +0 -0
  254. /package/src/components/{app/Tabs → Tabs}/styles.scss +0 -0
  255. /package/src/components/{app/TestResult → TestResult}/TestResultAttachmentsView/styles.scss +0 -0
  256. /package/src/components/{app/TestResult → TestResult}/TestResultDescription/styles.scss +0 -0
  257. /package/src/components/{app/TestResult → TestResult}/TestResultDropdown/styles.scss +0 -0
  258. /package/src/components/{app/TestResult → TestResult}/TestResultEmpty/styles.scss +0 -0
  259. /package/src/components/{app/TestResult → TestResult}/TestResultError/styles.scss +0 -0
  260. /package/src/components/{app/TestResult → TestResult}/TestResultHeader/styles.scss +0 -0
  261. /package/src/components/{app/TestResult → TestResult}/TestResultHistory/styles.scss +0 -0
  262. /package/src/components/{app/TestResult → TestResult}/TestResultInfo/styles.scss +0 -0
  263. /package/src/components/{app/TestResult → TestResult}/TestResultLinks/styles.scss +0 -0
  264. /package/src/components/{app/TestResult → TestResult}/TestResultMetadata/styles.scss +0 -0
  265. /package/src/components/{app/TestResult → TestResult}/TestResultNavigation/styles.scss +0 -0
  266. /package/src/components/{app/TestResult → TestResult}/TestResultParameters/styles.scss +0 -0
  267. /package/src/components/{app/TestResult → TestResult}/TestResultPrevStatuses/styles.scss +0 -0
  268. /package/src/components/{app/TestResult → TestResult}/TestResultRetriesView/styles.scss +0 -0
  269. /package/src/components/{app/TestResult → TestResult}/TestResultSeverity/styles.scss +0 -0
  270. /package/src/components/{app/TestResult → TestResult}/TestResultStatus/styles.scss +0 -0
  271. /package/src/components/{app/TestResult → TestResult}/TestResultSteps/HtmlAttachmentPreview.tsx +0 -0
  272. /package/src/components/{app/TestResult → TestResult}/TestResultSteps/styles.scss +0 -0
  273. /package/src/components/{app/TestResult → TestResult}/TestResultTabs/styles.scss +0 -0
  274. /package/src/components/{app/Tree → Tree}/styles.scss +0 -0
@@ -1,14 +1,14 @@
1
1
  import { getReportOptions } from "@allurereport/web-commons";
2
- import { ReportHeaderLogo } from "@/components/app/ReportHeader/ReportHeaderLogo";
3
- import { ReportHeaderPie } from "@/components/app/ReportHeader/ReportHeaderPie";
4
- import { Heading, Text } from "@/components/commons/Typography";
2
+ import { Heading, Text } from "@allurereport/web-components";
3
+ import type { AllureAwesomeReportOptions } from "types";
4
+ import { ReportHeaderLogo } from "@/components/ReportHeader/ReportHeaderLogo";
5
+ import { ReportHeaderPie } from "@/components/ReportHeader/ReportHeaderPie";
5
6
  import { currentLocaleIso } from "@/stores";
6
- import type { AllureAwesomeReportOptions } from "../../../../types.js";
7
7
  import * as styles from "./styles.scss";
8
8
 
9
9
  export const ReportHeader = () => {
10
10
  const { reportName, createdAt } = getReportOptions<AllureAwesomeReportOptions>() ?? {};
11
- const formattedCreatedAt = new Date(createdAt).toLocaleDateString(currentLocaleIso.value as string, {
11
+ const formattedCreatedAt = new Date(createdAt as number).toLocaleDateString(currentLocaleIso.value as string, {
12
12
  month: "long",
13
13
  day: "numeric",
14
14
  year: "numeric",
@@ -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,8 @@
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
+ import { setTreeStatus } from "@/stores/tree";
5
+ import type { AllureAwesomeStatus } from "../../../types";
4
6
  import * as styles from "./styles.scss";
5
7
 
6
8
  type TabsContextT = {
@@ -41,10 +43,13 @@ export const Tab = (props: { id: string; children: ComponentChildren }) => {
41
43
  const isCurrentTab = currentTab === id;
42
44
  const handleTabClick = () => {
43
45
  if (isCurrentTab) {
46
+ setCurrentTab("total");
47
+ setTreeStatus("total");
44
48
  return;
45
49
  }
46
50
 
47
51
  setCurrentTab(id);
52
+ setTreeStatus(id as AllureAwesomeStatus);
48
53
  };
49
54
 
50
55
  return (
@@ -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,11 +1,11 @@
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, Text, allureIcons } from "@allurereport/web-components";
2
+ import * as baseStyles from "@/components/BaseLayout/styles.scss";
3
+ import { TestResultInfo } from "@/components/TestResult/TestResultInfo";
4
+ import { useI18n } from "@/stores";
6
5
  import * as styles from "./styles.scss";
7
6
 
8
7
  const TestResultThumb = () => {
8
+ const { t } = useI18n("empty");
9
9
  return (
10
10
  <div className={styles["test-result-thumb"]}>
11
11
  <div className={styles["test-result-thumb-wrapper"]}>
@@ -13,10 +13,10 @@ const TestResultThumb = () => {
13
13
  size={"m"}
14
14
  width={"32px"}
15
15
  height={"32px"}
16
- id={LineDevCodeSquare.id}
16
+ id={allureIcons.lineDevCodeSquare}
17
17
  className={styles["test-result-thumb-icon"]}
18
18
  />
19
- <Text className={styles["test-result-thumb-text"]}>No test case results</Text>
19
+ <Text className={styles["test-result-thumb-text"]}>{t("no-test-case-results")}</Text>
20
20
  </div>
21
21
  </div>
22
22
  );
@@ -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"