@allurereport/web-awesome 3.3.1 → 3.4.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 (209) hide show
  1. package/dist/multi/173.app-648d4a8e7d5405e104a1.js +1 -0
  2. package/dist/multi/174.app-648d4a8e7d5405e104a1.js +1 -0
  3. package/dist/multi/252.app-648d4a8e7d5405e104a1.js +1 -0
  4. package/dist/multi/282.app-648d4a8e7d5405e104a1.js +1 -0
  5. package/dist/multi/29.app-648d4a8e7d5405e104a1.js +1 -0
  6. package/dist/multi/310.app-648d4a8e7d5405e104a1.js +1 -0
  7. package/dist/multi/416.app-648d4a8e7d5405e104a1.js +1 -0
  8. package/dist/multi/507.app-648d4a8e7d5405e104a1.js +1 -0
  9. package/dist/multi/527.app-648d4a8e7d5405e104a1.js +1 -0
  10. package/dist/multi/600.app-648d4a8e7d5405e104a1.js +1 -0
  11. package/dist/multi/605.app-648d4a8e7d5405e104a1.js +1 -0
  12. package/dist/multi/638.app-648d4a8e7d5405e104a1.js +1 -0
  13. package/dist/multi/672.app-648d4a8e7d5405e104a1.js +1 -0
  14. package/dist/multi/686.app-648d4a8e7d5405e104a1.js +1 -0
  15. package/dist/multi/725.app-648d4a8e7d5405e104a1.js +1 -0
  16. package/dist/multi/741.app-648d4a8e7d5405e104a1.js +1 -0
  17. package/dist/multi/749.app-648d4a8e7d5405e104a1.js +1 -0
  18. package/dist/multi/755.app-648d4a8e7d5405e104a1.js +1 -0
  19. package/dist/multi/{894.app-8be6acc0a596a2197dbf.js → 894.app-648d4a8e7d5405e104a1.js} +1 -1
  20. package/dist/multi/943.app-648d4a8e7d5405e104a1.js +1 -0
  21. package/dist/multi/980.app-648d4a8e7d5405e104a1.js +1 -0
  22. package/dist/multi/app-648d4a8e7d5405e104a1.js +2 -0
  23. package/dist/multi/{app-8be6acc0a596a2197dbf.js.LICENSE.txt → app-648d4a8e7d5405e104a1.js.LICENSE.txt} +1 -1
  24. package/dist/multi/manifest.json +23 -21
  25. package/dist/multi/{styles-0b84e1ef76554ad2db9a.css → styles-b72a0161ddf41447b31c.css} +10 -10
  26. package/dist/single/app-ae966ad3dc27579d6c39.js +2 -0
  27. package/dist/single/{app-8221eb856e47b4ef50d6.js.LICENSE.txt → app-ae966ad3dc27579d6c39.js.LICENSE.txt} +1 -1
  28. package/dist/single/manifest.json +1 -1
  29. package/package.json +18 -36
  30. package/src/components/BaseLayout/index.tsx +2 -0
  31. package/src/components/Categories/CategoriesTree/index.tsx +2 -0
  32. package/src/components/Categories/CategoryHeaderItem/index.tsx +2 -0
  33. package/src/components/Categories/CategoryTreeItem/index.tsx +2 -0
  34. package/src/components/Categories/GroupTreeItem/index.tsx +2 -0
  35. package/src/components/Categories/HistoryTreeItem/index.tsx +2 -0
  36. package/src/components/Categories/LabelTreeItem/index.tsx +2 -0
  37. package/src/components/Categories/MessageTreeItem/index.tsx +2 -0
  38. package/src/components/Categories/SeverityTreeItem/index.tsx +2 -0
  39. package/src/components/Charts/index.tsx +3 -0
  40. package/src/components/EnvironmentPicker/index.tsx +78 -18
  41. package/src/components/EnvironmentPicker/styles.scss +19 -0
  42. package/src/components/Footer/FooterLogo.tsx +1 -0
  43. package/src/components/Footer/FooterVersion.tsx +2 -0
  44. package/src/components/Footer/index.tsx +3 -1
  45. package/src/components/Header/CiInfo/index.tsx +17 -3
  46. package/src/components/Header/index.tsx +3 -0
  47. package/src/components/Header/styles.scss +1 -0
  48. package/src/components/HeaderControls/index.tsx +1 -0
  49. package/src/components/MainReport/index.tsx +3 -0
  50. package/src/components/Metadata/index.tsx +2 -0
  51. package/src/components/MetadataButton/index.tsx +35 -8
  52. package/src/components/MetadataButton/styles.scss +20 -0
  53. package/src/components/Modal/index.tsx +2 -0
  54. package/src/components/NavTabs/index.tsx +2 -1
  55. package/src/components/ReportBody/HeaderActions.tsx +1 -0
  56. package/src/components/ReportBody/SortBy.tsx +2 -0
  57. package/src/components/ReportBody/index.tsx +4 -1
  58. package/src/components/ReportCategories/index.tsx +2 -0
  59. package/src/components/ReportFilters/BaseFilters.tsx +2 -0
  60. package/src/components/ReportFilters/CategoriesFilter.tsx +2 -0
  61. package/src/components/ReportFilters/RetryFlaky.tsx +2 -0
  62. package/src/components/ReportFilters/TagsFilter.tsx +2 -0
  63. package/src/components/ReportFilters/TransitionFilter.tsx +2 -0
  64. package/src/components/ReportFilters/index.tsx +3 -0
  65. package/src/components/ReportGlobalAttachments/index.tsx +3 -0
  66. package/src/components/ReportGlobalErrors/index.tsx +2 -0
  67. package/src/components/ReportHeader/ReportHeaderLabelList.tsx +1 -0
  68. package/src/components/ReportHeader/ReportHeaderLogo.tsx +3 -1
  69. package/src/components/ReportHeader/ReportHeaderPie.tsx +2 -0
  70. package/src/components/ReportHeader/index.tsx +2 -0
  71. package/src/components/ReportMetadata/MetadataItem.tsx +1 -0
  72. package/src/components/ReportMetadata/MetadataSummary.tsx +3 -1
  73. package/src/components/ReportMetadata/MetadataTestType.tsx +2 -0
  74. package/src/components/ReportMetadata/MetadataWithIcon.tsx +2 -0
  75. package/src/components/ReportMetadata/index.tsx +61 -17
  76. package/src/components/ReportQualityGateResults/index.tsx +6 -2
  77. package/src/components/ReportSearch/index.tsx +1 -0
  78. package/src/components/ReportTabs/index.tsx +3 -0
  79. package/src/components/SectionPicker/index.tsx +2 -0
  80. package/src/components/SectionSwitcher/index.tsx +3 -0
  81. package/src/components/SideBySide/index.tsx +1 -0
  82. package/src/components/SplitLayout/index.tsx +2 -0
  83. package/src/components/TestResult/TestStepsEmpty/index.tsx +2 -0
  84. package/src/components/TestResult/TrAttachmentsView/index.tsx +2 -0
  85. package/src/components/TestResult/TrDescription/index.tsx +16 -3
  86. package/src/components/TestResult/TrDropdown/index.tsx +1 -0
  87. package/src/components/TestResult/TrEmpty/index.tsx +3 -1
  88. package/src/components/TestResult/TrEnvironmentItem/index.tsx +3 -0
  89. package/src/components/TestResult/TrEnvironmentsView/index.tsx +8 -2
  90. package/src/components/TestResult/TrError/TrDiff.tsx +3 -1
  91. package/src/components/TestResult/TrError/index.tsx +20 -18
  92. package/src/components/TestResult/TrError/styles.scss +0 -25
  93. package/src/components/TestResult/TrHeader/TrBreadcrumbs.tsx +3 -1
  94. package/src/components/TestResult/TrHeader/index.tsx +2 -0
  95. package/src/components/TestResult/TrHeader/styles.scss +1 -0
  96. package/src/components/TestResult/TrHistory/TrHistoryItem.tsx +3 -1
  97. package/src/components/TestResult/TrHistory/index.tsx +2 -0
  98. package/src/components/TestResult/TrInfo/TrInfoStatuses.tsx +2 -0
  99. package/src/components/TestResult/TrInfo/index.tsx +2 -0
  100. package/src/components/TestResult/TrLinks/index.tsx +63 -11
  101. package/src/components/TestResult/TrMetadata/index.tsx +44 -5
  102. package/src/components/TestResult/TrNavigation/index.tsx +2 -0
  103. package/src/components/TestResult/TrOverview.tsx +20 -17
  104. package/src/components/TestResult/TrParameters/index.tsx +41 -7
  105. package/src/components/TestResult/TrPrevStatuses/index.tsx +2 -0
  106. package/src/components/TestResult/TrPwTraces/PwTraceButton.tsx +44 -9
  107. package/src/components/TestResult/TrPwTraces/index.tsx +5 -1
  108. package/src/components/TestResult/TrPwTraces/openPwTraceInNewTab.ts +29 -0
  109. package/src/components/TestResult/TrRetriesView/TrRetriesItem.tsx +3 -1
  110. package/src/components/TestResult/TrRetriesView/index.tsx +2 -0
  111. package/src/components/TestResult/TrSetup/index.tsx +3 -1
  112. package/src/components/TestResult/TrSeverity/index.tsx +2 -0
  113. package/src/components/TestResult/TrStatus/index.tsx +2 -0
  114. package/src/components/TestResult/TrSteps/TrAttachment.tsx +38 -6
  115. package/src/components/TestResult/TrSteps/TrAttachmentInfo.tsx +50 -2
  116. package/src/components/TestResult/TrSteps/TrBodyItems.tsx +42 -0
  117. package/src/components/TestResult/TrSteps/TrErrorStep.tsx +40 -0
  118. package/src/components/TestResult/TrSteps/TrStep.tsx +31 -65
  119. package/src/components/TestResult/TrSteps/TrStepHeader.tsx +50 -0
  120. package/src/components/TestResult/TrSteps/TrStepInfo.tsx +1 -0
  121. package/src/components/TestResult/TrSteps/index.tsx +12 -32
  122. package/src/components/TestResult/TrSteps/styles.scss +8 -0
  123. package/src/components/TestResult/TrSteps/wrongAttachment.tsx +2 -1
  124. package/src/components/TestResult/TrTabs/index.tsx +1 -0
  125. package/src/components/TestResult/TrTeardown/index.tsx +3 -1
  126. package/src/components/TestResult/bodyItems.ts +151 -0
  127. package/src/components/TestResult/index.tsx +2 -0
  128. package/src/components/Timeline/index.tsx +12 -2
  129. package/src/components/ToggleLayout/index.tsx +1 -0
  130. package/src/components/Tree/index.tsx +6 -2
  131. package/src/components/Tree/styles.scss +11 -0
  132. package/src/index.tsx +9 -3
  133. package/src/locales/ar.json +427 -0
  134. package/src/locales/az.json +43 -46
  135. package/src/locales/de.json +5 -0
  136. package/src/locales/en.json +5 -0
  137. package/src/locales/es.json +5 -0
  138. package/src/locales/fr.json +5 -0
  139. package/src/locales/he.json +5 -0
  140. package/src/locales/hy.json +5 -0
  141. package/src/locales/it.json +5 -0
  142. package/src/locales/ja.json +5 -0
  143. package/src/locales/ka.json +5 -0
  144. package/src/locales/kr.json +5 -0
  145. package/src/locales/nl.json +5 -0
  146. package/src/locales/pl.json +5 -0
  147. package/src/locales/pt.json +5 -0
  148. package/src/locales/ru.json +5 -0
  149. package/src/locales/sv.json +5 -0
  150. package/src/locales/tr.json +5 -0
  151. package/src/locales/uk.json +5 -0
  152. package/src/locales/zh-TW.json +432 -0
  153. package/src/locales/zh.json +5 -0
  154. package/src/stores/categories.ts +1 -0
  155. package/src/stores/chart.ts +2 -1
  156. package/src/stores/env.ts +14 -4
  157. package/src/stores/envInfo.ts +1 -0
  158. package/src/stores/globals.ts +1 -0
  159. package/src/stores/locale.ts +1 -0
  160. package/src/stores/qualityGate.ts +1 -0
  161. package/src/stores/sections.ts +1 -0
  162. package/src/stores/stats.ts +12 -6
  163. package/src/stores/testResult.ts +1 -0
  164. package/src/stores/testResults.ts +1 -0
  165. package/src/stores/timeline.ts +2 -0
  166. package/src/stores/tree.ts +2 -0
  167. package/src/stores/treeFilters/actions.ts +1 -0
  168. package/src/stores/treeFilters/store.ts +1 -0
  169. package/src/stores/treeFilters/utils.ts +1 -0
  170. package/src/stores/variables.ts +1 -0
  171. package/src/utils/time.ts +1 -0
  172. package/src/utils/treeFilters.ts +2 -0
  173. package/test/components/EnvironmentPicker.test.tsx +133 -0
  174. package/test/components/Header/CiInfo.test.tsx +15 -0
  175. package/test/components/Header.test.tsx +1 -0
  176. package/test/components/TestResult/PwTraceButton.test.tsx +104 -0
  177. package/test/components/TestResult/TrErrorStep.test.tsx +127 -0
  178. package/test/components/TestResult/TrOverview.test.tsx +114 -0
  179. package/test/components/TestResult/bodyItems.test.ts +194 -0
  180. package/test/components/TestResult/openPwTraceInNewTab.test.ts +65 -0
  181. package/test/components/Timeline.test.tsx +104 -0
  182. package/test/stores/treeFilters/actions.test.ts +82 -0
  183. package/test/utils/ownerAddress.test.ts +1 -0
  184. package/test/utils/treeFilters.test.ts +1 -0
  185. package/tsconfig.json +1 -2
  186. package/tsconfig.node.json +2 -1
  187. package/types.d.ts +2 -0
  188. package/.eslintrc.cjs +0 -18
  189. package/dist/multi/173.app-8be6acc0a596a2197dbf.js +0 -1
  190. package/dist/multi/174.app-8be6acc0a596a2197dbf.js +0 -1
  191. package/dist/multi/252.app-8be6acc0a596a2197dbf.js +0 -1
  192. package/dist/multi/282.app-8be6acc0a596a2197dbf.js +0 -1
  193. package/dist/multi/29.app-8be6acc0a596a2197dbf.js +0 -1
  194. package/dist/multi/416.app-8be6acc0a596a2197dbf.js +0 -1
  195. package/dist/multi/527.app-8be6acc0a596a2197dbf.js +0 -1
  196. package/dist/multi/600.app-8be6acc0a596a2197dbf.js +0 -1
  197. package/dist/multi/605.app-8be6acc0a596a2197dbf.js +0 -1
  198. package/dist/multi/638.app-8be6acc0a596a2197dbf.js +0 -1
  199. package/dist/multi/672.app-8be6acc0a596a2197dbf.js +0 -1
  200. package/dist/multi/686.app-8be6acc0a596a2197dbf.js +0 -1
  201. package/dist/multi/725.app-8be6acc0a596a2197dbf.js +0 -1
  202. package/dist/multi/741.app-8be6acc0a596a2197dbf.js +0 -1
  203. package/dist/multi/749.app-8be6acc0a596a2197dbf.js +0 -1
  204. package/dist/multi/755.app-8be6acc0a596a2197dbf.js +0 -1
  205. package/dist/multi/943.app-8be6acc0a596a2197dbf.js +0 -1
  206. package/dist/multi/980.app-8be6acc0a596a2197dbf.js +0 -1
  207. package/dist/multi/app-8be6acc0a596a2197dbf.js +0 -2
  208. package/dist/single/app-8221eb856e47b4ef50d6.js +0 -2
  209. package/src/components/TestResult/TrPwTraces/PwTrace.tsx +0 -34
@@ -1,4 +1,4 @@
1
- /*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
1
+ /*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */
2
2
 
3
3
  /**
4
4
  * Prism: Lightweight, robust, elegant syntax highlighting
@@ -1,3 +1,3 @@
1
1
  {
2
- "main.js": "app-8221eb856e47b4ef50d6.js"
2
+ "main.js": "app-ae966ad3dc27579d6c39.js"
3
3
  }
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@allurereport/web-awesome",
3
- "version": "3.3.1",
3
+ "version": "3.4.1",
4
4
  "description": "The static files for Allure Awesome Report",
5
5
  "keywords": [
6
6
  "allure",
7
- "testing",
7
+ "html",
8
8
  "report",
9
- "html"
9
+ "testing"
10
10
  ],
11
- "repository": "https://github.com/allure-framework/allure3",
12
11
  "license": "Apache-2.0",
13
12
  "author": "Qameta Software",
13
+ "repository": "https://github.com/allure-framework/allure3",
14
14
  "type": "module",
15
15
  "types": "./types.d.ts",
16
16
  "scripts": {
@@ -22,20 +22,16 @@
22
22
  "build:prod:multi": "webpack --mode production",
23
23
  "build:dev:single": "SINGLE_FILE_MODE=1 webpack --mode development",
24
24
  "build:dev:multi": "webpack --mode development",
25
- "lint": "eslint --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
26
- "test": "vitest run"
25
+ "lint": "oxlint --import-plugin src test features stories",
26
+ "test": "vitest run",
27
+ "lint:fix": "oxlint --import-plugin --fix src test features stories"
27
28
  },
28
- "browserslist": [
29
- "last 1 version",
30
- "> 1%",
31
- "IE 11"
32
- ],
33
29
  "dependencies": {
34
- "@allurereport/charts-api": "3.3.1",
35
- "@allurereport/core-api": "3.3.1",
36
- "@allurereport/plugin-api": "3.3.1",
37
- "@allurereport/web-commons": "3.3.1",
38
- "@allurereport/web-components": "3.3.1",
30
+ "@allurereport/charts-api": "3.4.1",
31
+ "@allurereport/core-api": "3.4.1",
32
+ "@allurereport/plugin-api": "3.4.1",
33
+ "@allurereport/web-commons": "3.4.1",
34
+ "@allurereport/web-components": "3.4.1",
39
35
  "@preact/signals": "^2.6.1",
40
36
  "clsx": "^2.1.1",
41
37
  "d3-shape": "^3.2.0",
@@ -49,22 +45,17 @@
49
45
  "@babel/plugin-transform-react-jsx": "^7.27.1",
50
46
  "@babel/preset-env": "^7.27.2",
51
47
  "@babel/preset-typescript": "^7.27.1",
52
- "@eslint/js": "^9.10.0",
53
48
  "@floating-ui/dom": "^1.6.12",
54
49
  "@preact/compat": "^18.3.1",
55
50
  "@preact/preset-vite": "^2.10.2",
56
- "@stylistic/eslint-plugin": "^2.6.1",
57
51
  "@testing-library/jest-dom": "^6.1.5",
58
52
  "@testing-library/preact": "^3.2.3",
59
53
  "@testing-library/user-event": "^14.5.1",
60
54
  "@types/babel__core": "^7.20.5",
61
55
  "@types/d3-shape": "^3.1.6",
62
- "@types/eslint": "^8.56.11",
63
56
  "@types/md5": "^2.3.5",
64
57
  "@types/node": "^20.17.9",
65
58
  "@types/prismjs": "^1.26.5",
66
- "@typescript-eslint/eslint-plugin": "^8.0.0",
67
- "@typescript-eslint/parser": "^8.0.0",
68
59
  "@vitest/runner": "^3.2.4",
69
60
  "@vitest/snapshot": "^3.2.4",
70
61
  "allure-vitest": "^3.3.2",
@@ -73,19 +64,6 @@
73
64
  "babel-plugin-prismjs": "^2.1.0",
74
65
  "css-loader": "^7.1.2",
75
66
  "diff": "^8.0.3",
76
- "eslint": "^8.57.0",
77
- "eslint-config-preact": "^1.5.0",
78
- "eslint-config-prettier": "^9.1.0",
79
- "eslint-plugin-compat": "^6.0.1",
80
- "eslint-plugin-import": "^2.29.1",
81
- "eslint-plugin-jsdoc": "^50.0.0",
82
- "eslint-plugin-jsx-a11y": "^6.10.0",
83
- "eslint-plugin-n": "^17.10.1",
84
- "eslint-plugin-no-null": "^1.0.2",
85
- "eslint-plugin-preact": "^0.1.0",
86
- "eslint-plugin-prefer-arrow": "^1.2.3",
87
- "eslint-plugin-react": "^7.36.1",
88
- "eslint-plugin-react-hooks": "^4.6.2",
89
67
  "filesize": "^10.1.6",
90
68
  "fork-ts-checker-webpack-plugin": "^9.0.2",
91
69
  "globals": "^15.9.0",
@@ -102,12 +80,16 @@
102
80
  "svg-sprite-loader": "^6.0.11",
103
81
  "terser-webpack-plugin": "^5.3.14",
104
82
  "typescript": "^5.6.3",
105
- "typescript-eslint": "^8.6.0",
106
83
  "vite": "^5.4.21",
107
84
  "vitest": "^3.2.4",
108
85
  "webpack": "^5.99.9",
109
86
  "webpack-cli": "^5.1.4",
110
87
  "webpack-dev-server": "^5.2.2",
111
88
  "webpack-manifest-plugin": "^5.0.0"
112
- }
89
+ },
90
+ "browserslist": [
91
+ "last 1 version",
92
+ "> 1%",
93
+ "IE 11"
94
+ ]
113
95
  }
@@ -1,9 +1,11 @@
1
1
  import { Loadable, PageLoader } from "@allurereport/web-components";
2
+
2
3
  import MainReport from "@/components/MainReport";
3
4
  import TestResult from "@/components/TestResult";
4
5
  import { rootTabRoute, testResultRoute } from "@/stores/router";
5
6
  import { testResultStore } from "@/stores/testResults";
6
7
  import { treeStore } from "@/stores/tree";
8
+
7
9
  import * as styles from "./styles.scss";
8
10
 
9
11
  export type BaseLayoutProps = {
@@ -1,6 +1,8 @@
1
1
  import type { TestCategories } from "@allurereport/core-api";
2
2
  import type { FC } from "preact/compat";
3
+
3
4
  import { CategoryTreeItem } from "@/components/Categories/CategoryTreeItem";
5
+
4
6
  import * as styles from "./styles.scss";
5
7
 
6
8
  export const CategoriesTree: FC<{ store: TestCategories }> = ({ store }) => {
@@ -2,7 +2,9 @@ import type { CategoryNode, CategoryNodeProps, Statistic } from "@allurereport/c
2
2
  import { TreeHeader } from "@allurereport/web-components";
3
3
  import type { ComponentChildren } from "preact";
4
4
  import type { FC } from "preact/compat";
5
+
5
6
  import { createCategoriesStickyStyle } from "@/components/Categories/sticky";
7
+
6
8
  import * as styles from "./styles.scss";
7
9
 
8
10
  type CategoryHeaderItemProps = CategoryNodeProps & {
@@ -2,6 +2,7 @@ import type { CategoryNode, CategoryNodeProps, TestCategories } from "@allurerep
2
2
  import { IconButton, TreeItem, allureIcons } from "@allurereport/web-components";
3
3
  import type { FC } from "preact/compat";
4
4
  import { useState } from "preact/hooks";
5
+
5
6
  import { CategoryHeaderItem } from "@/components/Categories/CategoryHeaderItem";
6
7
  import { GroupTreeItem } from "@/components/Categories/GroupTreeItem";
7
8
  import { HistoryTreeItem } from "@/components/Categories/HistoryTreeItem";
@@ -13,6 +14,7 @@ import { useI18n } from "@/stores/locale";
13
14
  import { navigateToTestResult } from "@/stores/router";
14
15
  import { currentTrId } from "@/stores/testResult";
15
16
  import { collapsedTrees, toggleTree } from "@/stores/tree";
17
+
16
18
  import * as styles from "./styles.scss";
17
19
 
18
20
  type CategoryTreeItemProps = CategoryNodeProps & {
@@ -2,8 +2,10 @@ import type { CategoryNode, CategoryNodeProps, Statistic } from "@allurereport/c
2
2
  import { TreeHeader } from "@allurereport/web-components";
3
3
  import clsx from "clsx";
4
4
  import type { ComponentChildren, FC } from "preact/compat";
5
+
5
6
  import { createCategoriesStickyStyle } from "@/components/Categories/sticky";
6
7
  import { useI18n } from "@/stores";
8
+
7
9
  import * as styles from "./styles.scss";
8
10
 
9
11
  type GroupTreeItemProps = CategoryNodeProps & {
@@ -3,9 +3,11 @@ import { IconButton, TooltipWrapper, TreeHeader, allureIcons } from "@allurerepo
3
3
  import clsx from "clsx";
4
4
  import type { ComponentChildren } from "preact";
5
5
  import type { FC } from "preact/compat";
6
+
6
7
  import { createCategoriesStickyStyle } from "@/components/Categories/sticky";
7
8
  import { useI18n } from "@/stores/locale";
8
9
  import { copyToClipboard } from "@/utils/copyToClipboard";
10
+
9
11
  import * as styles from "./styles.scss";
10
12
 
11
13
  type HistoryTreeItemProps = CategoryNodeProps & {
@@ -10,9 +10,11 @@ import { SvgIcon, Text, TreeItemIcon, allureIcons } from "@allurereport/web-comp
10
10
  import clsx from "clsx";
11
11
  import type { ComponentChildren } from "preact";
12
12
  import type { FC } from "preact/compat";
13
+
13
14
  import { GroupTreeItem } from "@/components/Categories/GroupTreeItem";
14
15
  import { TrStatus } from "@/components/TestResult/TrStatus";
15
16
  import { useI18n } from "@/stores";
17
+
16
18
  import * as styles from "./styles.scss";
17
19
 
18
20
  type LabelTreeItemProps = CategoryNodeProps & {
@@ -6,8 +6,10 @@ import clsx from "clsx";
6
6
  import type { ComponentChildren } from "preact";
7
7
  import type { FC } from "preact/compat";
8
8
  import { useState } from "preact/hooks";
9
+
9
10
  import { createCategoriesStickyStyle } from "@/components/Categories/sticky";
10
11
  import { useI18n } from "@/stores/locale";
12
+
11
13
  import * as styles from "./styles.scss";
12
14
 
13
15
  type MessageTreeItemProps = CategoryNodeProps & {
@@ -1,8 +1,10 @@
1
1
  import type { CategoryNode, CategoryNodeProps, Statistic } from "@allurereport/core-api";
2
2
  import type { ComponentChildren } from "preact";
3
3
  import type { FC } from "preact/compat";
4
+
4
5
  import { GroupTreeItem } from "@/components/Categories/GroupTreeItem";
5
6
  import { TrSeverity } from "@/components/TestResult/TrSeverity";
7
+
6
8
  import * as styles from "./styles.scss";
7
9
 
8
10
  type SeverityTreeItemProps = CategoryNodeProps & {
@@ -23,9 +23,11 @@ import {
23
23
  } from "@allurereport/web-components";
24
24
  import { computed } from "@preact/signals";
25
25
  import { useEffect } from "preact/hooks";
26
+
26
27
  import { chartsStore, fetchChartsData } from "@/stores/chart";
27
28
  import { currentEnvironment } from "@/stores/env";
28
29
  import { useI18n } from "@/stores/locale";
30
+
29
31
  import * as styles from "./styles.scss";
30
32
 
31
33
  const currentTheme = computed(() => themeStore.value.current);
@@ -98,6 +100,7 @@ const getChartWidgetByType = (
98
100
  data={chartData.data}
99
101
  keys={chartData.keys}
100
102
  i18n={(key, props = {}) => t(`stabilityDistribution.${key}`, props)}
103
+ threshold={chartData.threshold}
101
104
  />
102
105
  );
103
106
  }
@@ -1,12 +1,57 @@
1
- import { DropdownButton, Menu, SvgIcon, Text, allureIcons } from "@allurereport/web-components";
1
+ import {
2
+ DropdownButton,
3
+ Menu,
4
+ SvgIcon,
5
+ Text,
6
+ TooltipWrapper,
7
+ allureIcons,
8
+ useElementTruncation,
9
+ } from "@allurereport/web-components";
10
+ import { useEffect, useRef, useState } from "preact/hooks";
11
+
2
12
  import { useI18n } from "@/stores";
3
- import { currentEnvironment, environmentsStore, setCurrentEnvironment } from "@/stores/env";
13
+ import { currentEnvironment, environmentNameById, environmentsStore, setCurrentEnvironment } from "@/stores/env";
14
+
4
15
  import * as styles from "./styles.scss";
5
16
 
17
+ const isOverflowing = (element: HTMLElement) => element.scrollWidth > element.clientWidth;
18
+
19
+ const EnvironmentMenuItemText = ({ value }: { value: string }) => {
20
+ const textRef = useRef<HTMLSpanElement>(null);
21
+ const [isTruncated, setIsTruncated] = useState(false);
22
+
23
+ useEffect(() => {
24
+ const element = textRef.current;
25
+
26
+ if (!element) {
27
+ return;
28
+ }
29
+
30
+ setIsTruncated(isOverflowing(element));
31
+ }, [value]);
32
+
33
+ const textNode = (
34
+ <span ref={textRef} className={styles["environment-picker-item-text"]}>
35
+ {value}
36
+ </span>
37
+ );
38
+
39
+ if (!isTruncated) {
40
+ return textNode;
41
+ }
42
+
43
+ return <TooltipWrapper tooltipText={value}>{textNode}</TooltipWrapper>;
44
+ };
45
+
6
46
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7
47
  export const EnvironmentPicker = () => {
8
48
  const { t } = useI18n("environments");
9
- const environment = currentEnvironment.value;
49
+ const environmentId = currentEnvironment.value;
50
+ const selectedEnvironmentLabel = environmentId ? environmentNameById(environmentId) : t("all");
51
+ const { ref: selectedTextRef, isTruncated: isSelectedValueTruncated } = useElementTruncation<HTMLSpanElement>([
52
+ selectedEnvironmentLabel,
53
+ ]);
54
+
10
55
  const handleSelect = (selectedOption: string) => {
11
56
  setCurrentEnvironment(selectedOption);
12
57
  };
@@ -24,33 +69,48 @@ export const EnvironmentPicker = () => {
24
69
  </Text>
25
70
  <Menu
26
71
  size="s"
27
- menuTrigger={({ isOpened, onClick }) => (
28
- <DropdownButton
29
- style="ghost"
30
- size="s"
31
- text={environment || t("all")}
32
- isExpanded={isOpened}
33
- data-testid={"environment-picker-button"}
34
- onClick={onClick}
35
- />
36
- )}
72
+ menuTrigger={({ isOpened, onClick }) => {
73
+ const button = (
74
+ <DropdownButton
75
+ style="ghost"
76
+ size="s"
77
+ text={selectedEnvironmentLabel}
78
+ textRef={selectedTextRef}
79
+ isExpanded={isOpened}
80
+ isTextTruncated
81
+ className={styles["environment-picker-button"]}
82
+ data-testid={"environment-picker-button"}
83
+ onClick={onClick}
84
+ />
85
+ );
86
+
87
+ if (isOpened || !isSelectedValueTruncated) {
88
+ return button;
89
+ }
90
+
91
+ return (
92
+ <TooltipWrapper tooltipText={selectedEnvironmentLabel} data-testid="environment-picker-selected-tooltip">
93
+ {button}
94
+ </TooltipWrapper>
95
+ );
96
+ }}
37
97
  >
38
98
  <Menu.Section>
39
99
  <Menu.ItemWithCheckmark
40
100
  data-testid={"environment-picker-item"}
41
101
  onClick={() => handleSelect("")}
42
- isChecked={!environment}
102
+ isChecked={!environmentId}
43
103
  >
44
104
  {t("all")}
45
105
  </Menu.ItemWithCheckmark>
46
106
  {environmentsStore.value.data.map((env) => (
47
107
  <Menu.ItemWithCheckmark
48
108
  data-testid={"environment-picker-item"}
49
- onClick={() => handleSelect(env)}
50
- key={env}
51
- isChecked={env === environment}
109
+ onClick={() => handleSelect(env.id)}
110
+ key={env.id}
111
+ isChecked={env.id === environmentId}
52
112
  >
53
- {env}
113
+ <EnvironmentMenuItemText value={env.name} />
54
114
  </Menu.ItemWithCheckmark>
55
115
  ))}
56
116
  </Menu.Section>
@@ -2,8 +2,27 @@
2
2
  display: flex;
3
3
  align-items: center;
4
4
  gap: 0 4px;
5
+ min-width: 0;
6
+
7
+ > :last-child {
8
+ min-width: 0;
9
+ max-width: 100%;
10
+ flex: 1 1 auto;
11
+ }
5
12
  }
6
13
 
7
14
  .environment-picker-label {
8
15
  text-transform: capitalize;
9
16
  }
17
+
18
+ .environment-picker-button {
19
+ max-width: 100%;
20
+ }
21
+
22
+ .environment-picker-item-text {
23
+ display: block;
24
+ max-width: 140px;
25
+ white-space: nowrap;
26
+ overflow: hidden;
27
+ text-overflow: ellipsis;
28
+ }
@@ -1,4 +1,5 @@
1
1
  import { ReportLogoFull, Text } from "@allurereport/web-components";
2
+
2
3
  import * as styles from "./styles.scss";
3
4
 
4
5
  export const FooterLogo = () => {
@@ -2,7 +2,9 @@ import { getReportOptions } from "@allurereport/web-commons";
2
2
  import { Text } from "@allurereport/web-components";
3
3
  import { useState } from "preact/hooks";
4
4
  import type { AwesomeReportOptions } from "types";
5
+
5
6
  import { currentLocaleIso } from "@/stores";
7
+
6
8
  import * as styles from "./styles.scss";
7
9
 
8
10
  export const FooterVersion = () => {
@@ -1,9 +1,11 @@
1
1
  import type { ClassValue } from "clsx";
2
2
  import { clsx } from "clsx";
3
- import * as styles from "@/components/BaseLayout/styles.scss";
3
+
4
4
  import { FooterLogo } from "@/components/Footer/FooterLogo";
5
5
  import { FooterVersion } from "@/components/Footer/FooterVersion";
6
6
 
7
+ import * as styles from "@/components/BaseLayout/styles.scss";
8
+
7
9
  interface FooterProps {
8
10
  className?: ClassValue;
9
11
  }
@@ -1,9 +1,11 @@
1
- import { CiDescriptor, CiType } from "@allurereport/core-api";
1
+ import { CiDescriptor, CiType, sanitizeExternalUrl } from "@allurereport/core-api";
2
2
  import { getReportOptions } from "@allurereport/web-commons";
3
3
  import { SvgIcon, Text, allureIcons } from "@allurereport/web-components";
4
4
  import type { ClassValue } from "clsx";
5
5
  import clsx from "clsx";
6
+
6
7
  import type { AwesomeReportOptions } from "../../../../types";
8
+
7
9
  import * as styles from "./styles.scss";
8
10
 
9
11
  interface CiInfoProps {
@@ -50,16 +52,28 @@ export const CiInfo = ({ className }: CiInfoProps) => {
50
52
  }
51
53
 
52
54
  const link = ci.pullRequestUrl || ci.jobRunUrl || ci.jobUrl;
55
+ const safeLink = sanitizeExternalUrl(link);
53
56
  const label = ci.pullRequestName || ci.jobRunName || ci.jobName || link;
54
57
 
55
58
  if (!link) {
56
59
  return null;
57
60
  }
58
61
 
62
+ if (!safeLink) {
63
+ return (
64
+ <span className={clsx(styles["ci-info"], className)}>
65
+ <CiIcon type={ci.type} />
66
+ <Text type="paragraph" size="m" bold>
67
+ {label}
68
+ </Text>
69
+ </span>
70
+ );
71
+ }
72
+
59
73
  return (
60
- <a className={clsx(styles["ci-info"], className)} href={link} target="_blank">
74
+ <a className={clsx(styles["ci-info"], className)} href={safeLink} target="_blank" rel="noopener noreferrer">
61
75
  <CiIcon type={ci.type} />
62
- <Text type={"paragraph"} size={"m"} bold>
76
+ <Text type="paragraph" size="m" bold>
63
77
  {label}
64
78
  </Text>
65
79
  </a>
@@ -1,13 +1,16 @@
1
1
  import { computed } from "@preact/signals";
2
2
  import type { ClassValue } from "clsx";
3
3
  import clsx from "clsx";
4
+
4
5
  import { HeaderControls } from "@/components/HeaderControls";
5
6
  import { SectionPicker } from "@/components/SectionPicker";
6
7
  import { TrBreadcrumbs } from "@/components/TestResult/TrHeader/TrBreadcrumbs";
7
8
  import { rootTabRoute, testResultRoute } from "@/stores/router";
8
9
  import { currentTrId } from "@/stores/testResult";
9
10
  import { testResultStore } from "@/stores/testResults";
11
+
10
12
  import { CiInfo } from "./CiInfo";
13
+
11
14
  import * as styles from "./styles.scss";
12
15
 
13
16
  interface HeaderProps {
@@ -31,4 +31,5 @@
31
31
  display: flex;
32
32
  gap: 4px;
33
33
  align-items: center;
34
+ min-width: 0;
34
35
  }
@@ -1,6 +1,7 @@
1
1
  import { themeStore, toggleUserTheme } from "@allurereport/web-commons";
2
2
  import { LanguagePicker, ThemeButton } from "@allurereport/web-components";
3
3
  import { computed } from "@preact/signals";
4
+
4
5
  import { EnvironmentPicker } from "@/components/EnvironmentPicker";
5
6
  import ToggleLayout from "@/components/ToggleLayout";
6
7
  import { currentLocale, setLocale } from "@/stores/locale";
@@ -1,6 +1,7 @@
1
1
  import { Counter, Loadable } from "@allurereport/web-components";
2
2
  import clsx from "clsx";
3
3
  import { useEffect } from "preact/hooks";
4
+
4
5
  import { NavTab, NavTabs, NavTabsList, useNavTabsContext } from "@/components/NavTabs";
5
6
  import { ReportBody } from "@/components/ReportBody";
6
7
  import { ReportCategories } from "@/components/ReportCategories";
@@ -22,7 +23,9 @@ import {
22
23
  rootTabRoute,
23
24
  } from "@/stores/router";
24
25
  import { currentTrId, trCurrentTab } from "@/stores/testResult";
26
+
25
27
  import { ReportQualityGateResults } from "../ReportQualityGateResults";
28
+
26
29
  import * as styles from "./styles.scss";
27
30
 
28
31
  export enum ReportRootTab {
@@ -2,12 +2,14 @@ import { Button, ButtonLink, Menu, Text, allureIcons } from "@allurereport/web-c
2
2
  import clsx from "clsx";
3
3
  import type { FunctionalComponent } from "preact";
4
4
  import { useState } from "preact/hooks";
5
+
5
6
  import { MetadataButton } from "@/components/MetadataButton";
6
7
  import type { MetadataProps } from "@/components/ReportMetadata";
7
8
  import { useI18n } from "@/stores/locale";
8
9
  import { getTagsFilterUrl } from "@/stores/treeFilters/utils";
9
10
  import { copyToClipboard } from "@/utils/copyToClipboard";
10
11
  import { parseOwnerAddress } from "@/utils/ownerAddress";
12
+
11
13
  import * as styles from "./styles.scss";
12
14
 
13
15
  export const MetadataList: FunctionalComponent<MetadataProps & { columns?: number }> = ({
@@ -1,13 +1,16 @@
1
- import { ArrowButton, Counter, Text } from "@allurereport/web-components";
1
+ import { ArrowButton, Counter, Text, TooltipWrapper, useElementTruncation } from "@allurereport/web-components";
2
2
  import clsx from "clsx";
3
- import type { FunctionalComponent } from "preact";
3
+ import type { ComponentChildren, FunctionalComponent } from "preact";
4
+
4
5
  import * as styles from "./styles.scss";
5
6
 
6
7
  interface MetadataButtonProps {
7
8
  isOpened?: boolean;
8
9
  setIsOpen: (isOpen: boolean) => void;
9
10
  counter?: number;
10
- title?: string;
11
+ title?: ComponentChildren;
12
+ titleTooltipText?: string;
13
+ truncateTitle?: boolean;
11
14
  }
12
15
 
13
16
  export const MetadataButton: FunctionalComponent<MetadataButtonProps> = ({
@@ -15,18 +18,34 @@ export const MetadataButton: FunctionalComponent<MetadataButtonProps> = ({
15
18
  setIsOpen,
16
19
  counter,
17
20
  title,
21
+ titleTooltipText,
22
+ truncateTitle = false,
18
23
  ...rest
19
24
  }) => {
20
- return (
25
+ const { ref: titleRef, isTruncated: isTitleTruncated } = useElementTruncation<HTMLSpanElement>([title], {
26
+ observeResize: truncateTitle,
27
+ });
28
+
29
+ const titleNode = (
30
+ <Text size={"m"} bold className={clsx(truncateTitle && styles["report-metadata-title-container"])}>
31
+ <span ref={titleRef} className={clsx(truncateTitle && styles["report-metadata-title-truncated"])}>
32
+ {title}
33
+ </span>
34
+ </Text>
35
+ );
36
+
37
+ const buttonNode = (
21
38
  <button
22
39
  {...rest}
23
- className={clsx(styles["report-metadata-header"], isOpened && styles["report-metadata-header-opened"])}
40
+ className={clsx(
41
+ styles["report-metadata-header"],
42
+ truncateTitle && styles["report-metadata-header-truncated"],
43
+ isOpened && styles["report-metadata-header-opened"],
44
+ )}
24
45
  type={"button"}
25
46
  onClick={() => setIsOpen(!isOpened)}
26
47
  >
27
- <Text size={"m"} bold>
28
- {title}
29
- </Text>
48
+ {titleNode}
30
49
  {!!counter && <Counter count={counter} size="s" />}
31
50
  <ArrowButton
32
51
  isOpened={isOpened}
@@ -37,4 +56,12 @@ export const MetadataButton: FunctionalComponent<MetadataButtonProps> = ({
37
56
  />
38
57
  </button>
39
58
  );
59
+
60
+ const shouldRenderTooltip = !!titleTooltipText && (!truncateTitle || isTitleTruncated);
61
+
62
+ if (shouldRenderTooltip) {
63
+ return <TooltipWrapper tooltipText={titleTooltipText}>{buttonNode}</TooltipWrapper>;
64
+ }
65
+
66
+ return buttonNode;
40
67
  };