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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (282) hide show
  1. package/dist/multi/173.app-9931797d1602fc52db5b.js +1 -0
  2. package/dist/multi/174.app-9931797d1602fc52db5b.js +1 -0
  3. package/dist/multi/252.app-9931797d1602fc52db5b.js +1 -0
  4. package/dist/multi/282.app-9931797d1602fc52db5b.js +1 -0
  5. package/dist/multi/29.app-9931797d1602fc52db5b.js +1 -0
  6. package/dist/multi/416.app-9931797d1602fc52db5b.js +1 -0
  7. package/dist/multi/527.app-9931797d1602fc52db5b.js +1 -0
  8. package/dist/multi/600.app-9931797d1602fc52db5b.js +1 -0
  9. package/dist/multi/605.app-9931797d1602fc52db5b.js +1 -0
  10. package/dist/multi/638.app-9931797d1602fc52db5b.js +1 -0
  11. package/dist/multi/672.app-9931797d1602fc52db5b.js +1 -0
  12. package/dist/multi/686.app-9931797d1602fc52db5b.js +1 -0
  13. package/dist/multi/725.app-9931797d1602fc52db5b.js +1 -0
  14. package/dist/multi/741.app-9931797d1602fc52db5b.js +1 -0
  15. package/dist/multi/755.app-9931797d1602fc52db5b.js +1 -0
  16. package/dist/multi/894.app-9931797d1602fc52db5b.js +1 -0
  17. package/dist/multi/91.app-9931797d1602fc52db5b.js +1 -0
  18. package/dist/multi/943.app-9931797d1602fc52db5b.js +1 -0
  19. package/dist/multi/980.app-9931797d1602fc52db5b.js +1 -0
  20. package/dist/multi/app-9931797d1602fc52db5b.js +2 -0
  21. package/dist/multi/app-9931797d1602fc52db5b.js.LICENSE.txt +10 -0
  22. package/dist/multi/manifest.json +25 -24
  23. package/dist/multi/styles-8fe37354d1c2270c691e.css +48 -0
  24. package/dist/single/app-6199dc1c2fd3bddc2526.js +2 -0
  25. package/dist/single/app-6199dc1c2fd3bddc2526.js.LICENSE.txt +10 -0
  26. package/dist/single/manifest.json +1 -1
  27. package/package.json +30 -17
  28. package/src/assets/scss/day.scss +2 -0
  29. package/src/assets/scss/index.scss +1 -3
  30. package/src/assets/scss/night.scss +2 -0
  31. package/src/assets/scss/palette.scss +391 -391
  32. package/src/assets/scss/theme.scss +292 -79
  33. package/src/components/BaseLayout/index.tsx +10 -31
  34. package/src/components/BaseLayout/styles.scss +14 -4
  35. package/src/components/Charts/index.tsx +245 -0
  36. package/src/components/Charts/styles.scss +27 -0
  37. package/src/components/EnvironmentPicker/index.tsx +60 -0
  38. package/src/components/EnvironmentPicker/styles.scss +9 -0
  39. package/src/components/Footer/FooterLogo.tsx +1 -2
  40. package/src/components/Footer/FooterVersion.tsx +7 -3
  41. package/src/components/Footer/index.tsx +6 -2
  42. package/src/components/Header/CiInfo/index.tsx +67 -0
  43. package/src/components/Header/CiInfo/styles.scss +7 -0
  44. package/src/components/Header/index.tsx +21 -8
  45. package/src/components/Header/styles.scss +9 -1
  46. package/src/components/HeaderControls/index.tsx +20 -0
  47. package/src/components/MainReport/index.tsx +84 -6
  48. package/src/components/MainReport/styles.scss +20 -0
  49. package/src/components/Metadata/index.tsx +6 -4
  50. package/src/components/MetadataButton/index.tsx +14 -6
  51. package/src/components/MetadataButton/styles.scss +3 -0
  52. package/src/components/Modal/index.tsx +15 -167
  53. package/src/components/NavTabs/index.tsx +70 -0
  54. package/src/components/{TestResult/TestResultTabs → NavTabs}/styles.scss +0 -3
  55. package/src/components/Report/index.tsx +7 -0
  56. package/src/components/ReportBody/Filters.tsx +45 -66
  57. package/src/components/ReportBody/index.tsx +29 -17
  58. package/src/components/ReportBody/styles.scss +9 -3
  59. package/src/components/ReportGlobalAttachments/index.tsx +34 -0
  60. package/src/components/ReportGlobalAttachments/styles.scss +11 -0
  61. package/src/components/ReportGlobalErrors/index.tsx +30 -0
  62. package/src/components/ReportGlobalErrors/styles.scss +12 -0
  63. package/src/components/ReportHeader/ReportHeaderLogo.tsx +6 -2
  64. package/src/components/ReportHeader/ReportHeaderPie.tsx +1 -2
  65. package/src/components/ReportHeader/index.tsx +38 -12
  66. package/src/components/ReportHeader/styles.scss +9 -1
  67. package/src/components/ReportMetadata/MetadataSummary.tsx +57 -65
  68. package/src/components/ReportMetadata/MetadataWithIcon.tsx +11 -13
  69. package/src/components/ReportMetadata/index.tsx +50 -3
  70. package/src/components/ReportMetadata/styles.scss +0 -2
  71. package/src/components/ReportQualityGateResults/index.tsx +42 -0
  72. package/src/components/ReportQualityGateResults/styles.scss +44 -0
  73. package/src/components/SectionPicker/index.tsx +55 -0
  74. package/src/components/SectionPicker/styles.scss +5 -0
  75. package/src/components/SectionSwitcher/index.tsx +16 -0
  76. package/src/components/SectionSwitcher/styles.scss +4 -0
  77. package/src/components/SectionTabs/index.tsx +0 -0
  78. package/src/components/SideBySide/index.tsx +52 -0
  79. package/src/components/SideBySide/styles.scss +64 -0
  80. package/src/components/SplitLayout/index.tsx +73 -0
  81. package/src/components/SplitLayout/styles.scss +84 -0
  82. package/src/components/Tabs/index.tsx +5 -0
  83. package/src/components/TestResult/TestStepsEmpty/index.tsx +23 -0
  84. package/src/components/TestResult/TestStepsEmpty/styles.scss +25 -0
  85. package/src/components/TestResult/TrAttachmentsView/index.tsx +29 -0
  86. package/src/components/TestResult/{TestResultDescription → TrDescription}/index.tsx +5 -5
  87. package/src/components/TestResult/{TestResultDropdown → TrDropdown}/index.tsx +7 -5
  88. package/src/components/TestResult/{TestResultEmpty → TrEmpty}/index.tsx +10 -9
  89. package/src/components/TestResult/TrEnvironmentItem/index.tsx +82 -0
  90. package/src/components/TestResult/TrEnvironmentItem/styles.scss +60 -0
  91. package/src/components/TestResult/TrEnvironmentsView/index.tsx +64 -0
  92. package/src/components/TestResult/TrEnvironmentsView/styles.scss +11 -0
  93. package/src/components/TestResult/TrError/TrDiff.tsx +121 -0
  94. package/src/components/TestResult/TrError/index.tsx +104 -0
  95. package/src/components/TestResult/TrError/styles.scss +223 -0
  96. package/src/components/TestResult/TrHeader/TrBreadcrumbs.tsx +44 -0
  97. package/src/components/TestResult/TrHeader/index.tsx +15 -0
  98. package/src/components/TestResult/{TestResultHeader → TrHeader}/styles.scss +7 -2
  99. package/src/components/TestResult/TrHistory/TrHistoryItem.tsx +94 -0
  100. package/src/components/TestResult/TrHistory/index.tsx +26 -0
  101. package/src/components/TestResult/{TestResultHistory → TrHistory}/styles.scss +2 -1
  102. package/src/components/TestResult/{TestResultInfo/TestResultInfoStatuses.tsx → TrInfo/TrInfoStatuses.tsx} +6 -4
  103. package/src/components/TestResult/TrInfo/index.tsx +99 -0
  104. package/src/components/TestResult/{TestResultInfo → TrInfo}/styles.scss +18 -0
  105. package/src/components/TestResult/{TestResultLinks → TrLinks}/index.tsx +8 -8
  106. package/src/components/TestResult/{TestResultMetadata → TrMetadata}/index.tsx +6 -6
  107. package/src/components/TestResult/{TestResultNavigation → TrNavigation}/index.tsx +7 -9
  108. package/src/components/TestResult/TrOverview.tsx +46 -0
  109. package/src/components/TestResult/{TestResultParameters → TrParameters}/index.tsx +4 -4
  110. package/src/components/TestResult/TrPrevStatuses/index.tsx +63 -0
  111. package/src/components/TestResult/TrPwTraces/PwTrace.tsx +34 -0
  112. package/src/components/TestResult/TrPwTraces/PwTraceButton.tsx +32 -0
  113. package/src/components/TestResult/TrPwTraces/index.tsx +32 -0
  114. package/src/components/TestResult/TrPwTraces/styles.scss +20 -0
  115. package/src/components/TestResult/TrRetriesView/TrRetriesItem.tsx +70 -0
  116. package/src/components/TestResult/TrRetriesView/index.tsx +29 -0
  117. package/src/components/TestResult/{TestResultSetup → TrSetup}/index.tsx +24 -15
  118. package/src/components/TestResult/{TestResultSeverity → TrSeverity}/index.tsx +2 -2
  119. package/src/components/TestResult/{TestResultStatus → TrStatus}/index.tsx +5 -5
  120. package/src/components/TestResult/TrSteps/TrAttachment.tsx +118 -0
  121. package/src/components/TestResult/{TestResultSteps/testResultAttachmentInfo.tsx → TrSteps/TrAttachmentInfo.tsx} +11 -11
  122. package/src/components/TestResult/TrSteps/TrStep.tsx +98 -0
  123. package/src/components/TestResult/TrSteps/TrStepInfo.tsx +90 -0
  124. package/src/components/TestResult/TrSteps/index.tsx +58 -0
  125. package/src/components/TestResult/{TestResultSteps → TrSteps}/styles.scss +49 -10
  126. package/src/components/TestResult/{TestResultSteps → TrSteps}/wrongAttachment.tsx +1 -1
  127. package/src/components/TestResult/TrTabs/index.tsx +42 -0
  128. package/src/components/TestResult/{TestResultTeardown → TrTeardown}/index.tsx +25 -15
  129. package/src/components/TestResult/index.tsx +54 -38
  130. package/src/components/TestResult/styles.scss +12 -0
  131. package/src/components/Timeline/index.tsx +100 -0
  132. package/src/components/Timeline/styles.scss +45 -0
  133. package/src/components/ToggleLayout/index.tsx +17 -0
  134. package/src/components/Tree/index.tsx +122 -16
  135. package/src/components/Tree/styles.scss +23 -5
  136. package/src/index.html +23 -6
  137. package/src/index.tsx +91 -20
  138. package/src/locales/az.json +376 -0
  139. package/src/locales/de.json +376 -0
  140. package/src/locales/en.json +376 -0
  141. package/src/locales/es.json +376 -0
  142. package/src/locales/fr.json +376 -0
  143. package/src/locales/he.json +376 -0
  144. package/src/locales/hy.json +376 -0
  145. package/src/locales/it.json +376 -0
  146. package/src/locales/ja.json +376 -0
  147. package/src/locales/ka.json +376 -0
  148. package/src/locales/kr.json +376 -0
  149. package/src/locales/nl.json +376 -0
  150. package/src/locales/pl.json +384 -0
  151. package/src/locales/pt.json +376 -0
  152. package/src/locales/ru.json +384 -0
  153. package/src/locales/sv.json +376 -0
  154. package/src/locales/tr.json +376 -0
  155. package/src/locales/ua.json +327 -0
  156. package/src/locales/zh.json +376 -0
  157. package/src/stores/chart.ts +41 -6
  158. package/src/stores/env.ts +88 -0
  159. package/src/stores/envInfo.ts +2 -2
  160. package/src/stores/globals.ts +28 -0
  161. package/src/stores/layout.ts +36 -0
  162. package/src/stores/locale.ts +77 -29
  163. package/src/stores/modal.ts +22 -0
  164. package/src/stores/qualityGate.ts +28 -0
  165. package/src/stores/router.ts +108 -0
  166. package/src/stores/sections.ts +63 -0
  167. package/src/stores/stats.ts +52 -7
  168. package/src/stores/testResults.ts +13 -9
  169. package/src/stores/theme.ts +15 -18
  170. package/src/stores/timeline.ts +39 -0
  171. package/src/stores/tree.ts +101 -31
  172. package/src/stores/variables.ts +40 -0
  173. package/src/styles.scss +66 -0
  174. package/src/utils/loadFromLocalStorage.ts +8 -0
  175. package/src/utils/time.ts +1 -0
  176. package/src/utils/tree.ts +23 -0
  177. package/src/utils/treeFilters.ts +27 -21
  178. package/test/components/Header/CiInfo.test.tsx +177 -0
  179. package/test/components/Header.test.tsx +122 -0
  180. package/test/utils/treeFilters.test.ts +44 -44
  181. package/tsconfig.json +7 -2
  182. package/tsconfig.node.json +8 -0
  183. package/types.d.ts +53 -21
  184. package/vitest.config.ts +15 -2
  185. package/vitest.setup.ts +1 -0
  186. package/webpack.config.js +37 -5
  187. package/dist/multi/141.app-4375537b.js +0 -1
  188. package/dist/multi/222.app-4375537b.js +0 -1
  189. package/dist/multi/335.app-4375537b.js +0 -1
  190. package/dist/multi/34.app-4375537b.js +0 -1
  191. package/dist/multi/349.app-4375537b.js +0 -1
  192. package/dist/multi/378.app-4375537b.js +0 -1
  193. package/dist/multi/406.app-4375537b.js +0 -1
  194. package/dist/multi/476.app-4375537b.js +0 -1
  195. package/dist/multi/53.app-4375537b.js +0 -1
  196. package/dist/multi/584.app-4375537b.js +0 -1
  197. package/dist/multi/690.app-4375537b.js +0 -1
  198. package/dist/multi/747.app-4375537b.js +0 -1
  199. package/dist/multi/767.app-4375537b.js +0 -1
  200. package/dist/multi/816.app-4375537b.js +0 -1
  201. package/dist/multi/83.app-4375537b.js +0 -1
  202. package/dist/multi/873.app-4375537b.js +0 -1
  203. package/dist/multi/920.app-4375537b.js +0 -1
  204. package/dist/multi/991.app-4375537b.js +0 -1
  205. package/dist/multi/app-4375537b.js +0 -2
  206. package/dist/multi/app-4375537b.js.LICENSE.txt +0 -16
  207. package/dist/multi/styles-4375537b.css +0 -283
  208. package/dist/single/app-f16f6693.js +0 -2
  209. package/dist/single/app-f16f6693.js.LICENSE.txt +0 -16
  210. package/src/assets/scss/code.scss +0 -71
  211. package/src/assets/scss/typography.scss +0 -218
  212. package/src/components/ArrowButton/index.tsx +0 -36
  213. package/src/components/ArrowButton/styles.scss +0 -35
  214. package/src/components/LanguagePicker/index.tsx +0 -40
  215. package/src/components/Modal/styles.scss +0 -126
  216. package/src/components/ReportLogo/index.tsx +0 -16
  217. package/src/components/ReportLogo/styles.scss +0 -20
  218. package/src/components/ReportLogoFull/index.tsx +0 -20
  219. package/src/components/ReportLogoFull/styles.scss +0 -7
  220. package/src/components/TestResult/TestResultAttachmentsView/index.tsx +0 -27
  221. package/src/components/TestResult/TestResultError/index.tsx +0 -59
  222. package/src/components/TestResult/TestResultError/styles.scss +0 -51
  223. package/src/components/TestResult/TestResultHeader/index.tsx +0 -55
  224. package/src/components/TestResult/TestResultHistory/TestResultHistoryItem.tsx +0 -67
  225. package/src/components/TestResult/TestResultHistory/index.tsx +0 -26
  226. package/src/components/TestResult/TestResultInfo/index.tsx +0 -79
  227. package/src/components/TestResult/TestResultOverview.tsx +0 -40
  228. package/src/components/TestResult/TestResultPrevStatuses/index.tsx +0 -49
  229. package/src/components/TestResult/TestResultRetriesView/TestResultRetriesItem.tsx +0 -52
  230. package/src/components/TestResult/TestResultRetriesView/index.tsx +0 -24
  231. package/src/components/TestResult/TestResultSteps/HtmlAttachmentPreview.tsx +0 -12
  232. package/src/components/TestResult/TestResultSteps/attachment.tsx +0 -68
  233. package/src/components/TestResult/TestResultSteps/attachmentCode.tsx +0 -20
  234. package/src/components/TestResult/TestResultSteps/attachmentImage.tsx +0 -32
  235. package/src/components/TestResult/TestResultSteps/attachmentVideo.tsx +0 -15
  236. package/src/components/TestResult/TestResultSteps/index.tsx +0 -49
  237. package/src/components/TestResult/TestResultSteps/testResultAttachment.tsx +0 -77
  238. package/src/components/TestResult/TestResultSteps/testResultStep.tsx +0 -78
  239. package/src/components/TestResult/TestResultSteps/testResultStepInfo.tsx +0 -30
  240. package/src/components/TestResult/TestResultTabs/index.tsx +0 -59
  241. package/src/components/ThemeButton/ThemeButton.tsx +0 -20
  242. package/src/components/Tree/Tree.tsx +0 -68
  243. package/src/components/Tree/TreeHeader.tsx +0 -82
  244. package/src/components/Tree/TreeItem.tsx +0 -35
  245. package/src/components/Tree/TreeItemIcon.tsx +0 -32
  246. package/src/i18n/constants.ts +0 -124
  247. package/src/i18n/locales/am.json +0 -118
  248. package/src/i18n/locales/az.json +0 -118
  249. package/src/i18n/locales/de.json +0 -118
  250. package/src/i18n/locales/en.json +0 -119
  251. package/src/i18n/locales/es.json +0 -118
  252. package/src/i18n/locales/fr.json +0 -118
  253. package/src/i18n/locales/he.json +0 -118
  254. package/src/i18n/locales/it.json +0 -118
  255. package/src/i18n/locales/ja.json +0 -118
  256. package/src/i18n/locales/ka.json +0 -118
  257. package/src/i18n/locales/kr.json +0 -118
  258. package/src/i18n/locales/nl.json +0 -118
  259. package/src/i18n/locales/pl.json +0 -116
  260. package/src/i18n/locales/pt.json +0 -118
  261. package/src/i18n/locales/ru.json +0 -116
  262. package/src/i18n/locales/sv.json +0 -118
  263. package/src/i18n/locales/tr.json +0 -118
  264. package/src/i18n/locales/zh.json +0 -118
  265. package/src/utils/attachments.ts +0 -156
  266. package/src/utils/capitalize.ts +0 -6
  267. /package/dist/multi/{JetBrainsMono_vf-b9a9c326..woff → JetBrainsMono_vf.woff} +0 -0
  268. /package/dist/multi/{JetBrainsMono_vf-9e9649b6..woff2 → JetBrainsMono_vf.woff2} +0 -0
  269. /package/dist/multi/{pt-root-ui_vf-22fe60ca..woff → pt-root-ui_vf.woff} +0 -0
  270. /package/dist/multi/{pt-root-ui_vf-9d251e8b..woff2 → pt-root-ui_vf.woff2} +0 -0
  271. /package/src/components/TestResult/{TestResultAttachmentsView → TrAttachmentsView}/styles.scss +0 -0
  272. /package/src/components/TestResult/{TestResultDescription → TrDescription}/styles.scss +0 -0
  273. /package/src/components/TestResult/{TestResultDropdown → TrDropdown}/styles.scss +0 -0
  274. /package/src/components/TestResult/{TestResultEmpty → TrEmpty}/styles.scss +0 -0
  275. /package/src/components/TestResult/{TestResultLinks → TrLinks}/styles.scss +0 -0
  276. /package/src/components/TestResult/{TestResultMetadata → TrMetadata}/styles.scss +0 -0
  277. /package/src/components/TestResult/{TestResultNavigation → TrNavigation}/styles.scss +0 -0
  278. /package/src/components/TestResult/{TestResultParameters → TrParameters}/styles.scss +0 -0
  279. /package/src/components/TestResult/{TestResultPrevStatuses → TrPrevStatuses}/styles.scss +0 -0
  280. /package/src/components/TestResult/{TestResultRetriesView → TrRetriesView}/styles.scss +0 -0
  281. /package/src/components/TestResult/{TestResultSeverity → TrSeverity}/styles.scss +0 -0
  282. /package/src/components/TestResult/{TestResultStatus → TrStatus}/styles.scss +0 -0
@@ -0,0 +1,64 @@
1
+ .side {
2
+ width: 100%;
3
+ margin: 0;
4
+ overflow: hidden;
5
+ display: flex;
6
+ max-width: 1920px;
7
+ justify-content: space-between;
8
+ height: 100%;
9
+ padding: 0 8px;
10
+ }
11
+
12
+ .wrapper {
13
+ width: 100%;
14
+ flex-direction: column;
15
+ margin: auto;
16
+ }
17
+
18
+ .side-left {
19
+ margin-right: auto;
20
+ transition: width 50ms;
21
+ will-change: width;
22
+ }
23
+
24
+ .side-right {
25
+ flex: 1 1 auto;
26
+ margin-left: auto;
27
+ transition: width 200ms;
28
+ will-change: width, height;
29
+ }
30
+
31
+ [dir="ltr"] {
32
+ .side {
33
+ direction: ltr;
34
+ flex-direction: row;
35
+ }
36
+ }
37
+
38
+ [dir="rtl"] {
39
+ .side {
40
+ direction: ltr;
41
+ flex-direction: row-reverse;
42
+ }
43
+
44
+ .side-left {
45
+ direction: rtl;
46
+ }
47
+
48
+ .side-right {
49
+ direction: rtl;
50
+ }
51
+ }
52
+
53
+ .tree-ctrl {
54
+ overflow: hidden;
55
+ }
56
+
57
+ .gutter {
58
+ background: var(--bg-base-secondary) no-repeat 50%;
59
+ height: 100%;
60
+ }
61
+
62
+ .gutter:hover {
63
+ cursor: ew-resize;
64
+ }
@@ -0,0 +1,73 @@
1
+ import { Loadable, PageLoader, Text } from "@allurereport/web-components";
2
+ import type { JSX } from "preact";
3
+ import { useEffect, useRef, useState } from "preact/hooks";
4
+ import { Footer } from "@/components/Footer";
5
+ import { Header } from "@/components/Header";
6
+ import MainReport from "@/components/MainReport";
7
+ import SideBySide from "@/components/SideBySide";
8
+ import TestResult from "@/components/TestResult";
9
+ import { useI18n } from "@/stores";
10
+ import { route } from "@/stores/router";
11
+ import { testResultStore } from "@/stores/testResults";
12
+ import { treeStore } from "@/stores/tree";
13
+ import * as styles from "./styles.scss";
14
+
15
+ const MainReportWrapper = () => {
16
+ const containerRef = useRef<HTMLDivElement>(null);
17
+
18
+ return (
19
+ <div className={styles.wrapper} ref={containerRef}>
20
+ <MainReport />
21
+ </div>
22
+ );
23
+ };
24
+
25
+ const Loader = () => {
26
+ return (
27
+ <div className={styles.content}>
28
+ <PageLoader />
29
+ </div>
30
+ );
31
+ };
32
+
33
+ export const SplitLayout = () => {
34
+ const testResultId = route.value.params?.testResultId ?? null;
35
+ const [cachedMain, setCachedMain] = useState<JSX.Element | null>(null);
36
+ const { t } = useI18n("controls");
37
+ const leftSide = (
38
+ <Loadable source={treeStore} renderLoader={() => <PageLoader />} renderData={() => <MainReportWrapper />} />
39
+ );
40
+
41
+ const TrView = () => {
42
+ return testResultId ? (
43
+ <Loadable
44
+ source={testResultStore}
45
+ renderLoader={() => <Loader />}
46
+ transformData={(allResults) => {
47
+ if (testResultId in allResults) {
48
+ return allResults[testResultId];
49
+ }
50
+ }}
51
+ renderData={(tr) => {
52
+ return tr ? <TestResult testResult={tr} /> : <Loader />;
53
+ }}
54
+ />
55
+ ) : (
56
+ <div className={styles.empty}>
57
+ <Text>{t("noSelectedTR")}</Text>
58
+ </div>
59
+ );
60
+ };
61
+
62
+ useEffect(() => {
63
+ if (!cachedMain) {
64
+ setCachedMain(leftSide);
65
+ }
66
+ }, [cachedMain]);
67
+
68
+ return (
69
+ <div className={styles["side-by-side"]} data-testId={"split-layout"}>
70
+ <SideBySide left={cachedMain} right={<TrView />} />
71
+ </div>
72
+ );
73
+ };
@@ -0,0 +1,84 @@
1
+ .layout {
2
+ margin: auto;
3
+ padding: 12px 32px;
4
+ background: var(--bg-base-secondary);
5
+ color: var(--on-text-primary);
6
+ font-size: 14px;
7
+ }
8
+
9
+ .wrapper {
10
+ width: 100%;
11
+ flex-direction: column;
12
+ margin: auto;
13
+ position: relative;
14
+ height: 100%;
15
+ }
16
+
17
+ .content {
18
+ box-shadow: var(--shadow-small);
19
+ background: var(--bg-base-primary);
20
+ border-radius: 12px;
21
+ width: 100%;
22
+ overflow: hidden;
23
+ overflow-y: scroll;
24
+ position: relative;
25
+ }
26
+
27
+ .test-results {
28
+ min-height: 320px;
29
+ padding-bottom: 32px;
30
+ padding-top: 12px;
31
+ }
32
+
33
+ .logo {
34
+ display: inline-block;
35
+ margin-bottom: 12px;
36
+ }
37
+
38
+ .title {
39
+ font-size: 14px;
40
+ line-height: 1.25;
41
+ color: var(--on-text-primary);
42
+ margin-bottom: 8px;
43
+ }
44
+
45
+ .above {
46
+ display: flex;
47
+ justify-content: space-between;
48
+ width: 100%;
49
+ padding-bottom: 12px;
50
+ align-items: center;
51
+ }
52
+
53
+ .below {
54
+ display: flex;
55
+ justify-content: space-between;
56
+ align-items: center;
57
+ margin: auto;
58
+ width: 100%;
59
+ padding: 8px 8px;
60
+ }
61
+
62
+ .test-result-errors {
63
+ padding: 0 24px;
64
+ margin-top: 12px;
65
+ }
66
+
67
+ .side-by-side {
68
+ display: flex;
69
+ flex-direction: column;
70
+ justify-content: space-between;
71
+ height: 100%;
72
+ }
73
+
74
+ .empty {
75
+ display: flex;
76
+ align-items: center;
77
+ justify-content: center;
78
+ height: 100%;
79
+ }
80
+
81
+ .header {
82
+ padding: 8px;
83
+ margin-bottom: 0;
84
+ }
@@ -1,6 +1,8 @@
1
1
  import { Text } from "@allurereport/web-components";
2
2
  import { type ComponentChildren, createContext } from "preact";
3
3
  import { useContext, useState } from "preact/hooks";
4
+ import { setTreeStatus } from "@/stores/tree";
5
+ import type { AwesomeStatus } 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 AwesomeStatus);
48
53
  };
49
54
 
50
55
  return (
@@ -0,0 +1,23 @@
1
+ import { SvgIcon, Text, allureIcons } from "@allurereport/web-components";
2
+ import { useI18n } from "@/stores";
3
+ import * as styles from "./styles.scss";
4
+
5
+ const TrStepsEmpty = () => {
6
+ const { t } = useI18n("empty");
7
+ return (
8
+ <div className={styles["test-steps-empty"]}>
9
+ <div className={styles["test-steps-empty-wrapper"]}>
10
+ <SvgIcon
11
+ size={"m"}
12
+ width={"32px"}
13
+ height={"32px"}
14
+ id={allureIcons.lineDevCodeSquare}
15
+ className={styles["test-steps-empty-icon"]}
16
+ />
17
+ <Text className={styles["test-steps-empty-text"]}>{t("no-test-steps-results")}</Text>
18
+ </div>
19
+ </div>
20
+ );
21
+ };
22
+
23
+ export default TrStepsEmpty;
@@ -0,0 +1,25 @@
1
+ .test-steps-empty {
2
+ display: flex;
3
+ justify-content: center;
4
+ flex-wrap: wrap;
5
+ min-height: 320px;
6
+ align-items: center;
7
+ }
8
+
9
+ .test-steps-empty-wrapper {
10
+ display: flex;
11
+ flex-direction: column;
12
+ align-items: center;
13
+ }
14
+
15
+ .test-steps-empty-icon {
16
+ width: 32px;
17
+ height: 32px;
18
+ margin-bottom: 16px;
19
+ flex: 1 1 auto;
20
+ }
21
+
22
+ .test-steps-empty-text {
23
+ color: var(--on-text-secondary);
24
+ flex: 1 1 auto;
25
+ }
@@ -0,0 +1,29 @@
1
+ import type { AttachmentTestStepResult } from "@allurereport/core-api";
2
+ import cx from "clsx";
3
+ import type { FunctionalComponent } from "preact";
4
+ import type { AwesomeTestResult } from "types";
5
+ import { TrAttachment } from "@/components/TestResult/TrSteps/TrAttachment";
6
+ import { useI18n } from "@/stores";
7
+ import * as styles from "./styles.scss";
8
+
9
+ export type TrAttachmentViewProps = {
10
+ className?: string;
11
+ testResult?: AwesomeTestResult;
12
+ };
13
+
14
+ export const TrAttachmentView: FunctionalComponent<TrAttachmentViewProps> = ({ testResult, className }) => {
15
+ const { attachments } = testResult ?? {};
16
+ const { t } = useI18n("ui");
17
+
18
+ return (
19
+ <div className={cx(styles["test-result-attachments-view"], className)}>
20
+ {attachments.length ? (
21
+ attachments?.map((attach, key) => (
22
+ <TrAttachment item={attach as AttachmentTestStepResult} key={key} stepIndex={key + 1} />
23
+ ))
24
+ ) : (
25
+ <div className={styles["test-result-empty"]}>{t("no-attachments-results")}</div>
26
+ )}
27
+ </div>
28
+ );
29
+ };
@@ -1,15 +1,15 @@
1
1
  import { Text } from "@allurereport/web-components";
2
2
  import type { FunctionalComponent } from "preact";
3
3
  import { useState } from "preact/hooks";
4
- import type { AllureAwesomeTestResult } from "types";
4
+ import type { AwesomeTestResult } from "types";
5
5
  import { MetadataButton } from "@/components/MetadataButton";
6
6
  import * as styles from "./styles.scss";
7
7
 
8
- export type TestResultDescriptionProps = {
9
- description: AllureAwesomeTestResult["description"];
8
+ export type TrDescriptionProps = {
9
+ description: AwesomeTestResult["description"];
10
10
  };
11
11
 
12
- export const TestResultDescription: FunctionalComponent<TestResultDescriptionProps> = ({ description }) => {
12
+ export const TrDescription: FunctionalComponent<TrDescriptionProps> = ({ description }) => {
13
13
  const [isOpen, setIsOpen] = useState<boolean>(true);
14
14
 
15
15
  return (
@@ -18,7 +18,7 @@ export const TestResultDescription: FunctionalComponent<TestResultDescriptionPro
18
18
  <MetadataButton title={"Description"} setIsOpen={setIsOpen} isOpened={isOpen} />
19
19
  {isOpen && (
20
20
  <Text tag={"p"} className={styles["test-result-description-text"]}>
21
- {description || "Description mock"}
21
+ {description}
22
22
  </Text>
23
23
  )}
24
24
  </div>
@@ -1,17 +1,19 @@
1
- import { Counter, SvgIcon, Text, allureIcons } from "@allurereport/web-components";
1
+ import { ArrowButton, Counter, SvgIcon, Text, allureIcons } from "@allurereport/web-components";
2
+ import type { ClassValue } from "clsx";
3
+ import clsx from "clsx";
2
4
  import { type FunctionalComponent } from "preact";
3
- import { ArrowButton } from "@/components/ArrowButton";
4
5
  import * as styles from "./styles.scss";
5
6
 
6
- export const TestResultDropdown: FunctionalComponent<{
7
+ export const TrDropdown: FunctionalComponent<{
7
8
  isOpened: boolean;
8
9
  setIsOpen: (isOpened: boolean) => void;
9
10
  title: string;
10
11
  icon: string;
11
12
  counter: number;
12
- }> = ({ isOpened, setIsOpen, title, icon, counter }) => {
13
+ className?: ClassValue;
14
+ }> = ({ isOpened, setIsOpen, title, icon, counter, className }) => {
13
15
  return (
14
- <div className={styles["test-result-dropdown"]} onClick={() => setIsOpen(!isOpened)}>
16
+ <div className={clsx(styles["test-result-dropdown"], className)} onClick={() => setIsOpen(!isOpened)}>
15
17
  <ArrowButton isOpened={isOpened} icon={allureIcons.arrowsChevronDown} />
16
18
  <div className={styles["test-result-dropdown-wrap"]}>
17
19
  <SvgIcon id={icon} />
@@ -1,10 +1,11 @@
1
- import { SvgIcon, allureIcons } from "@allurereport/web-components";
2
- import { Text } from "@allurereport/web-components";
1
+ import { SvgIcon, Text, allureIcons } from "@allurereport/web-components";
3
2
  import * as baseStyles from "@/components/BaseLayout/styles.scss";
4
- import { TestResultInfo } from "@/components/TestResult/TestResultInfo";
3
+ import { TrInfo } from "@/components/TestResult/TrInfo";
4
+ import { useI18n } from "@/stores";
5
5
  import * as styles from "./styles.scss";
6
6
 
7
- const TestResultThumb = () => {
7
+ const TrThumb = () => {
8
+ const { t } = useI18n("empty");
8
9
  return (
9
10
  <div className={styles["test-result-thumb"]}>
10
11
  <div className={styles["test-result-thumb-wrapper"]}>
@@ -15,19 +16,19 @@ const TestResultThumb = () => {
15
16
  id={allureIcons.lineDevCodeSquare}
16
17
  className={styles["test-result-thumb-icon"]}
17
18
  />
18
- <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>
19
20
  </div>
20
21
  </div>
21
22
  );
22
23
  };
23
24
 
24
- const TestResultEmpty = () => {
25
+ const TrEmpty = () => {
25
26
  return (
26
27
  <div className={baseStyles.content}>
27
- <TestResultInfo />
28
- <TestResultThumb />
28
+ <TrInfo />
29
+ <TrThumb />
29
30
  </div>
30
31
  );
31
32
  };
32
33
 
33
- export default TestResultEmpty;
34
+ export default TrEmpty;
@@ -0,0 +1,82 @@
1
+ import { formatDuration } from "@allurereport/core-api";
2
+ import { ArrowButton, IconButton, Text, TooltipWrapper, TreeItemIcon, allureIcons } from "@allurereport/web-components";
3
+ import cx from "clsx";
4
+ import { type FunctionalComponent } from "preact";
5
+ import { useState } from "preact/hooks";
6
+ import { TrError } from "@/components/TestResult/TrError";
7
+ import { useI18n } from "@/stores";
8
+ import { navigateTo, openInNewTab } from "@/stores/router";
9
+ import { timestampToDate } from "@/utils/time";
10
+ import type { AwesomeTestResult } from "../../../../types";
11
+ import * as styles from "./styles.scss";
12
+
13
+ export const TrEnvironmentItem: FunctionalComponent<{
14
+ env: string;
15
+ testResult: AwesomeTestResult;
16
+ current?: boolean;
17
+ }> = ({ env, testResult, current = false }) => {
18
+ const { status, error, stop, duration, id } = testResult;
19
+ const [isOpened, setIsOpen] = useState(false);
20
+ const hasEmptyError = !error || !Object.keys(error).length;
21
+ const convertedStop = stop ? timestampToDate(stop) : "";
22
+ const formattedDuration = formatDuration(duration as number);
23
+ const { t } = useI18n("controls");
24
+ const navigateUrl = id;
25
+
26
+ return (
27
+ <div data-testid={"test-result-env-item"}>
28
+ <div className={styles["test-result-environment-item-header"]}>
29
+ {!hasEmptyError && (
30
+ <span onClick={() => setIsOpen(!isOpened)}>
31
+ <ArrowButton isOpened={isOpened} icon={allureIcons.arrowsChevronDown} />
32
+ </span>
33
+ )}
34
+ <div
35
+ className={cx(styles["test-result-environment-item-wrap"], {
36
+ [styles.current]: current,
37
+ })}
38
+ role={current ? undefined : "button"}
39
+ onClick={(e) => {
40
+ if (current) {
41
+ return;
42
+ }
43
+
44
+ e.stopPropagation();
45
+ navigateTo(navigateUrl);
46
+ }}
47
+ >
48
+ <TreeItemIcon status={status} className={styles["test-result-environment-item-status"]} />
49
+ <Text className={styles["test-result-environment-item-env"]} bold>
50
+ {env}
51
+ </Text>
52
+ <Text className={styles["test-result-environment-item-text"]}>{convertedStop}</Text>
53
+ <div className={styles["test-result-environment-item-info"]}>
54
+ <Text type="ui" size={"s"} className={styles["test-result-environment-item-time"]}>
55
+ {formattedDuration}
56
+ </Text>
57
+ {!current && (
58
+ <TooltipWrapper tooltipText={t("openInNewTab")}>
59
+ <IconButton
60
+ icon={allureIcons.lineGeneralLinkExternal}
61
+ style={"ghost"}
62
+ size={"s"}
63
+ className={styles["test-result-environment-item-link"]}
64
+ data-testid={"test-result-env-item-new-tab-button"}
65
+ onClick={(e) => {
66
+ e.stopPropagation();
67
+ openInNewTab(navigateUrl);
68
+ }}
69
+ />
70
+ </TooltipWrapper>
71
+ )}
72
+ </div>
73
+ </div>
74
+ </div>
75
+ {isOpened && !hasEmptyError && (
76
+ <div>
77
+ <TrError status={status} {...error} />
78
+ </div>
79
+ )}
80
+ </div>
81
+ );
82
+ };
@@ -0,0 +1,60 @@
1
+ .test-result-environment-item {
2
+ &:not(.current) {
3
+ cursor: pointer;
4
+
5
+ &:hover {
6
+ background: var(--bg-control-flat-medium);
7
+ }
8
+ }
9
+ }
10
+
11
+ .test-result-environment-item-header {
12
+ display: flex;
13
+ width: 100%;
14
+ gap: 4px;
15
+ align-items: center;
16
+ }
17
+
18
+ .test-result-environment-item-wrap {
19
+ transition: background-color 300ms;
20
+ display: flex;
21
+ gap: 4px;
22
+ justify-content: space-between;
23
+ border-radius: 6px;
24
+ padding: 4px 4px 4px 4px;
25
+ width: 100%;
26
+ align-items: flex-start;
27
+ }
28
+
29
+ .test-result-environment-item-text {
30
+ padding-top: 2px;
31
+ }
32
+
33
+ .test-result-environment-item-env {
34
+ margin-top: 1px;
35
+ }
36
+
37
+ .test-result-environment-item-info {
38
+ display: flex;
39
+ gap: 4px;
40
+ align-items: center;
41
+ margin-left: auto;
42
+ }
43
+
44
+ .test-result-environment-item-time {
45
+ margin-left: auto;
46
+ line-height: 20px;
47
+ color: var(--on-text-secondary);
48
+ }
49
+
50
+ .test-result-environment-item-link {
51
+ :root {
52
+ --allure-btn-icon-color: var(--bg-control-flat);
53
+ }
54
+
55
+ color: var(--on-icon-secondary);
56
+ }
57
+
58
+ .test-result-environment-item-status {
59
+ padding-top: 4px;
60
+ }
@@ -0,0 +1,64 @@
1
+ import { type TestEnvGroup, getRealEnvsCount } from "@allurereport/core-api";
2
+ import { Loadable } from "@allurereport/web-components";
3
+ import type { FunctionalComponent } from "preact";
4
+ import { useEffect } from "preact/hooks";
5
+ import type { AwesomeTestResult } from "types";
6
+ import { TrEnvironmentItem } from "@/components/TestResult/TrEnvironmentItem";
7
+ import { useI18n } from "@/stores";
8
+ import { testEnvGroupsStore } from "@/stores/env";
9
+ import { fetchTestResult, testResultStore } from "@/stores/testResults";
10
+ import * as styles from "./styles.scss";
11
+
12
+ export const TrEnvironmentSection: FunctionalComponent<{
13
+ env: string;
14
+ activeTestResultId: string;
15
+ testResultId: string;
16
+ }> = ({ env, activeTestResultId, testResultId }) => {
17
+ useEffect(() => {
18
+ fetchTestResult(testResultId);
19
+ }, [testResultId]);
20
+
21
+ return (
22
+ <Loadable<Record<string, AwesomeTestResult>, AwesomeTestResult | undefined>
23
+ source={testResultStore}
24
+ transformData={(data) => data[testResultId]}
25
+ renderData={(tr) =>
26
+ tr && <TrEnvironmentItem env={env} testResult={tr} current={activeTestResultId === testResultId} />
27
+ }
28
+ />
29
+ );
30
+ };
31
+
32
+ export const TrEnvironmentsView: FunctionalComponent<{
33
+ testResult: AwesomeTestResult;
34
+ }> = ({ testResult }) => {
35
+ const { t } = useI18n("empty");
36
+
37
+ return (
38
+ <div className={styles["test-result-environments"]}>
39
+ <Loadable<Record<string, TestEnvGroup>, TestEnvGroup | undefined>
40
+ source={testEnvGroupsStore}
41
+ renderData={(group) => {
42
+ if (!getRealEnvsCount(group)) {
43
+ return <div className={styles["test-result-empty"]}>{t("no-environments-results")}</div>;
44
+ }
45
+
46
+ const envs = Object.entries(group.testResultsByEnv).sort(([a], [b]) => b.localeCompare(a));
47
+
48
+ return (
49
+ <ul>
50
+ {envs.map(([env, trId]) => {
51
+ return (
52
+ <li key={`${env}-${trId}`}>
53
+ <TrEnvironmentSection env={env} testResultId={trId} activeTestResultId={testResult.id} />
54
+ </li>
55
+ );
56
+ })}
57
+ </ul>
58
+ );
59
+ }}
60
+ transformData={(groups) => groups[testResult?.testCase?.id]}
61
+ />
62
+ </div>
63
+ );
64
+ };
@@ -0,0 +1,11 @@
1
+ .test-result-environments {
2
+ padding: 12px 24px 32px;
3
+ min-height: 320px;
4
+ }
5
+
6
+ .test-result-empty {
7
+ display: flex;
8
+ padding: 48px 0;
9
+ width: 100%;
10
+ justify-content: center;
11
+ }