@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,126 @@
1
+ @import "../../variables.scss";
2
+
3
+ .side-nav {
4
+ background: $app-nav-bg;
5
+ width: $sidebar-full-width;
6
+ display: flex;
7
+ flex-direction: column;
8
+ height: 100vh;
9
+ overflow: hidden;
10
+ min-width: $sidebar-full-width;
11
+
12
+ .head {
13
+ margin: $gap-size 0;
14
+ padding-bottom: 5px;
15
+ border-bottom: 1px solid $sidebar-separator-color;
16
+ }
17
+ .icon {
18
+ flex: none;
19
+ }
20
+
21
+ .brand {
22
+ color: $sidebar-brand-color;
23
+ text-decoration: none;
24
+ display: flex;
25
+ align-items: center;
26
+ font-size: 26px;
27
+ font-weight: bold;
28
+ margin-bottom: 10px;
29
+ transition: all 0.3s;
30
+ background-size: auto auto;
31
+ justify-content: flex-start;
32
+ gap: 8px;
33
+ padding: 16px 8px 0 16px;
34
+ }
35
+
36
+ .menu {
37
+ margin: 0;
38
+ left: 0;
39
+ padding: 0;
40
+ list-style-type: none;
41
+ transition: width 0.3s;
42
+ }
43
+
44
+ .footer {
45
+ margin-top: auto;
46
+ margin-bottom: $footer-gap-size;
47
+ padding-left: 0;
48
+ padding-right: 0;
49
+ }
50
+
51
+ .item {
52
+ display: block;
53
+ }
54
+ .language-picker {
55
+ display: flex;
56
+ justify-content: center;
57
+ }
58
+
59
+ .link,
60
+ .collapse {
61
+ line-height: 24px;
62
+ color: $text-muted-color;
63
+ text-decoration: none;
64
+ position: relative;
65
+ display: flex;
66
+ align-items: center;
67
+ gap: 8px;
68
+ padding: 8px 0 8px 16px;
69
+ }
70
+
71
+ .link-active {
72
+ color: $sidebar-active-text-color;
73
+ border-right: 4px solid $sidebar-active-accent-color;
74
+ }
75
+
76
+ .link:hover {
77
+ color: $sidebar-hover-text-color;
78
+ }
79
+
80
+ .language-small {
81
+ display: block;
82
+ text-transform: capitalize;
83
+ padding: 0 5px;
84
+ text-overflow: ".";
85
+ max-width: 30px;
86
+ margin: 0 auto;
87
+ }
88
+
89
+ .collapse {
90
+ cursor: pointer;
91
+ }
92
+
93
+ .collapse-icon {
94
+ transform: rotate(90deg);
95
+ transition: transform 200ms;
96
+ }
97
+ .collapse .icon {
98
+ left: $gap-size + 5px;
99
+ transition: transform 0.1s;
100
+ }
101
+
102
+ &.collapsed {
103
+ width: $sidebar-collapsed;
104
+ min-width: $sidebar-collapsed;
105
+
106
+ .collapse-icon {
107
+ transform: rotate(-90deg);
108
+ }
109
+
110
+ .text,
111
+ .brand-text {
112
+ visibility: hidden;
113
+ opacity: 0;
114
+ white-space: nowrap;
115
+ }
116
+
117
+ .collapse,
118
+ .link {
119
+ white-space: nowrap;
120
+ }
121
+ }
122
+
123
+ .strut {
124
+ flex: 1;
125
+ }
126
+ }
@@ -0,0 +1,62 @@
1
+ import { Heading, Loadable, PageLoader } from "@allurereport/web-components";
2
+ import { useEffect } from "preact/compat";
3
+ import { HeaderActions } from "@/components/HeaderActions/HeaderActions";
4
+ import SideBySide from "@/components/SideBySide";
5
+ import TestResult from "@/components/TestResult";
6
+ import { TreeList } from "@/components/Tree";
7
+ import { fetchStats, useI18n } from "@/stores";
8
+ import { route } from "@/stores/router";
9
+ import { fetchTestResult, testResultStore } from "@/stores/testResults";
10
+ import { fetchTreeData, treeStore } from "@/stores/tree";
11
+ import * as styles from "./styles.scss";
12
+
13
+ const Suites = () => {
14
+ const { params } = route.value;
15
+ const { testResultId } = params;
16
+
17
+ useEffect(() => {
18
+ fetchTreeData();
19
+ }, []);
20
+ useEffect(() => {
21
+ if (testResultId) {
22
+ fetchTestResult(testResultId);
23
+ }
24
+ }, [testResultId]);
25
+
26
+ const testResult = testResultId ? (
27
+ <Loadable
28
+ source={testResultStore}
29
+ renderLoader={() => <PageLoader />}
30
+ transformData={(data) => data[testResultId]}
31
+ renderData={(testResultItem) => (
32
+ <>
33
+ <div className={styles.wrapper} key={testResultItem?.id}>
34
+ <TestResult testResult={testResultItem} />
35
+ </div>
36
+ </>
37
+ )}
38
+ />
39
+ ) : (
40
+ <div className={styles.wrapper}>
41
+ <Loadable source={treeStore} renderLoader={() => <PageLoader />} renderData={() => <div />} />
42
+ </div>
43
+ );
44
+
45
+ const SuitesList = () => {
46
+ const { t } = useI18n("nav");
47
+ return (
48
+ <div className={styles.suites}>
49
+ <Heading size={"s"} className={styles["suites-title"]}>
50
+ {t("suites")}
51
+ </Heading>
52
+
53
+ <HeaderActions />
54
+ <TreeList />
55
+ </div>
56
+ );
57
+ };
58
+
59
+ return <SideBySide left={<SuitesList />} right={testResult} />;
60
+ };
61
+
62
+ export default Suites;
@@ -0,0 +1,10 @@
1
+ .suites {
2
+ padding: 8px;
3
+ }
4
+ .suites-title {
5
+ display: flex;
6
+ margin-bottom: 24px;
7
+ }
8
+ .wrapper {
9
+ display: flex;
10
+ }
@@ -0,0 +1,33 @@
1
+ import { Text } from "@allurereport/web-components";
2
+ import { type ComponentChildren } from "preact";
3
+ import { currentTab, setCurrentTab } from "@/stores/tabs";
4
+ import * as styles from "./styles.scss";
5
+
6
+ export const Tabs = (props: { children: ComponentChildren; initialTab?: string }) => {
7
+ if (props.initialTab) {
8
+ setCurrentTab(props.initialTab);
9
+ }
10
+ return <>{props.children}</>;
11
+ };
12
+
13
+ export const TabsList = (props: { children: ComponentChildren }) => {
14
+ return <div className={styles.tabsList}>{props.children}</div>;
15
+ };
16
+
17
+ export const Tab = (props: { id: string; children: ComponentChildren }) => {
18
+ const { id, children, ...rest } = props;
19
+ const isCurrentTab = currentTab.value === id;
20
+
21
+ return (
22
+ <button
23
+ {...rest}
24
+ className={styles.tab}
25
+ onClick={() => setCurrentTab(id)}
26
+ aria-current={isCurrentTab ? true : undefined}
27
+ >
28
+ <Text type="paragraph" size="m" bold>
29
+ {children}
30
+ </Text>
31
+ </button>
32
+ );
33
+ };
@@ -0,0 +1,56 @@
1
+ .tabsList {
2
+ background-color: var(--bg-base-secondary);
3
+ padding: 2px;
4
+ border-radius: 8px;
5
+ display: flex;
6
+ overflow-x: auto;
7
+ flex-grow: 0;
8
+ max-width: max-content;
9
+ }
10
+
11
+ .tab {
12
+ background-color: var(--bg-control-flat);
13
+ color: var(--on-text-primary);
14
+ border-radius: 6px;
15
+ border: 1px solid transparent;
16
+ padding: 2px 8px;
17
+ margin: 0;
18
+ cursor: pointer;
19
+ user-select: none;
20
+ flex-shrink: 0;
21
+ transform: scale(1);
22
+ outline-offset: 1px;
23
+ outline: 1px solid transparent;
24
+ transition:
25
+ transform var(--interaction-transition-duration) ease-out,
26
+ outline var(--interaction-transition-duration) ease-out,
27
+ background-color var(--color-change-transition-duration),
28
+ border-color var(--color-change-transition-duration);
29
+
30
+ &[aria-current] {
31
+ background-color: var(--bg-base-modal);
32
+ border-color: var(--on-border-primary);
33
+ cursor: default;
34
+ }
35
+
36
+ &:hover:not([aria-current]) {
37
+ background-color: var(--bg-control-flat-medium);
38
+ }
39
+
40
+ &:active:not([aria-current]) {
41
+ background-color: var(--bg-control-flat-heavy);
42
+ transform: scale(0.94);
43
+ }
44
+
45
+ &:focus {
46
+ outline: 1px solid transparent;
47
+ }
48
+
49
+ &:focus-visible {
50
+ outline: 1px solid var(--ad-other-focus);
51
+
52
+ &:not([aria-current]) {
53
+ background-color: var(--bg-control-flat-medium);
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,27 @@
1
+ import type { AttachmentTestStepResult } from "@allurereport/core-api";
2
+ import type { FunctionalComponent } from "preact";
3
+ import type { AwesomeTestResult } from "types";
4
+ import { TestResultAttachment } from "@/components/TestResult/TestResultSteps/testResultAttachment";
5
+ import { useI18n } from "@/stores";
6
+ import * as styles from "./styles.scss";
7
+
8
+ export type TestResultAttachmentViewProps = {
9
+ testResult?: AwesomeTestResult;
10
+ };
11
+
12
+ export const TestResultAttachmentView: FunctionalComponent<TestResultAttachmentViewProps> = ({ testResult }) => {
13
+ const { attachments } = testResult ?? {};
14
+ const { t } = useI18n("empty");
15
+
16
+ return (
17
+ <div className={styles["test-result-attachments-view"]}>
18
+ {attachments.length ? (
19
+ attachments?.map((attach, key) => (
20
+ <TestResultAttachment item={attach as AttachmentTestStepResult} key={key} stepIndex={key + 1} />
21
+ ))
22
+ ) : (
23
+ <div className={styles["test-result-empty"]}>{t("no-attachments-results")}</div>
24
+ )}
25
+ </div>
26
+ );
27
+ };
@@ -0,0 +1,12 @@
1
+ .test-result-attachments-view {
2
+ padding: 12px 24px 32px;
3
+ min-height: 320px;
4
+ }
5
+
6
+ .test-result-empty {
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: center;
10
+ padding: 48px 0;
11
+ width: 100%;
12
+ }
@@ -0,0 +1,27 @@
1
+ import { Text } from "@allurereport/web-components";
2
+ import type { FunctionalComponent } from "preact";
3
+ import { useState } from "preact/hooks";
4
+ import type { AwesomeTestResult } from "types";
5
+ import { MetadataButton } from "@/components/MetadataButton";
6
+ import * as styles from "./styles.scss";
7
+
8
+ export type TestResultDescriptionProps = {
9
+ description: AwesomeTestResult["description"];
10
+ };
11
+
12
+ export const TestResultDescription: FunctionalComponent<TestResultDescriptionProps> = ({ description }) => {
13
+ const [isOpen, setIsOpen] = useState<boolean>(true);
14
+
15
+ return (
16
+ <div className={styles["test-result-description"]}>
17
+ <div className={styles["test-result-description-wrapper"]}>
18
+ <MetadataButton title={"Description"} setIsOpen={setIsOpen} isOpened={isOpen} />
19
+ {isOpen && (
20
+ <Text tag={"p"} className={styles["test-result-description-text"]}>
21
+ {description || "Description mock"}
22
+ </Text>
23
+ )}
24
+ </div>
25
+ </div>
26
+ );
27
+ };
@@ -0,0 +1,12 @@
1
+ .test-result-description {
2
+ padding: 0 24px;
3
+ }
4
+
5
+ .test-result-description-wrapper {
6
+ padding: 16px 0;
7
+ border-bottom: 1px solid var(--on-border-primary);
8
+ }
9
+
10
+ .test-result-description-text {
11
+ padding-top: 10px;
12
+ }
@@ -0,0 +1,23 @@
1
+ import { Counter, SvgIcon, Text, allureIcons } from "@allurereport/web-components";
2
+ import { type FunctionalComponent } from "preact";
3
+ import { ArrowButton } from "@/components/ArrowButton";
4
+ import * as styles from "./styles.scss";
5
+
6
+ export const TestResultDropdown: FunctionalComponent<{
7
+ isOpened: boolean;
8
+ setIsOpen: (isOpened: boolean) => void;
9
+ title: string;
10
+ icon: string;
11
+ counter: number;
12
+ }> = ({ isOpened, setIsOpen, title, icon, counter }) => {
13
+ return (
14
+ <div className={styles["test-result-dropdown"]} onClick={() => setIsOpen(!isOpened)}>
15
+ <ArrowButton isOpened={isOpened} icon={allureIcons.arrowsChevronDown} />
16
+ <div className={styles["test-result-dropdown-wrap"]}>
17
+ <SvgIcon id={icon} />
18
+ <Text bold>{title}</Text>
19
+ <Counter count={counter} size="s" />
20
+ </div>
21
+ </div>
22
+ );
23
+ };
@@ -0,0 +1,34 @@
1
+ .test-result-dropdown {
2
+ display: flex;
3
+ justify-content: space-between;
4
+ padding: 1px 8px 1px 6px;
5
+ border-radius: 6px;
6
+ transition: background-color 300ms;
7
+ align-items: center;
8
+ cursor: pointer;
9
+ width: 100%;
10
+ }
11
+
12
+ .test-result-step-chevron {
13
+ width: 12px;
14
+ height: 12px;
15
+ transform: rotate(-90deg);
16
+ transition: transform 200ms;
17
+ }
18
+
19
+ .test-result-step-chevron-open {
20
+ transform: rotate(0deg);
21
+ }
22
+
23
+ .test-result-dropdown-wrap {
24
+ display: flex;
25
+ gap: 8px;
26
+ width: 100%;
27
+ align-items: center;
28
+ padding: 6px 8px 6px 6px;
29
+ border-radius: 4px;
30
+
31
+ &:hover {
32
+ background: var(--bg-control-flat-medium);
33
+ }
34
+ }
@@ -0,0 +1,33 @@
1
+ import { SvgIcon, allureIcons } from "@allurereport/web-components";
2
+ import { Text } from "@allurereport/web-components";
3
+ import * as baseStyles from "@/components/BaseLayout/styles.scss";
4
+ import { TestResultInfo } from "@/components/TestResult/TestResultInfo";
5
+ import * as styles from "./styles.scss";
6
+
7
+ const TestResultThumb = () => {
8
+ return (
9
+ <div className={styles["test-result-thumb"]}>
10
+ <div className={styles["test-result-thumb-wrapper"]}>
11
+ <SvgIcon
12
+ size={"m"}
13
+ width={"32px"}
14
+ height={"32px"}
15
+ id={allureIcons.lineDevCodeSquare}
16
+ className={styles["test-result-thumb-icon"]}
17
+ />
18
+ <Text className={styles["test-result-thumb-text"]}>No test case results</Text>
19
+ </div>
20
+ </div>
21
+ );
22
+ };
23
+
24
+ const TestResultEmpty = () => {
25
+ return (
26
+ <div className={baseStyles.content}>
27
+ <TestResultInfo />
28
+ <TestResultThumb />
29
+ </div>
30
+ );
31
+ };
32
+
33
+ export default TestResultEmpty;
@@ -0,0 +1,25 @@
1
+ .test-result-thumb {
2
+ display: flex;
3
+ justify-content: center;
4
+ flex-wrap: wrap;
5
+ min-height: 720px;
6
+ align-items: center;
7
+ }
8
+
9
+ .test-result-thumb-wrapper {
10
+ display: flex;
11
+ flex-direction: column;
12
+ align-items: center;
13
+ }
14
+
15
+ .test-result-thumb-icon {
16
+ width: 32px;
17
+ height: 32px;
18
+ margin-bottom: 16px;
19
+ flex: 1 1 auto;
20
+ }
21
+
22
+ .test-result-thumb-text {
23
+ color: var(--on-text-secondary);
24
+ flex: 1 1 auto;
25
+ }
@@ -0,0 +1,48 @@
1
+ import { Code, IconButton, Text, TooltipWrapper, allureIcons } from "@allurereport/web-components";
2
+ import { type FunctionalComponent } from "preact";
3
+ import { useState } from "preact/hooks";
4
+ import { useI18n } from "@/stores/locale";
5
+ import { copyToClipboard } from "@/utils/copyToClipboard";
6
+ import * as styles from "./styles.scss";
7
+
8
+ const TestResultErrorTrace = ({ trace }: { trace: string }) => {
9
+ return (
10
+ <div data-testid="test-result-error-trace" className={styles["test-result-error-trace"]}>
11
+ <Code size={"s"} type={"ui"}>
12
+ <pre>{trace}</pre>
13
+ </Code>
14
+ </div>
15
+ );
16
+ };
17
+
18
+ export const TestResultError: FunctionalComponent<{ message: string; trace: string }> = ({ message, trace }) => {
19
+ const [isOpen, setIsOpen] = useState(false);
20
+ const { t } = useI18n("ui");
21
+ const { t: tooltip } = useI18n("controls");
22
+
23
+ return (
24
+ <div data-testid="test-result-error" className={styles["test-result-error"]}>
25
+ <div data-testid="test-result-error-header" className={styles["test-result-error-header"]}>
26
+ <Text tag={"p"} size={"m"} bold className={styles["test-result-error-text"]}>
27
+ {t("error")}
28
+ </Text>
29
+ <TooltipWrapper tooltipText={tooltip("clipboard")} tooltipTextAfterClick={tooltip("clipboardSuccess")}>
30
+ <IconButton
31
+ style={"ghost"}
32
+ size={"s"}
33
+ icon={allureIcons.lineGeneralCopy3}
34
+ onClick={() => {
35
+ copyToClipboard(message);
36
+ }}
37
+ />
38
+ </TooltipWrapper>
39
+ </div>
40
+ <div className={styles["test-result-error-message"]} onClick={() => setIsOpen(!isOpen)}>
41
+ <Code data-testid="test-result-error-message" size={"s"}>
42
+ <pre>{message}</pre>
43
+ </Code>
44
+ </div>
45
+ {isOpen && trace && <TestResultErrorTrace trace={trace} />}
46
+ </div>
47
+ );
48
+ };
@@ -0,0 +1,51 @@
1
+ .test-result-error {
2
+ padding: 8px 8px 12px 16px;
3
+ background-color: var(--bg-alpha-capella);
4
+ border-radius: 8px;
5
+ position: relative;
6
+ overflow: hidden;
7
+
8
+ &:before {
9
+ content: "";
10
+ display: block;
11
+ height: 100%;
12
+ width: 2px;
13
+ position: absolute;
14
+ left: 0;
15
+ top: 0;
16
+ background: var(--on-support-capella);
17
+ }
18
+ }
19
+
20
+ .test-result-error-header {
21
+ display: flex;
22
+ gap: 4px;
23
+ justify-content: space-between;
24
+ }
25
+
26
+ .test-result-error-text {
27
+ margin-bottom: 8px;
28
+ padding-left: 8px;
29
+ color: var(--on-support-capella);
30
+ }
31
+
32
+ .test-result-error-trace {
33
+ margin-top: 8px;
34
+ padding-left: 8px;
35
+
36
+ pre {
37
+ overflow: scroll;
38
+ padding-bottom: 24px;
39
+ }
40
+ }
41
+
42
+ .test-result-error-message {
43
+ padding: 8px;
44
+ border-radius: 8px;
45
+ cursor: pointer;
46
+ transition: background-color 300ms;
47
+
48
+ &:hover {
49
+ background: var(--bg-alpha-capella);
50
+ }
51
+ }
@@ -0,0 +1,53 @@
1
+ import { IconButton, SvgIcon, Text, allureIcons } from "@allurereport/web-components";
2
+ import clsx from "clsx";
3
+ import type { FunctionalComponent } from "preact";
4
+ import type { AwesomeTestResult } from "types";
5
+ import { LanguagePicker } from "@/components/LanguagePicker";
6
+ import { ThemeButton } from "@/components/ThemeButton/ThemeButton";
7
+ import { navigateTo } from "@/index";
8
+ import * as styles from "./styles.scss";
9
+
10
+ export type TestResultHeaderProps = {
11
+ testResult?: AwesomeTestResult;
12
+ };
13
+
14
+ export const TestResultHeader: FunctionalComponent<TestResultHeaderProps> = ({ testResult }) => {
15
+ const { breadcrumbs, name } = testResult || {};
16
+
17
+ return (
18
+ <div className={styles.above}>
19
+ <div className={styles["test-result-breadcrumbs"]}>
20
+ <div className={clsx(styles["test-result-breadcrumb"], styles["test-result-home"])}>
21
+ <IconButton
22
+ icon={allureIcons.lineGeneralHomeLine}
23
+ size={"s"}
24
+ style={"ghost"}
25
+ className={styles["test-result-breadcrumb-link"]}
26
+ onClick={() => navigateTo("/")}
27
+ />
28
+ </div>
29
+ {Boolean(breadcrumbs?.length) &&
30
+ breadcrumbs?.[0]?.map((item, key) => {
31
+ return (
32
+ <div className={styles["test-result-breadcrumb"]} key={key}>
33
+ <SvgIcon id={allureIcons.lineArrowsChevronDown} className={styles["test-result-breadcrumb-arrow"]} />
34
+ <Text size={"s"} bold className={styles["test-result-breadcrumb-title"]}>
35
+ {item}
36
+ </Text>
37
+ </div>
38
+ );
39
+ })}
40
+ <div className={styles["test-result-breadcrumb"]}>
41
+ {name && (
42
+ <SvgIcon id={allureIcons.lineArrowsChevronDown} className={styles["test-result-breadcrumb-arrow"]} />
43
+ )}
44
+ <Text size={"s"} bold className={styles["test-result-breadcrumb-title"]}>
45
+ {name}
46
+ </Text>
47
+ </div>
48
+ </div>
49
+ <LanguagePicker />
50
+ <ThemeButton />
51
+ </div>
52
+ );
53
+ };
@@ -0,0 +1,43 @@
1
+ .test-result-breadcrumbs {
2
+ margin-right: auto;
3
+ display: flex;
4
+ gap: 4px;
5
+ overflow: hidden;
6
+ white-space: nowrap;
7
+ text-overflow: ellipsis;
8
+ }
9
+ .test-result-home {
10
+ flex: none;
11
+ }
12
+
13
+ .test-result-breadcrumb-link {
14
+ color: var(--on-text-secondary);
15
+ }
16
+
17
+ .test-result-breadcrumb {
18
+ display: flex;
19
+ gap: 4px;
20
+ align-items: center;
21
+ color: var(--on-text-secondary);
22
+ white-space: nowrap;
23
+ text-overflow: ellipsis;
24
+ overflow: hidden;
25
+ }
26
+
27
+ .test-result-breadcrumb-title {
28
+ white-space: nowrap;
29
+ text-overflow: ellipsis;
30
+ overflow: hidden;
31
+ }
32
+
33
+ .above {
34
+ margin-bottom: 12px;
35
+ display: flex;
36
+ width: 100%;
37
+ justify-content: space-between;
38
+ align-items: center;
39
+ gap: 12px;
40
+ }
41
+ .test-result-breadcrumb-arrow {
42
+ transform: rotate(-90deg);
43
+ }