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

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 (290) hide show
  1. package/dist/multi/173.app-bae2a0fe5738d77cd976.js +1 -0
  2. package/dist/multi/174.app-bae2a0fe5738d77cd976.js +1 -0
  3. package/dist/multi/252.app-bae2a0fe5738d77cd976.js +1 -0
  4. package/dist/multi/282.app-bae2a0fe5738d77cd976.js +1 -0
  5. package/dist/multi/29.app-bae2a0fe5738d77cd976.js +1 -0
  6. package/dist/multi/416.app-bae2a0fe5738d77cd976.js +1 -0
  7. package/dist/multi/527.app-bae2a0fe5738d77cd976.js +1 -0
  8. package/dist/multi/600.app-bae2a0fe5738d77cd976.js +1 -0
  9. package/dist/multi/605.app-bae2a0fe5738d77cd976.js +1 -0
  10. package/dist/multi/638.app-bae2a0fe5738d77cd976.js +1 -0
  11. package/dist/multi/672.app-bae2a0fe5738d77cd976.js +1 -0
  12. package/dist/multi/686.app-bae2a0fe5738d77cd976.js +1 -0
  13. package/dist/multi/725.app-bae2a0fe5738d77cd976.js +1 -0
  14. package/dist/multi/741.app-bae2a0fe5738d77cd976.js +1 -0
  15. package/dist/multi/755.app-bae2a0fe5738d77cd976.js +1 -0
  16. package/dist/multi/894.app-bae2a0fe5738d77cd976.js +1 -0
  17. package/dist/multi/91.app-bae2a0fe5738d77cd976.js +1 -0
  18. package/dist/multi/943.app-bae2a0fe5738d77cd976.js +1 -0
  19. package/dist/multi/980.app-bae2a0fe5738d77cd976.js +1 -0
  20. package/dist/multi/app-bae2a0fe5738d77cd976.js +2 -0
  21. package/dist/multi/app-bae2a0fe5738d77cd976.js.LICENSE.txt +10 -0
  22. package/dist/multi/manifest.json +25 -24
  23. package/dist/multi/styles-bbf68b2ba63c38b53c38.css +48 -0
  24. package/dist/single/app-996d3b5869f8fc942b66.js +2 -0
  25. package/dist/single/app-996d3b5869f8fc942b66.js.LICENSE.txt +10 -0
  26. package/dist/single/manifest.json +1 -1
  27. package/package.json +31 -19
  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 -32
  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 +96 -64
  57. package/src/components/ReportBody/HeaderActions.tsx +2 -2
  58. package/src/components/ReportBody/SortBy.tsx +4 -7
  59. package/src/components/ReportBody/index.tsx +30 -24
  60. package/src/components/ReportBody/styles.scss +9 -3
  61. package/src/components/ReportGlobalAttachments/index.tsx +34 -0
  62. package/src/components/ReportGlobalAttachments/styles.scss +11 -0
  63. package/src/components/ReportGlobalErrors/index.tsx +30 -0
  64. package/src/components/ReportGlobalErrors/styles.scss +12 -0
  65. package/src/components/ReportHeader/ReportHeaderLogo.tsx +6 -2
  66. package/src/components/ReportHeader/ReportHeaderPie.tsx +1 -2
  67. package/src/components/ReportHeader/index.tsx +38 -12
  68. package/src/components/ReportHeader/styles.scss +9 -1
  69. package/src/components/ReportMetadata/MetadataSummary.tsx +57 -65
  70. package/src/components/ReportMetadata/MetadataWithIcon.tsx +11 -13
  71. package/src/components/ReportMetadata/index.tsx +50 -3
  72. package/src/components/ReportMetadata/styles.scss +0 -2
  73. package/src/components/ReportQualityGateResults/index.tsx +42 -0
  74. package/src/components/ReportQualityGateResults/styles.scss +44 -0
  75. package/src/components/ReportTabs/index.tsx +37 -0
  76. package/src/components/SectionPicker/index.tsx +55 -0
  77. package/src/components/SectionPicker/styles.scss +5 -0
  78. package/src/components/SectionSwitcher/index.tsx +16 -0
  79. package/src/components/SectionSwitcher/styles.scss +4 -0
  80. package/src/components/SectionTabs/index.tsx +0 -0
  81. package/src/components/SideBySide/index.tsx +52 -0
  82. package/src/components/SideBySide/styles.scss +64 -0
  83. package/src/components/SplitLayout/index.tsx +71 -0
  84. package/src/components/SplitLayout/styles.scss +84 -0
  85. package/src/components/TestResult/TestStepsEmpty/index.tsx +3 -9
  86. package/src/components/TestResult/TrAttachmentsView/index.tsx +29 -0
  87. package/src/components/TestResult/{TestResultDescription → TrDescription}/index.tsx +5 -5
  88. package/src/components/TestResult/{TestResultDropdown → TrDropdown}/index.tsx +7 -5
  89. package/src/components/TestResult/{TestResultEmpty → TrEmpty}/index.tsx +7 -13
  90. package/src/components/TestResult/TrEnvironmentItem/index.tsx +82 -0
  91. package/src/components/TestResult/TrEnvironmentItem/styles.scss +60 -0
  92. package/src/components/TestResult/TrEnvironmentsView/index.tsx +64 -0
  93. package/src/components/TestResult/TrEnvironmentsView/styles.scss +11 -0
  94. package/src/components/TestResult/TrError/TrDiff.tsx +121 -0
  95. package/src/components/TestResult/TrError/index.tsx +111 -0
  96. package/src/components/TestResult/TrError/styles.scss +223 -0
  97. package/src/components/TestResult/TrHeader/TrBreadcrumbs.tsx +44 -0
  98. package/src/components/TestResult/TrHeader/index.tsx +15 -0
  99. package/src/components/TestResult/{TestResultHeader → TrHeader}/styles.scss +7 -2
  100. package/src/components/TestResult/TrHistory/TrHistoryItem.tsx +94 -0
  101. package/src/components/TestResult/TrHistory/index.tsx +26 -0
  102. package/src/components/TestResult/{TestResultHistory → TrHistory}/styles.scss +2 -1
  103. package/src/components/TestResult/{TestResultInfo/TestResultInfoStatuses.tsx → TrInfo/TrInfoStatuses.tsx} +6 -4
  104. package/src/components/TestResult/TrInfo/index.tsx +99 -0
  105. package/src/components/TestResult/{TestResultInfo → TrInfo}/styles.scss +18 -0
  106. package/src/components/TestResult/{TestResultLinks → TrLinks}/index.tsx +8 -8
  107. package/src/components/TestResult/{TestResultMetadata → TrMetadata}/index.tsx +6 -6
  108. package/src/components/TestResult/{TestResultNavigation → TrNavigation}/index.tsx +7 -9
  109. package/src/components/TestResult/TrOverview.tsx +46 -0
  110. package/src/components/TestResult/{TestResultParameters → TrParameters}/index.tsx +4 -4
  111. package/src/components/TestResult/TrPrevStatuses/index.tsx +63 -0
  112. package/src/components/TestResult/TrPwTraces/PwTrace.tsx +34 -0
  113. package/src/components/TestResult/TrPwTraces/PwTraceButton.tsx +32 -0
  114. package/src/components/TestResult/TrPwTraces/index.tsx +32 -0
  115. package/src/components/TestResult/TrPwTraces/styles.scss +20 -0
  116. package/src/components/TestResult/TrRetriesView/TrRetriesItem.tsx +70 -0
  117. package/src/components/TestResult/TrRetriesView/index.tsx +29 -0
  118. package/src/components/TestResult/{TestResultSetup → TrSetup}/index.tsx +13 -13
  119. package/src/components/TestResult/{TestResultSeverity → TrSeverity}/index.tsx +2 -2
  120. package/src/components/TestResult/{TestResultStatus → TrStatus}/index.tsx +5 -5
  121. package/src/components/TestResult/TrSteps/TrAttachment.tsx +118 -0
  122. package/src/components/TestResult/{TestResultSteps/testResultAttachmentInfo.tsx → TrSteps/TrAttachmentInfo.tsx} +11 -11
  123. package/src/components/TestResult/TrSteps/TrStep.tsx +98 -0
  124. package/src/components/TestResult/TrSteps/TrStepInfo.tsx +90 -0
  125. package/src/components/TestResult/{TestResultSteps → TrSteps}/index.tsx +12 -12
  126. package/src/components/TestResult/{TestResultSteps → TrSteps}/styles.scss +49 -10
  127. package/src/components/TestResult/{TestResultSteps → TrSteps}/wrongAttachment.tsx +1 -1
  128. package/src/components/TestResult/TrTabs/index.tsx +42 -0
  129. package/src/components/TestResult/{TestResultTeardown → TrTeardown}/index.tsx +13 -13
  130. package/src/components/TestResult/index.tsx +54 -38
  131. package/src/components/TestResult/styles.scss +12 -0
  132. package/src/components/Timeline/index.tsx +100 -0
  133. package/src/components/Timeline/styles.scss +45 -0
  134. package/src/components/ToggleLayout/index.tsx +17 -0
  135. package/src/components/Tree/index.tsx +117 -11
  136. package/src/components/Tree/styles.scss +23 -5
  137. package/src/index.html +22 -6
  138. package/src/index.tsx +90 -20
  139. package/src/locales/az.json +378 -0
  140. package/src/locales/de.json +378 -0
  141. package/src/locales/en.json +378 -0
  142. package/src/locales/es.json +378 -0
  143. package/src/locales/fr.json +378 -0
  144. package/src/locales/he.json +378 -0
  145. package/src/locales/hy.json +378 -0
  146. package/src/locales/it.json +378 -0
  147. package/src/locales/ja.json +378 -0
  148. package/src/locales/ka.json +378 -0
  149. package/src/locales/kr.json +378 -0
  150. package/src/locales/nl.json +378 -0
  151. package/src/locales/pl.json +386 -0
  152. package/src/locales/pt.json +378 -0
  153. package/src/locales/ru.json +386 -0
  154. package/src/locales/sv.json +378 -0
  155. package/src/locales/tr.json +378 -0
  156. package/src/locales/ua.json +329 -0
  157. package/src/locales/zh.json +378 -0
  158. package/src/stores/chart.ts +41 -6
  159. package/src/stores/env.ts +88 -0
  160. package/src/stores/envInfo.ts +2 -2
  161. package/src/stores/globals.ts +28 -0
  162. package/src/stores/layout.ts +36 -0
  163. package/src/stores/locale.ts +77 -29
  164. package/src/stores/modal.ts +22 -0
  165. package/src/stores/qualityGate.ts +28 -0
  166. package/src/stores/router.ts +108 -0
  167. package/src/stores/sections.ts +63 -0
  168. package/src/stores/stats.ts +52 -7
  169. package/src/stores/testResults.ts +13 -9
  170. package/src/stores/theme.ts +15 -18
  171. package/src/stores/timeline.ts +39 -0
  172. package/src/stores/tree.ts +65 -110
  173. package/src/stores/treeFilters/actions.ts +67 -0
  174. package/src/stores/treeFilters/constants.ts +7 -0
  175. package/src/stores/treeFilters/index.ts +3 -0
  176. package/src/stores/treeFilters/store.ts +73 -0
  177. package/src/stores/treeFilters/types.ts +12 -0
  178. package/src/stores/variables.ts +40 -0
  179. package/src/styles.scss +66 -0
  180. package/src/utils/persist.ts +23 -0
  181. package/src/utils/time.ts +1 -0
  182. package/src/utils/tree.ts +30 -0
  183. package/src/utils/treeFilters.ts +42 -24
  184. package/test/components/Header/CiInfo.test.tsx +177 -0
  185. package/test/components/Header.test.tsx +122 -0
  186. package/test/stores/treeFilters.test.ts +302 -0
  187. package/test/utils/treeFilters.test.ts +189 -44
  188. package/tsconfig.json +7 -2
  189. package/tsconfig.node.json +8 -0
  190. package/types.d.ts +45 -24
  191. package/vitest.config.ts +15 -2
  192. package/vitest.setup.ts +1 -0
  193. package/webpack.config.js +35 -5
  194. package/dist/multi/141.app-f32e4213.js +0 -1
  195. package/dist/multi/222.app-f32e4213.js +0 -1
  196. package/dist/multi/335.app-f32e4213.js +0 -1
  197. package/dist/multi/34.app-f32e4213.js +0 -1
  198. package/dist/multi/349.app-f32e4213.js +0 -1
  199. package/dist/multi/378.app-f32e4213.js +0 -1
  200. package/dist/multi/406.app-f32e4213.js +0 -1
  201. package/dist/multi/476.app-f32e4213.js +0 -1
  202. package/dist/multi/53.app-f32e4213.js +0 -1
  203. package/dist/multi/584.app-f32e4213.js +0 -1
  204. package/dist/multi/690.app-f32e4213.js +0 -1
  205. package/dist/multi/747.app-f32e4213.js +0 -1
  206. package/dist/multi/767.app-f32e4213.js +0 -1
  207. package/dist/multi/816.app-f32e4213.js +0 -1
  208. package/dist/multi/83.app-f32e4213.js +0 -1
  209. package/dist/multi/873.app-f32e4213.js +0 -1
  210. package/dist/multi/920.app-f32e4213.js +0 -1
  211. package/dist/multi/991.app-f32e4213.js +0 -1
  212. package/dist/multi/app-f32e4213.js +0 -2
  213. package/dist/multi/app-f32e4213.js.LICENSE.txt +0 -16
  214. package/dist/multi/styles-f32e4213.css +0 -284
  215. package/dist/single/app-7fa8e43f.js +0 -2
  216. package/dist/single/app-7fa8e43f.js.LICENSE.txt +0 -16
  217. package/src/assets/scss/code.scss +0 -71
  218. package/src/assets/scss/typography.scss +0 -218
  219. package/src/components/ArrowButton/index.tsx +0 -36
  220. package/src/components/ArrowButton/styles.scss +0 -35
  221. package/src/components/LanguagePicker/index.tsx +0 -40
  222. package/src/components/Modal/styles.scss +0 -126
  223. package/src/components/ReportLogo/index.tsx +0 -16
  224. package/src/components/ReportLogo/styles.scss +0 -20
  225. package/src/components/ReportLogoFull/index.tsx +0 -20
  226. package/src/components/ReportLogoFull/styles.scss +0 -7
  227. package/src/components/Tabs/index.tsx +0 -62
  228. package/src/components/TestResult/TestResultAttachmentsView/index.tsx +0 -27
  229. package/src/components/TestResult/TestResultError/index.tsx +0 -59
  230. package/src/components/TestResult/TestResultError/styles.scss +0 -51
  231. package/src/components/TestResult/TestResultHeader/index.tsx +0 -55
  232. package/src/components/TestResult/TestResultHistory/TestResultHistoryItem.tsx +0 -67
  233. package/src/components/TestResult/TestResultHistory/index.tsx +0 -26
  234. package/src/components/TestResult/TestResultInfo/index.tsx +0 -79
  235. package/src/components/TestResult/TestResultOverview.tsx +0 -43
  236. package/src/components/TestResult/TestResultPrevStatuses/index.tsx +0 -49
  237. package/src/components/TestResult/TestResultRetriesView/TestResultRetriesItem.tsx +0 -52
  238. package/src/components/TestResult/TestResultRetriesView/index.tsx +0 -24
  239. package/src/components/TestResult/TestResultSteps/HtmlAttachmentPreview.tsx +0 -12
  240. package/src/components/TestResult/TestResultSteps/attachment.tsx +0 -68
  241. package/src/components/TestResult/TestResultSteps/attachmentCode.tsx +0 -20
  242. package/src/components/TestResult/TestResultSteps/attachmentImage.tsx +0 -32
  243. package/src/components/TestResult/TestResultSteps/attachmentVideo.tsx +0 -15
  244. package/src/components/TestResult/TestResultSteps/testResultAttachment.tsx +0 -77
  245. package/src/components/TestResult/TestResultSteps/testResultStep.tsx +0 -85
  246. package/src/components/TestResult/TestResultSteps/testResultStepInfo.tsx +0 -30
  247. package/src/components/TestResult/TestResultTabs/index.tsx +0 -59
  248. package/src/components/ThemeButton/ThemeButton.tsx +0 -20
  249. package/src/components/Tree/Tree.tsx +0 -75
  250. package/src/components/Tree/TreeHeader.tsx +0 -82
  251. package/src/components/Tree/TreeItem.tsx +0 -35
  252. package/src/components/Tree/TreeItemIcon.tsx +0 -32
  253. package/src/i18n/constants.ts +0 -124
  254. package/src/i18n/locales/am.json +0 -120
  255. package/src/i18n/locales/az.json +0 -120
  256. package/src/i18n/locales/de.json +0 -120
  257. package/src/i18n/locales/en.json +0 -121
  258. package/src/i18n/locales/es.json +0 -120
  259. package/src/i18n/locales/fr.json +0 -120
  260. package/src/i18n/locales/he.json +0 -120
  261. package/src/i18n/locales/it.json +0 -120
  262. package/src/i18n/locales/ja.json +0 -120
  263. package/src/i18n/locales/ka.json +0 -120
  264. package/src/i18n/locales/kr.json +0 -120
  265. package/src/i18n/locales/nl.json +0 -120
  266. package/src/i18n/locales/pl.json +0 -118
  267. package/src/i18n/locales/pt.json +0 -120
  268. package/src/i18n/locales/ru.json +0 -118
  269. package/src/i18n/locales/sv.json +0 -120
  270. package/src/i18n/locales/tr.json +0 -120
  271. package/src/i18n/locales/zh.json +0 -120
  272. package/src/utils/attachments.ts +0 -156
  273. package/src/utils/capitalize.ts +0 -6
  274. /package/dist/multi/{JetBrainsMono_vf-b9a9c326..woff → JetBrainsMono_vf.woff} +0 -0
  275. /package/dist/multi/{JetBrainsMono_vf-9e9649b6..woff2 → JetBrainsMono_vf.woff2} +0 -0
  276. /package/dist/multi/{pt-root-ui_vf-22fe60ca..woff → pt-root-ui_vf.woff} +0 -0
  277. /package/dist/multi/{pt-root-ui_vf-9d251e8b..woff2 → pt-root-ui_vf.woff2} +0 -0
  278. /package/src/components/{Tabs → ReportTabs}/styles.scss +0 -0
  279. /package/src/components/TestResult/{TestResultAttachmentsView → TrAttachmentsView}/styles.scss +0 -0
  280. /package/src/components/TestResult/{TestResultDescription → TrDescription}/styles.scss +0 -0
  281. /package/src/components/TestResult/{TestResultDropdown → TrDropdown}/styles.scss +0 -0
  282. /package/src/components/TestResult/{TestResultEmpty → TrEmpty}/styles.scss +0 -0
  283. /package/src/components/TestResult/{TestResultLinks → TrLinks}/styles.scss +0 -0
  284. /package/src/components/TestResult/{TestResultMetadata → TrMetadata}/styles.scss +0 -0
  285. /package/src/components/TestResult/{TestResultNavigation → TrNavigation}/styles.scss +0 -0
  286. /package/src/components/TestResult/{TestResultParameters → TrParameters}/styles.scss +0 -0
  287. /package/src/components/TestResult/{TestResultPrevStatuses → TrPrevStatuses}/styles.scss +0 -0
  288. /package/src/components/TestResult/{TestResultRetriesView → TrRetriesView}/styles.scss +0 -0
  289. /package/src/components/TestResult/{TestResultSeverity → TrSeverity}/styles.scss +0 -0
  290. /package/src/components/TestResult/{TestResultStatus → TrStatus}/styles.scss +0 -0
@@ -0,0 +1,44 @@
1
+ @import "~@allurereport/web-components/mixins.scss";
2
+
3
+ .report-quality-gate-results {
4
+ padding: 20px 0;
5
+
6
+ & > li + li {
7
+ margin-top: 12px;
8
+ }
9
+ }
10
+
11
+ .report-quality-gate-results-empty {
12
+ display: flex;
13
+ padding: 48px 0;
14
+ width: 100%;
15
+ justify-content: center;
16
+ }
17
+
18
+ .report-quality-gate-result {
19
+ display: flex;
20
+ align-items: flex-start;
21
+ gap: 0 8px;
22
+
23
+ b {
24
+ font-weight: 700;
25
+ }
26
+ }
27
+
28
+ .report-quality-gate-result-icon {
29
+ flex: 0 0 auto;
30
+ margin-top: 3px;
31
+ color: var(--bg-support-capella);
32
+ }
33
+
34
+ .report-quality-gate-result-content {
35
+ flex: 1 1 auto;
36
+
37
+ & > * + * {
38
+ margin-top: 4px;
39
+ }
40
+ }
41
+
42
+ .report-quality-gate-result-error {
43
+ margin-top: 8px;
44
+ }
@@ -0,0 +1,37 @@
1
+ import { Text } from "@allurereport/web-components";
2
+ import { useComputed } from "@preact/signals";
3
+ import { type ComponentChildren } from "preact";
4
+ import { useCallback } from "preact/hooks";
5
+ import { setTreeStatus, treeStatus } from "@/stores/treeFilters";
6
+ import type { AwesomeStatus } from "../../../types.js";
7
+ import * as styles from "./styles.scss";
8
+
9
+ export const ReportTabsList = (props: { children: ComponentChildren }) => {
10
+ return <div className={styles.tabsList}>{props.children}</div>;
11
+ };
12
+
13
+ export const ReportTab = (props: { id: AwesomeStatus; children: ComponentChildren }) => {
14
+ const { id, children, ...rest } = props;
15
+ const isCurrentTab = useComputed(() => treeStatus.value === id);
16
+
17
+ const handleCurrentTabClick = useCallback(() => {
18
+ setTreeStatus("total");
19
+ }, []);
20
+
21
+ const handleTabClick = useCallback(() => {
22
+ setTreeStatus(id);
23
+ }, [id]);
24
+
25
+ return (
26
+ <button
27
+ {...rest}
28
+ className={styles.tab}
29
+ onClick={isCurrentTab.value ? handleCurrentTabClick : handleTabClick}
30
+ aria-current={isCurrentTab.value || undefined}
31
+ >
32
+ <Text type="paragraph" size="m" bold>
33
+ {children}
34
+ </Text>
35
+ </button>
36
+ );
37
+ };
@@ -0,0 +1,55 @@
1
+ import { DropdownButton, Menu, SvgIcon, allureIcons } from "@allurereport/web-components";
2
+ import { useI18n } from "@/stores";
3
+ import { availableSections, currentSection, setSection } from "@/stores/sections";
4
+ import * as styles from "./styles.scss";
5
+
6
+ export type SectionItem = {
7
+ name: string;
8
+ logo: string;
9
+ };
10
+
11
+ const defaultSection: SectionItem = { name: "report", logo: allureIcons.reportLogo };
12
+
13
+ const sectionMap: Record<string, SectionItem> = {
14
+ default: defaultSection,
15
+ charts: { name: "charts", logo: allureIcons.lineChartsBarChartSquare },
16
+ timeline: { name: "timeline", logo: allureIcons.lineChartsTimeline },
17
+ };
18
+
19
+ export const SectionPicker = () => {
20
+ const selectedSection = sectionMap[currentSection.value] || defaultSection;
21
+ const { t } = useI18n("sections");
22
+
23
+ return (
24
+ <Menu
25
+ size="m"
26
+ placement={"bottom-start"}
27
+ menuTrigger={({ isOpened, onClick }) => (
28
+ <DropdownButton
29
+ style="ghost"
30
+ size="m"
31
+ text={t(selectedSection.name)}
32
+ icon={selectedSection.logo}
33
+ isExpanded={isOpened}
34
+ onClick={onClick}
35
+ iconSize={"xs"}
36
+ />
37
+ )}
38
+ >
39
+ <Menu.Section>
40
+ {["default", ...availableSections.value].map((value) => (
41
+ <Menu.ItemWithCheckmark
42
+ onClick={() => setSection(value)}
43
+ key={value}
44
+ isChecked={currentSection.value === value}
45
+ >
46
+ <div className={styles["menu-item"]}>
47
+ <SvgIcon id={sectionMap[value]?.logo} size={"s"} />
48
+ {t(sectionMap[value]?.name) || value}
49
+ </div>
50
+ </Menu.ItemWithCheckmark>
51
+ ))}
52
+ </Menu.Section>
53
+ </Menu>
54
+ );
55
+ };
@@ -0,0 +1,5 @@
1
+ .menu-item {
2
+ display: flex;
3
+ gap: 4px;
4
+ align-items: center;
5
+ }
@@ -0,0 +1,16 @@
1
+ import type { VNode } from "preact";
2
+ import { Charts } from "@/components/Charts";
3
+ import { Report } from "@/components/Report";
4
+ import { currentSection } from "@/stores/sections";
5
+ import { Timeline } from "../Timeline";
6
+ import * as styles from "./styles.scss";
7
+
8
+ export const SectionSwitcher = () => {
9
+ const sectionMap: Record<string, VNode> = {
10
+ report: <Report />,
11
+ charts: <Charts />,
12
+ timeline: <Timeline />,
13
+ };
14
+
15
+ return <div className={styles.layout}>{sectionMap[currentSection.value] || sectionMap.report}</div>;
16
+ };
@@ -0,0 +1,4 @@
1
+ .layout {
2
+ flex: 1 1 auto;
3
+ overflow: hidden;
4
+ }
File without changes
@@ -0,0 +1,52 @@
1
+ import type { JSX } from "preact";
2
+ import { useEffect, useMemo, useRef } from "preact/hooks";
3
+ import Split from "split.js";
4
+ import * as styles from "./styles.scss";
5
+
6
+ const SideBySide = ({ left, right }: { left: JSX.Element; right: JSX.Element }) => {
7
+ const containerRef = useRef<HTMLDivElement>(null);
8
+
9
+ const leftContent = useMemo(() => left, [left]);
10
+ const rightContent = useMemo(() => right, [right]);
11
+
12
+ useEffect(() => {
13
+ const sizes = JSON.parse(localStorage.getItem("sideBySidePosition") || "[50, 50]");
14
+
15
+ const splitter = Split([`.${styles["side-left"]}`, `.${styles["side-right"]}`], {
16
+ sizes,
17
+ gutterSize: 7,
18
+ gutter: (): HTMLElement => {
19
+ const gutter = document.createElement("div");
20
+ gutter.className = `${styles.gutter}`;
21
+ gutter.addEventListener("dblclick", () => {
22
+ const currentSizes = splitter.getSizes();
23
+ if (JSON.stringify(currentSizes) === "[50,50]") {
24
+ splitter.setSizes([30, 70]);
25
+ localStorage.setItem("sideBySidePosition", JSON.stringify([30, 70]));
26
+ return;
27
+ }
28
+ splitter.setSizes([50, 50]);
29
+ localStorage.setItem("sideBySidePosition", JSON.stringify([50, 50]));
30
+ });
31
+ return gutter;
32
+ },
33
+ onDragEnd: () => {
34
+ const newSizes = splitter.getSizes();
35
+ localStorage.setItem("sideBySidePosition", JSON.stringify(newSizes));
36
+ },
37
+ });
38
+
39
+ return () => {
40
+ splitter.destroy();
41
+ };
42
+ }, []);
43
+
44
+ return (
45
+ <div class={styles.side} ref={containerRef}>
46
+ <div class={styles["side-left"]}>{leftContent}</div>
47
+ <div class={styles["side-right"]}>{rightContent}</div>
48
+ </div>
49
+ );
50
+ };
51
+
52
+ export default SideBySide;
@@ -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,71 @@
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 MainReport from "@/components/MainReport";
5
+ import SideBySide from "@/components/SideBySide";
6
+ import TestResult from "@/components/TestResult";
7
+ import { useI18n } from "@/stores";
8
+ import { route } from "@/stores/router";
9
+ import { testResultStore } from "@/stores/testResults";
10
+ import { treeStore } from "@/stores/tree";
11
+ import * as styles from "./styles.scss";
12
+
13
+ const MainReportWrapper = () => {
14
+ const containerRef = useRef<HTMLDivElement>(null);
15
+
16
+ return (
17
+ <div className={styles.wrapper} ref={containerRef}>
18
+ <MainReport />
19
+ </div>
20
+ );
21
+ };
22
+
23
+ const Loader = () => {
24
+ return (
25
+ <div className={styles.content}>
26
+ <PageLoader />
27
+ </div>
28
+ );
29
+ };
30
+
31
+ export const SplitLayout = () => {
32
+ const testResultId = route.value.params?.testResultId ?? null;
33
+ const [cachedMain, setCachedMain] = useState<JSX.Element | null>(null);
34
+ const { t } = useI18n("controls");
35
+ const leftSide = (
36
+ <Loadable source={treeStore} renderLoader={() => <PageLoader />} renderData={() => <MainReportWrapper />} />
37
+ );
38
+
39
+ const TrView = () => {
40
+ return testResultId ? (
41
+ <Loadable
42
+ source={testResultStore}
43
+ renderLoader={() => <Loader />}
44
+ transformData={(allResults) => {
45
+ if (testResultId in allResults) {
46
+ return allResults[testResultId];
47
+ }
48
+ }}
49
+ renderData={(tr) => {
50
+ return tr ? <TestResult testResult={tr} /> : <Loader />;
51
+ }}
52
+ />
53
+ ) : (
54
+ <div className={styles.empty}>
55
+ <Text>{t("noSelectedTR")}</Text>
56
+ </div>
57
+ );
58
+ };
59
+
60
+ useEffect(() => {
61
+ if (!cachedMain) {
62
+ setCachedMain(leftSide);
63
+ }
64
+ }, [cachedMain]);
65
+
66
+ return (
67
+ <div className={styles["side-by-side"]} data-testId={"split-layout"}>
68
+ <SideBySide left={cachedMain} right={<TrView />} />
69
+ </div>
70
+ );
71
+ };
@@ -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
+ }
@@ -2,22 +2,16 @@ import { SvgIcon, Text, allureIcons } from "@allurereport/web-components";
2
2
  import { useI18n } from "@/stores";
3
3
  import * as styles from "./styles.scss";
4
4
 
5
- const TestStepsEmpty = () => {
5
+ const TrStepsEmpty = () => {
6
6
  const { t } = useI18n("empty");
7
7
  return (
8
8
  <div className={styles["test-steps-empty"]}>
9
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
- />
10
+ <SvgIcon size={"xl"} id={allureIcons.lineDevCodeSquare} className={styles["test-steps-empty-icon"]} />
17
11
  <Text className={styles["test-steps-empty-text"]}>{t("no-test-steps-results")}</Text>
18
12
  </div>
19
13
  </div>
20
14
  );
21
15
  };
22
16
 
23
- export default TestStepsEmpty;
17
+ export default TrStepsEmpty;
@@ -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,34 +1,28 @@
1
1
  import { SvgIcon, Text, allureIcons } from "@allurereport/web-components";
2
2
  import * as baseStyles from "@/components/BaseLayout/styles.scss";
3
- import { TestResultInfo } from "@/components/TestResult/TestResultInfo";
3
+ import { TrInfo } from "@/components/TestResult/TrInfo";
4
4
  import { useI18n } from "@/stores";
5
5
  import * as styles from "./styles.scss";
6
6
 
7
- const TestResultThumb = () => {
7
+ const TrThumb = () => {
8
8
  const { t } = useI18n("empty");
9
9
  return (
10
10
  <div className={styles["test-result-thumb"]}>
11
11
  <div className={styles["test-result-thumb-wrapper"]}>
12
- <SvgIcon
13
- size={"m"}
14
- width={"32px"}
15
- height={"32px"}
16
- id={allureIcons.lineDevCodeSquare}
17
- className={styles["test-result-thumb-icon"]}
18
- />
12
+ <SvgIcon size={"xl"} id={allureIcons.lineDevCodeSquare} className={styles["test-result-thumb-icon"]} />
19
13
  <Text className={styles["test-result-thumb-text"]}>{t("no-test-case-results")}</Text>
20
14
  </div>
21
15
  </div>
22
16
  );
23
17
  };
24
18
 
25
- const TestResultEmpty = () => {
19
+ const TrEmpty = () => {
26
20
  return (
27
21
  <div className={baseStyles.content}>
28
- <TestResultInfo />
29
- <TestResultThumb />
22
+ <TrInfo />
23
+ <TrThumb />
30
24
  </div>
31
25
  );
32
26
  };
33
27
 
34
- export default TestResultEmpty;
28
+ 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
+ };