@allurereport/web-classic 3.0.0-beta.10

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 (241) hide show
  1. package/.babelrc--old.cjs +18 -0
  2. package/.babelrc.js +46 -0
  3. package/.eslintrc--old.cjs +125 -0
  4. package/.eslintrc.cjs +22 -0
  5. package/README.md +27 -0
  6. package/dist/multi/10.app-970f027d.js +1 -0
  7. package/dist/multi/222.app-970f027d.js +1 -0
  8. package/dist/multi/26.app-970f027d.js +1 -0
  9. package/dist/multi/302.app-970f027d.js +1 -0
  10. package/dist/multi/304.app-970f027d.js +1 -0
  11. package/dist/multi/369.app-970f027d.js +1 -0
  12. package/dist/multi/389.app-970f027d.js +1 -0
  13. package/dist/multi/498.app-970f027d.js +1 -0
  14. package/dist/multi/60.app-970f027d.js +1 -0
  15. package/dist/multi/643.app-970f027d.js +1 -0
  16. package/dist/multi/671.app-970f027d.js +1 -0
  17. package/dist/multi/725.app-970f027d.js +1 -0
  18. package/dist/multi/770.app-970f027d.js +1 -0
  19. package/dist/multi/848.app-970f027d.js +1 -0
  20. package/dist/multi/853.app-970f027d.js +1 -0
  21. package/dist/multi/872.app-970f027d.js +1 -0
  22. package/dist/multi/895.app-970f027d.js +1 -0
  23. package/dist/multi/920.app-970f027d.js +1 -0
  24. package/dist/multi/979.app-970f027d.js +1 -0
  25. package/dist/multi/991.app-970f027d.js +1 -0
  26. package/dist/multi/JetBrainsMono_vf-9e9649b6..woff2 +0 -0
  27. package/dist/multi/JetBrainsMono_vf-b9a9c326..woff +0 -0
  28. package/dist/multi/app-970f027d.js +2 -0
  29. package/dist/multi/app-970f027d.js.LICENSE.txt +25 -0
  30. package/dist/multi/manifest.json +28 -0
  31. package/dist/multi/pt-root-ui_vf-22fe60ca..woff +0 -0
  32. package/dist/multi/pt-root-ui_vf-9d251e8b..woff2 +0 -0
  33. package/dist/multi/styles-970f027d.css +283 -0
  34. package/dist/single/app-2babff54.js +2 -0
  35. package/dist/single/app-2babff54.js.LICENSE.txt +25 -0
  36. package/dist/single/manifest.json +3 -0
  37. package/package--old.json +106 -0
  38. package/package.json +107 -0
  39. package/postcss.config.js +5 -0
  40. package/src/assets/scss/_common.scss +142 -0
  41. package/src/assets/scss/code.scss +71 -0
  42. package/src/assets/scss/day.scss +51 -0
  43. package/src/assets/scss/fonts.scss +3 -0
  44. package/src/assets/scss/index.scss +9 -0
  45. package/src/assets/scss/night.scss +61 -0
  46. package/src/assets/scss/palette.scss +393 -0
  47. package/src/assets/scss/theme.scss +117 -0
  48. package/src/assets/scss/typography.scss +218 -0
  49. package/src/assets/scss/vars.scss +8 -0
  50. package/src/components/ArrowButton/index.tsx +36 -0
  51. package/src/components/ArrowButton/styles.scss +35 -0
  52. package/src/components/BaseLayout/index.tsx +23 -0
  53. package/src/components/BaseLayout/styles.scss +63 -0
  54. package/src/components/Behaviors/BehaviorsList.tsx +67 -0
  55. package/src/components/Behaviors/index.tsx +60 -0
  56. package/src/components/Behaviors/styles.scss +196 -0
  57. package/src/components/Categories/CategoriesList.tsx +67 -0
  58. package/src/components/Categories/index.tsx +60 -0
  59. package/src/components/Categories/styles.scss +196 -0
  60. package/src/components/Footer/FooterLogo.tsx +16 -0
  61. package/src/components/Footer/FooterVersion.tsx +33 -0
  62. package/src/components/Footer/index.tsx +13 -0
  63. package/src/components/Footer/styles.scss +14 -0
  64. package/src/components/Graphs/index.tsx +2 -0
  65. package/src/components/Header/index.tsx +14 -0
  66. package/src/components/Header/styles.scss +26 -0
  67. package/src/components/HeaderActions/Filters.tsx +90 -0
  68. package/src/components/HeaderActions/HeaderActions.tsx +59 -0
  69. package/src/components/HeaderActions/SortBy.tsx +128 -0
  70. package/src/components/HeaderActions/styles.scss +82 -0
  71. package/src/components/LanguagePicker/index.tsx +41 -0
  72. package/src/components/LanguagePicker/styles.scss +3 -0
  73. package/src/components/MainReport/index.tsx +19 -0
  74. package/src/components/Metadata/index.tsx +121 -0
  75. package/src/components/Metadata/styles.scss +146 -0
  76. package/src/components/MetadataButton/index.tsx +32 -0
  77. package/src/components/MetadataButton/styles.scss +53 -0
  78. package/src/components/Modal/ModalView.hbs +13 -0
  79. package/src/components/Modal/ModalView.js +43 -0
  80. package/src/components/Modal/index.tsx +174 -0
  81. package/src/components/Modal/styles.scss +126 -0
  82. package/src/components/Overview/index.tsx +9 -0
  83. package/src/components/Packages/PackagesList.tsx +67 -0
  84. package/src/components/Packages/index.tsx +59 -0
  85. package/src/components/Packages/styles.scss +196 -0
  86. package/src/components/ReportBody/Filters.tsx +92 -0
  87. package/src/components/ReportBody/HeaderActions.tsx +21 -0
  88. package/src/components/ReportBody/SortBy.tsx +132 -0
  89. package/src/components/ReportBody/context.tsx +106 -0
  90. package/src/components/ReportBody/index.tsx +71 -0
  91. package/src/components/ReportBody/styles.scss +64 -0
  92. package/src/components/ReportHeader/ReportHeaderLabelList.tsx +12 -0
  93. package/src/components/ReportHeader/ReportHeaderLogo.tsx +10 -0
  94. package/src/components/ReportHeader/ReportHeaderPie.tsx +14 -0
  95. package/src/components/ReportHeader/index.tsx +33 -0
  96. package/src/components/ReportHeader/styles.scss +49 -0
  97. package/src/components/ReportLogo/index.tsx +16 -0
  98. package/src/components/ReportLogo/styles.scss +20 -0
  99. package/src/components/ReportLogoFull/index.tsx +20 -0
  100. package/src/components/ReportLogoFull/styles.scss +7 -0
  101. package/src/components/ReportMetadata/MetadataItem.tsx +45 -0
  102. package/src/components/ReportMetadata/MetadataSummary.tsx +81 -0
  103. package/src/components/ReportMetadata/MetadataTestType.tsx +16 -0
  104. package/src/components/ReportMetadata/MetadataWithIcon.tsx +21 -0
  105. package/src/components/ReportMetadata/index.tsx +46 -0
  106. package/src/components/ReportMetadata/styles.scss +99 -0
  107. package/src/components/SideBySide/index.tsx +54 -0
  108. package/src/components/SideBySide/styles.scss +59 -0
  109. package/src/components/SideNav/SideNav.tsx +78 -0
  110. package/src/components/SideNav/SideNavView.hbs +39 -0
  111. package/src/components/SideNav/SideNavView.js +81 -0
  112. package/src/components/SideNav/styles.scss +126 -0
  113. package/src/components/Suites/index.tsx +62 -0
  114. package/src/components/Suites/styles.scss +10 -0
  115. package/src/components/Tabs/index.tsx +33 -0
  116. package/src/components/Tabs/styles.scss +56 -0
  117. package/src/components/TestResult/TestResultAttachmentsView/index.tsx +27 -0
  118. package/src/components/TestResult/TestResultAttachmentsView/styles.scss +12 -0
  119. package/src/components/TestResult/TestResultDescription/index.tsx +27 -0
  120. package/src/components/TestResult/TestResultDescription/styles.scss +12 -0
  121. package/src/components/TestResult/TestResultDropdown/index.tsx +23 -0
  122. package/src/components/TestResult/TestResultDropdown/styles.scss +34 -0
  123. package/src/components/TestResult/TestResultEmpty/index.tsx +33 -0
  124. package/src/components/TestResult/TestResultEmpty/styles.scss +25 -0
  125. package/src/components/TestResult/TestResultError/index.tsx +48 -0
  126. package/src/components/TestResult/TestResultError/styles.scss +51 -0
  127. package/src/components/TestResult/TestResultHeader/index.tsx +53 -0
  128. package/src/components/TestResult/TestResultHeader/styles.scss +43 -0
  129. package/src/components/TestResult/TestResultHistory/TestResultHistoryItem.tsx +67 -0
  130. package/src/components/TestResult/TestResultHistory/index.tsx +26 -0
  131. package/src/components/TestResult/TestResultHistory/styles.scss +63 -0
  132. package/src/components/TestResult/TestResultInfo/TestResultInfoStatuses.tsx +30 -0
  133. package/src/components/TestResult/TestResultInfo/index.tsx +79 -0
  134. package/src/components/TestResult/TestResultInfo/styles.scss +50 -0
  135. package/src/components/TestResult/TestResultLinks/index.tsx +56 -0
  136. package/src/components/TestResult/TestResultLinks/styles.scss +30 -0
  137. package/src/components/TestResult/TestResultMetadata/index.tsx +27 -0
  138. package/src/components/TestResult/TestResultMetadata/styles.scss +8 -0
  139. package/src/components/TestResult/TestResultNavigation/index.tsx +80 -0
  140. package/src/components/TestResult/TestResultNavigation/styles.scss +48 -0
  141. package/src/components/TestResult/TestResultOverview.tsx +40 -0
  142. package/src/components/TestResult/TestResultParameters/index.tsx +30 -0
  143. package/src/components/TestResult/TestResultParameters/styles.scss +8 -0
  144. package/src/components/TestResult/TestResultPrevStatuses/index.tsx +49 -0
  145. package/src/components/TestResult/TestResultPrevStatuses/styles.scss +57 -0
  146. package/src/components/TestResult/TestResultRetriesView/TestResultRetriesItem.tsx +49 -0
  147. package/src/components/TestResult/TestResultRetriesView/index.tsx +20 -0
  148. package/src/components/TestResult/TestResultRetriesView/styles.scss +69 -0
  149. package/src/components/TestResult/TestResultSetup/index.tsx +49 -0
  150. package/src/components/TestResult/TestResultSeverity/index.tsx +27 -0
  151. package/src/components/TestResult/TestResultSeverity/styles.scss +29 -0
  152. package/src/components/TestResult/TestResultStatus/index.tsx +26 -0
  153. package/src/components/TestResult/TestResultStatus/styles.scss +36 -0
  154. package/src/components/TestResult/TestResultSteps/HtmlAttachmentPreview.tsx +12 -0
  155. package/src/components/TestResult/TestResultSteps/attachment.tsx +68 -0
  156. package/src/components/TestResult/TestResultSteps/attachmentCode.tsx +20 -0
  157. package/src/components/TestResult/TestResultSteps/attachmentImage.tsx +32 -0
  158. package/src/components/TestResult/TestResultSteps/attachmentVideo.tsx +15 -0
  159. package/src/components/TestResult/TestResultSteps/index.tsx +49 -0
  160. package/src/components/TestResult/TestResultSteps/styles.scss +225 -0
  161. package/src/components/TestResult/TestResultSteps/testResultAttachment.tsx +77 -0
  162. package/src/components/TestResult/TestResultSteps/testResultAttachmentInfo.tsx +83 -0
  163. package/src/components/TestResult/TestResultSteps/testResultStep.tsx +78 -0
  164. package/src/components/TestResult/TestResultSteps/testResultStepInfo.tsx +30 -0
  165. package/src/components/TestResult/TestResultSteps/wrongAttachment.tsx +8 -0
  166. package/src/components/TestResult/TestResultTabs/index.tsx +59 -0
  167. package/src/components/TestResult/TestResultTabs/styles.scss +76 -0
  168. package/src/components/TestResult/TestResultTeardown/index.tsx +49 -0
  169. package/src/components/TestResult/TestResultView.hbs +32 -0
  170. package/src/components/TestResult/TestResultView.js +90 -0
  171. package/src/components/TestResult/index.tsx +54 -0
  172. package/src/components/TestResult/styles.scss +29 -0
  173. package/src/components/TestResultView/index.tsx +31 -0
  174. package/src/components/ThemeButton/ThemeButton.tsx +20 -0
  175. package/src/components/Timeline/index.tsx +2 -0
  176. package/src/components/Tree/Tree.tsx +76 -0
  177. package/src/components/Tree/TreeHeader.tsx +82 -0
  178. package/src/components/Tree/TreeItem.tsx +49 -0
  179. package/src/components/Tree/TreeItemIcon.tsx +32 -0
  180. package/src/components/Tree/index.tsx +60 -0
  181. package/src/components/Tree/styles.scss +185 -0
  182. package/src/favicon.ico +0 -0
  183. package/src/index.html +40 -0
  184. package/src/index.js +52 -0
  185. package/src/index.tsx +60 -0
  186. package/src/mixins.scss +128 -0
  187. package/src/rtl.scss +19 -0
  188. package/src/stores/behaviors.ts +127 -0
  189. package/src/stores/categories.ts +127 -0
  190. package/src/stores/chart.ts +32 -0
  191. package/src/stores/envInfo.ts +34 -0
  192. package/src/stores/index.ts +4 -0
  193. package/src/stores/locale.ts +83 -0
  194. package/src/stores/packages.ts +127 -0
  195. package/src/stores/router.ts +55 -0
  196. package/src/stores/stats.ts +36 -0
  197. package/src/stores/tabs.ts +7 -0
  198. package/src/stores/testResults.ts +66 -0
  199. package/src/stores/theme.ts +33 -0
  200. package/src/stores/tree.ts +127 -0
  201. package/src/stores/types.ts +5 -0
  202. package/src/styles.scss +91 -0
  203. package/src/translations/am.json +127 -0
  204. package/src/translations/az.json +127 -0
  205. package/src/translations/br.json +214 -0
  206. package/src/translations/constants.ts +124 -0
  207. package/src/translations/de.json +127 -0
  208. package/src/translations/en.json +128 -0
  209. package/src/translations/es.json +118 -0
  210. package/src/translations/fr.json +118 -0
  211. package/src/translations/he.json +118 -0
  212. package/src/translations/isv.json +216 -0
  213. package/src/translations/it.json +118 -0
  214. package/src/translations/ja.json +118 -0
  215. package/src/translations/ka.json +118 -0
  216. package/src/translations/kr.json +118 -0
  217. package/src/translations/nl.json +118 -0
  218. package/src/translations/pl.json +116 -0
  219. package/src/translations/pt.json +118 -0
  220. package/src/translations/ru.json +116 -0
  221. package/src/translations/sv.json +118 -0
  222. package/src/translations/tr.json +118 -0
  223. package/src/translations/zh.json +118 -0
  224. package/src/types/globals.d.ts +13 -0
  225. package/src/types/window.d.ts +8 -0
  226. package/src/utils/attachments.ts +156 -0
  227. package/src/utils/capitalize.ts +6 -0
  228. package/src/utils/copyToClipboard.ts +16 -0
  229. package/src/utils/isMac.ts +8 -0
  230. package/src/utils/navigate.ts +7 -0
  231. package/src/utils/statuses.js +1 -0
  232. package/src/utils/statuses.ts +55 -0
  233. package/src/utils/time.ts +17 -0
  234. package/src/utils/treeFilters.ts +139 -0
  235. package/src/variables.scss +71 -0
  236. package/test/utils/treeFilters.test.ts +448 -0
  237. package/tsconfig.json +25 -0
  238. package/types.d.ts +85 -0
  239. package/vitest.config.ts +18 -0
  240. package/webpack.config--old.js +127 -0
  241. package/webpack.config.js +108 -0
@@ -0,0 +1,7 @@
1
+ export const navigateTo = (path: string) => {
2
+ globalThis.location.hash = path;
3
+ };
4
+
5
+ export const openInNewTab = (path: string) => {
6
+ window.open(`#${path}`, "_blank");
7
+ };
@@ -0,0 +1 @@
1
+ export const values = ["failed", "broken", "passed", "skipped", "unknown"];
@@ -0,0 +1,55 @@
1
+ import type { DefaultTreeGroup, DefaultTreeLeaf, TestStatus, TreeData } from "@allurereport/core-api";
2
+
3
+ export type Stats = Record<TestStatus, number> & { total?: number };
4
+
5
+ const emptyStat: Stats = { failed: 0, broken: 0, passed: 0, skipped: 0, unknown: 0 };
6
+
7
+ const statisticByIds = (tree: TreeData<DefaultTreeLeaf, DefaultTreeGroup>, ids: string[]): Stats => {
8
+ return ids
9
+ .map((id) => tree.leavesById[id])
10
+ .filter((v) => v)
11
+ .reduce(
12
+ (prev, current) => {
13
+ prev[current.status]++;
14
+ return prev;
15
+ },
16
+ { ...emptyStat },
17
+ );
18
+ };
19
+
20
+ const mergeStats = (stat1: Stats, stat2: Stats): Stats => {
21
+ Object.keys(stat1).forEach((key) => {
22
+ stat1[key as TestStatus] += stat2[key as TestStatus];
23
+ });
24
+ return stat1;
25
+ };
26
+
27
+ export const getGroupStatistics = (
28
+ tree: TreeData<DefaultTreeLeaf, DefaultTreeGroup>,
29
+ groupId: string,
30
+ statusFilter?: string,
31
+ ): Stats => {
32
+ const group = tree.groupsById[groupId];
33
+ let stat: Stats = { ...emptyStat };
34
+
35
+ if (group?.leaves?.length) {
36
+ stat = mergeStats(stat, statisticByIds(tree, group.leaves));
37
+ }
38
+
39
+ if (group?.groups?.length) {
40
+ for (const subGroupId of group.groups) {
41
+ const subGroupStat = getGroupStatistics(tree, subGroupId, statusFilter);
42
+ stat = mergeStats(stat, subGroupStat);
43
+ }
44
+ }
45
+
46
+ return stat;
47
+ };
48
+
49
+ export const getStatistics = (tree: TreeData<DefaultTreeLeaf, DefaultTreeGroup>) =>
50
+ tree.root.groups
51
+ ?.map((groupId) => {
52
+ const stat = getGroupStatistics(tree, groupId);
53
+ return { name: tree.groupsById[groupId].name, statistic: stat };
54
+ })
55
+ ?.sort((a, b) => a.name.localeCompare(b.name)) ?? [];
@@ -0,0 +1,17 @@
1
+ import { useI18n } from "@/stores/locale";
2
+
3
+ const defaultOptions: Intl.DateTimeFormatOptions = {
4
+ month: "numeric",
5
+ day: "numeric",
6
+ year: "numeric",
7
+ hour: "numeric",
8
+ minute: "numeric",
9
+ second: "numeric",
10
+ hour12: false,
11
+ };
12
+
13
+ export const timestampToDate = (timestamp: number, options = defaultOptions) => {
14
+ const date = new Date(timestamp);
15
+ const { t } = useI18n("ui");
16
+ return new Intl.DateTimeFormat("en-US", options).format(date).replace(",", ` ${t("at")}`);
17
+ };
@@ -0,0 +1,139 @@
1
+ import type { Comparator, DefaultTreeGroup, Statistic, TestStatus, TreeLeaf } from "@allurereport/core-api";
2
+ import {
3
+ alphabetically,
4
+ andThen,
5
+ byStatistic,
6
+ byStatus,
7
+ compareBy,
8
+ emptyStatistic,
9
+ incrementStatistic,
10
+ mergeStatistic,
11
+ ordinal,
12
+ reverse,
13
+ } from "@allurereport/core-api";
14
+ import type { TreeFiltersState, TreeSortBy } from "@/stores/tree";
15
+ import type { AwesomeRecursiveTree, AwesomeTree, AwesomeTreeGroup, AwesomeTreeLeaf } from "../../types";
16
+
17
+ export const isIncluded = (leaf: TreeLeaf<AwesomeTreeLeaf>, filterOptions: TreeFiltersState) => {
18
+ const queryMatched = !filterOptions?.query || leaf.name.toLowerCase().includes(filterOptions.query.toLowerCase());
19
+ const statusMatched =
20
+ !filterOptions?.status || filterOptions?.status === "total" || leaf.status === filterOptions.status;
21
+ const flakyMatched = !filterOptions?.filter?.flaky || leaf.flaky;
22
+ const retryMatched = !filterOptions?.filter?.retry || leaf.retry;
23
+ // TODO: at this moment we don't have a new field implementation even in the generator
24
+ // const newMatched = !filterOptions?.filter?.new || leaf.new;
25
+
26
+ return [queryMatched, statusMatched, flakyMatched, retryMatched].every(Boolean);
27
+ };
28
+
29
+ const leafComparatorByTreeSortBy = (sortBy: TreeSortBy): Comparator<TreeLeaf<AwesomeTreeLeaf>> => {
30
+ const typedCompareBy = compareBy<TreeLeaf<AwesomeTreeLeaf>>;
31
+ switch (sortBy) {
32
+ case "order":
33
+ return typedCompareBy("groupOrder", ordinal());
34
+ case "duration":
35
+ return typedCompareBy("duration", ordinal());
36
+ case "alphabet":
37
+ return typedCompareBy("name", alphabetically());
38
+ case "status":
39
+ return typedCompareBy("status", byStatus());
40
+ }
41
+ };
42
+
43
+ const groupComparatorByTreeSortBy = (sortBy: TreeSortBy): Comparator<DefaultTreeGroup> => {
44
+ const typedCompareBy = compareBy<DefaultTreeGroup>;
45
+ switch (sortBy) {
46
+ case "alphabet":
47
+ return typedCompareBy("name", alphabetically());
48
+ case "order":
49
+ case "duration":
50
+ case "status":
51
+ return typedCompareBy("statistic", byStatistic());
52
+ }
53
+ };
54
+
55
+ export const leafComparator = (filterOptions: TreeFiltersState): Comparator<TreeLeaf<AwesomeTreeLeaf>> => {
56
+ const cmp = leafComparatorByTreeSortBy(filterOptions.sortBy);
57
+ const directional = filterOptions.direction === "asc" ? cmp : reverse(cmp);
58
+ // apply fallback sorting by name
59
+ return andThen([directional, compareBy("name", alphabetically())]);
60
+ };
61
+
62
+ export const groupComparator = (filterOptions: TreeFiltersState): Comparator<DefaultTreeGroup> => {
63
+ const cmp = groupComparatorByTreeSortBy(filterOptions.sortBy);
64
+ const directional = filterOptions.direction === "asc" ? cmp : reverse(cmp);
65
+ // apply fallback sorting by name
66
+ return andThen([directional, compareBy("name", alphabetically())]);
67
+ };
68
+
69
+ export const filterLeaves = (
70
+ leaves: string[] = [],
71
+ leavesById: AwesomeTree["leavesById"],
72
+ filterOptions: TreeFiltersState,
73
+ ) => {
74
+ const filteredLeaves = [...leaves]
75
+ .map((leafId) => leavesById[leafId])
76
+ .filter((leaf: TreeLeaf<AwesomeTreeLeaf>) => isIncluded(leaf, filterOptions));
77
+
78
+ const comparator = leafComparator(filterOptions);
79
+ return filteredLeaves.sort(comparator);
80
+ };
81
+
82
+ /**
83
+ * Fills the given tree from generator and returns recursive tree which includes leaves data instead of their IDs
84
+ * Filters leaves when `filterOptions` property is provided
85
+ * @param payload
86
+ */
87
+ export const createRecursiveTree = (payload: {
88
+ group: AwesomeTreeGroup;
89
+ groupsById: AwesomeTree["groupsById"];
90
+ leavesById: AwesomeTree["leavesById"];
91
+ filterOptions?: TreeFiltersState;
92
+ }): AwesomeRecursiveTree => {
93
+ const { group, groupsById, leavesById, filterOptions } = payload;
94
+ const groupLeaves: string[] = group.leaves ?? [];
95
+
96
+ const leaves = filterLeaves(groupLeaves, leavesById, filterOptions);
97
+ const trees =
98
+ group.groups
99
+ ?.map((groupId) =>
100
+ createRecursiveTree({
101
+ group: groupsById[groupId],
102
+ groupsById,
103
+ leavesById,
104
+ filterOptions,
105
+ }),
106
+ )
107
+ ?.filter((rt) => !isRecursiveTreeEmpty(rt)) ?? [];
108
+
109
+ const statistic: Statistic = emptyStatistic();
110
+ trees.forEach((rt: AwesomeRecursiveTree) => {
111
+ if (rt.statistic) {
112
+ const additional: Statistic = rt.statistic;
113
+ mergeStatistic(statistic, additional);
114
+ }
115
+ });
116
+ leaves.forEach((leaf) => {
117
+ const status: TestStatus = leaf.status;
118
+ incrementStatistic(statistic, status);
119
+ });
120
+
121
+ return {
122
+ ...group,
123
+ statistic,
124
+ leaves,
125
+ trees: trees.sort(groupComparator(filterOptions)),
126
+ };
127
+ };
128
+
129
+ export const isRecursiveTreeEmpty = (tree: AwesomeRecursiveTree): boolean => {
130
+ if (!tree.trees?.length && !tree.leaves?.length) {
131
+ return true;
132
+ }
133
+
134
+ if (tree.leaves?.length) {
135
+ return false;
136
+ }
137
+
138
+ return tree.trees?.every((subTree) => isRecursiveTreeEmpty(subTree));
139
+ };
@@ -0,0 +1,71 @@
1
+ $brand-blue: #0044bb;
2
+ $brand-red: #ff0000;
3
+
4
+ $color-passed: #97cc64;
5
+ $color-failed: #fd5a3e;
6
+ $color-broken: #ffd050;
7
+ $color-skipped: #aaa;
8
+ $color-unknown: #d35ebe;
9
+
10
+ $background-light-passed: #eef9eb;
11
+ $background-light-failed: #ffe7e6;
12
+ $background-light-broken: #fffae6;
13
+ $background-light-skipped: #f2f2f2;
14
+ $background-light-unknown: #faebf7;
15
+
16
+ $background-passed: #a6e19d;
17
+ $background-failed: #ffaca6;
18
+ $background-broken: #ffeca0;
19
+ $background-skipped: #cccccc;
20
+ $background-unknown: #ecb7e2;
21
+
22
+ $header-bg: #fff;
23
+ $heading-bg: #f6f5f3;
24
+ $body-bg: #fff;
25
+ $content-bg: #fff;
26
+ $attachment-bg: #f8f8f9;
27
+
28
+ $border-color: #eceff1;
29
+ $border-accent-color: #e5e5e5;
30
+
31
+ $hover-color: #e4edfe;
32
+ $selected-color: #fffacd;
33
+ $summary-color: #f6f5f3;
34
+
35
+ $text-color: #000;
36
+ $text-muted-color: #999;
37
+
38
+ $gap-size: 16px;
39
+ $footer-gap-size: 32px;
40
+
41
+ $small-screen: 1000px;
42
+ $min-pane-size: 300px;
43
+
44
+ /* Sidebar **/
45
+
46
+ $sidebar-full-width: 180px;
47
+ $sidebar-collapsed: 60px;
48
+
49
+ $sidebar-separator-color: #4d4d4d;
50
+ $sidebar-active-accent-color: #64b5f6;
51
+ $app-nav-bg: #343434;
52
+ $sidebar-active-text-color: #fff;
53
+ $sidebar-hover-text-color: #fff;
54
+ $sidebar-brand-color: #fff;
55
+ $sidebar-text-shadow-color: #000;
56
+
57
+ /* Links */
58
+
59
+ $link-color: #000;
60
+ $link-color-hover: #f00;
61
+
62
+ /* Pane set */
63
+
64
+ $pane-bg-color: #fff;
65
+ $pane-shadow-color: #999;
66
+ $pane-overlay-bg: rgba(240, 240, 240, 0.4);
67
+ $pane-overlay-bg-hover: rgba(240, 240, 240, 0.2);
68
+
69
+ /* Tooltip */
70
+ $tooltip-bg: rgba(50, 50, 50, 0.8);
71
+ $tooltip-color: #fff;