testeranto 0.166.0 → 0.171.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/dist/common/src/NavBar.js +45 -0
  2. package/dist/common/src/PM/main.js +81 -59
  3. package/dist/common/src/Pure.js +17 -15
  4. package/dist/common/src/ReportServer.js +48 -5
  5. package/dist/common/src/Web.js +35 -20
  6. package/dist/common/src/components/SunriseAnimation.test/implementation.js +1 -0
  7. package/dist/common/src/components/SunriseAnimation.test/index.js +1 -0
  8. package/dist/common/src/components/SunriseAnimation.test/interface.js +1 -0
  9. package/dist/common/src/components/SunriseAnimation.test/specification.js +1 -0
  10. package/dist/common/src/components/TestStatusBadge.js +55 -0
  11. package/dist/common/src/components/pure/ProjectPageView.js +204 -0
  12. package/dist/common/src/components/pure/ProjectPageView.test/adapter.js +20 -0
  13. package/dist/common/src/components/pure/ProjectPageView.test/implementation.js +71 -0
  14. package/dist/common/src/components/pure/ProjectPageView.test/index.js +10 -0
  15. package/dist/common/src/components/pure/ProjectPageView.test/specification.js +19 -0
  16. package/dist/common/src/components/pure/ProjectPageView.test/types.js +2 -0
  17. package/dist/common/src/lib/BaseSuite.js +3 -3
  18. package/dist/common/src/lib/BaseSuite.test/test.js +1 -1
  19. package/dist/common/src/lib/abstractBase.js +41 -14
  20. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.adapter.js +1 -1
  21. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.mock.js +1 -1
  22. package/dist/common/src/lib/basebuilder.js +9 -7
  23. package/dist/common/src/lib/core.test/MockCore.js +17 -15
  24. package/dist/common/src/lib/pmProxy.js +185 -64
  25. package/dist/common/testeranto.config.js +6 -0
  26. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  27. package/dist/module/src/App.js +3 -3
  28. package/dist/module/src/PM/main.js +81 -59
  29. package/dist/module/src/ProjectsPage.js +1 -110
  30. package/dist/module/src/Pure.js +17 -15
  31. package/dist/module/src/ReportServer.js +48 -5
  32. package/dist/module/src/TestPage.js +45 -16
  33. package/dist/module/src/Web.js +35 -20
  34. package/dist/module/src/components/SunriseAnimation.test/implementation.js +1 -0
  35. package/dist/module/src/components/SunriseAnimation.test/index.js +1 -0
  36. package/dist/module/src/components/SunriseAnimation.test/interface.js +1 -0
  37. package/dist/module/src/components/SunriseAnimation.test/specification.js +1 -0
  38. package/dist/module/src/components/pure/ProjectPageView.js +197 -0
  39. package/dist/module/src/components/pure/ProjectPageView.test/adapter.js +17 -0
  40. package/dist/module/src/components/pure/ProjectPageView.test/implementation.js +68 -0
  41. package/dist/module/src/components/pure/ProjectPageView.test/index.js +5 -0
  42. package/dist/module/src/components/pure/ProjectPageView.test/specification.js +15 -0
  43. package/dist/module/src/components/pure/ProjectPageView.test/types.js +1 -0
  44. package/dist/module/src/components/pure/ProjectsPageView.js +58 -0
  45. package/dist/module/src/components/pure/TestPageView.js +136 -0
  46. package/dist/module/src/components/stateful/ProjectPage.js +63 -0
  47. package/dist/module/src/components/stateful/ProjectsPage.js +55 -0
  48. package/dist/module/src/components/stateful/TestPage.js +82 -0
  49. package/dist/module/src/lib/BaseSuite.js +3 -3
  50. package/dist/module/src/lib/BaseSuite.test/test.js +1 -1
  51. package/dist/module/src/lib/abstractBase.js +41 -14
  52. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.adapter.js +1 -1
  53. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.mock.js +1 -1
  54. package/dist/module/src/lib/basebuilder.js +9 -7
  55. package/dist/module/src/lib/core.test/MockCore.js +17 -15
  56. package/dist/module/src/lib/pmProxy.js +185 -64
  57. package/dist/module/testeranto.config.js +6 -0
  58. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  59. package/dist/prebuild/App.js +541 -495
  60. package/dist/prebuild/ReportServer.mjs +44 -4
  61. package/dist/prebuild/run.mjs +67 -39
  62. package/dist/types/src/NavBar.d.ts +19 -0
  63. package/dist/types/src/PM/index.d.ts +3 -1
  64. package/dist/types/src/PM/main.d.ts +0 -4
  65. package/dist/types/src/PM/node.d.ts +2 -2
  66. package/dist/types/src/components/SunriseAnimation.test/interface.d.ts +0 -0
  67. package/dist/types/src/components/SunriseAnimation.test/specification.d.ts +0 -0
  68. package/dist/types/src/components/TestStatusBadge.d.ts +15 -0
  69. package/dist/types/src/components/pure/ProjectPageView.d.ts +14 -0
  70. package/dist/types/src/components/pure/ProjectPageView.test/adapter.d.ts +3 -0
  71. package/dist/types/src/components/pure/ProjectPageView.test/implementation.d.ts +3 -0
  72. package/dist/types/src/components/pure/ProjectPageView.test/index.d.ts +3 -0
  73. package/dist/types/src/components/pure/ProjectPageView.test/specification.d.ts +3 -0
  74. package/dist/types/src/components/pure/ProjectPageView.test/types.d.ts +39 -0
  75. package/dist/types/src/lib/BaseSuite.d.ts +2 -0
  76. package/dist/types/src/lib/abstractBase.d.ts +12 -0
  77. package/dist/types/src/lib/index.d.ts +0 -1
  78. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  79. package/package.json +3 -2
  80. package/src/App.tsx +5 -9
  81. package/src/PM/index.ts +1 -1
  82. package/src/PM/main.ts +87 -82
  83. package/src/PM/node.ts +2 -2
  84. package/src/ProjectsPage.tsx +1 -164
  85. package/src/Pure.ts +17 -17
  86. package/src/ReportServer.ts +49 -6
  87. package/src/TestPage.tsx +78 -5
  88. package/src/Web.ts +35 -35
  89. package/src/components/SunriseAnimation.test/implementation.ts +0 -0
  90. package/src/components/SunriseAnimation.test/index.ts +0 -0
  91. package/src/components/SunriseAnimation.test/interface.ts +0 -0
  92. package/src/components/SunriseAnimation.test/specification.ts +0 -0
  93. package/src/components/pure/ProjectPageView.test/adapter.ts +21 -0
  94. package/src/components/pure/ProjectPageView.test/implementation.tsx +84 -0
  95. package/src/components/pure/ProjectPageView.test/index.ts +8 -0
  96. package/src/components/pure/ProjectPageView.test/specification.ts +31 -0
  97. package/src/components/pure/ProjectPageView.test/types.ts +55 -0
  98. package/src/components/pure/ProjectPageView.tsx +332 -0
  99. package/src/components/pure/ProjectsPageView.tsx +99 -0
  100. package/src/components/pure/TestPageView.tsx +278 -0
  101. package/src/components/stateful/ProjectPage.tsx +83 -0
  102. package/src/components/stateful/ProjectsPage.tsx +73 -0
  103. package/src/components/stateful/TestPage.tsx +107 -0
  104. package/src/lib/BaseSuite.test/test.ts +1 -1
  105. package/src/lib/BaseSuite.ts +9 -4
  106. package/src/lib/abstractBase.ts +45 -14
  107. package/src/lib/baseBuilder.test/baseBuilder.test.adapter.ts +1 -1
  108. package/src/lib/baseBuilder.test/baseBuilder.test.mock.ts +1 -1
  109. package/src/lib/basebuilder.ts +9 -9
  110. package/src/lib/core.test/MockCore.ts +26 -19
  111. package/src/lib/index.ts +1 -1
  112. package/src/lib/pmProxy.ts +184 -87
  113. package/testeranto/App.js +541 -495
  114. package/testeranto/bundles/node/allTests/{chunk-4ONUZRZ4.mjs → chunk-3EUGBAOM.mjs} +1 -1
  115. package/testeranto/bundles/node/allTests/{chunk-FFBRDUBH.mjs → chunk-E75CSRER.mjs} +247 -124
  116. package/testeranto/bundles/node/allTests/{chunk-NQEP7SN4.mjs → chunk-M6DO7VMB.mjs} +1 -1
  117. package/testeranto/bundles/node/allTests/metafile.json +41 -41
  118. package/testeranto/bundles/node/allTests/src/lib/BaseSuite.test/node.test.mjs +4 -4
  119. package/testeranto/bundles/node/allTests/src/lib/baseBuilder.test/baseBuilder.test.node.mjs +4 -4
  120. package/testeranto/bundles/node/allTests/src/lib/classBuilder.test/classBuilder.test.mjs +3 -3
  121. package/testeranto/bundles/node/allTests/src/lib/core.test/core.test.mjs +11 -23
  122. package/testeranto/bundles/node/allTests/src/lib/pmProxy.test/index.mjs +2 -2
  123. package/testeranto/bundles/pure/allTests/{chunk-CSMXYJ65.mjs → chunk-KHDVEHF7.mjs} +3 -18
  124. package/testeranto/bundles/pure/allTests/{chunk-QK4IXLF6.mjs → chunk-VMUSFSZM.mjs} +247 -124
  125. package/testeranto/bundles/pure/allTests/metafile.json +77 -47
  126. package/testeranto/bundles/pure/allTests/src/Pure.test.mjs +2 -2
  127. package/testeranto/bundles/pure/allTests/src/lib/BaseSuite.test/pure.test.mjs +3 -3
  128. package/testeranto/bundles/pure/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure.mjs +3 -30
  129. package/testeranto/bundles/web/allTests/chunk-HPYA4YZC.mjs +2283 -0
  130. package/testeranto/bundles/web/allTests/{chunk-TU3MJSSI.mjs → chunk-RLDR6LJN.mjs} +302 -127
  131. package/testeranto/bundles/web/allTests/chunk-U7AW26HL.mjs +997 -0
  132. package/testeranto/bundles/web/allTests/metafile.json +15065 -46
  133. package/testeranto/bundles/web/allTests/src/components/pure/ProjectPageView.test/index.html +19 -0
  134. package/testeranto/bundles/web/allTests/src/components/pure/ProjectPageView.test/index.mjs +37524 -0
  135. package/testeranto/bundles/web/allTests/src/lib/BaseSuite.test/web.test.mjs +20 -2
  136. package/testeranto/bundles/web/allTests/src/lib/baseBuilder.test/baseBuilder.test.web.mjs +27 -3
  137. package/testeranto/reports/allTests/config.json +8 -0
  138. package/testeranto/reports/allTests/src/Pure.test/pure/type_errors.txt +9 -3
  139. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/bdd_errors.txt +1 -0
  140. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/lint_errors.txt +13 -0
  141. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/logs.txt +50 -0
  142. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/message.txt +2 -0
  143. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/prompt.txt +17 -0
  144. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/tests.json +32 -0
  145. package/testeranto/reports/allTests/src/components/pure/ProjectPageView.test/index/web/type_errors.txt +68 -0
  146. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/logs.txt +0 -0
  147. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/tests.json +6 -3
  148. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/type_errors.txt +8 -1
  149. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/tests.json +6 -3
  150. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/type_errors.txt +9 -3
  151. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/logs.txt +0 -0
  152. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/prompt.txt +2 -2
  153. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/tests.json +6 -3
  154. package/testeranto/reports/allTests/src/lib/BaseSuite.test/web.test/web/type_errors.txt +10 -5
  155. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/logs.txt +0 -0
  156. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/tests.json +18 -9
  157. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/type_errors.txt +8 -1
  158. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/type_errors.txt +10 -5
  159. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/logs.txt +0 -0
  160. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/prompt.txt +2 -2
  161. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/tests.json +18 -9
  162. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/type_errors.txt +10 -5
  163. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/logs.txt +0 -0
  164. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/tests.json +36 -18
  165. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/type_errors.txt +8 -1
  166. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/lint_errors.txt +0 -12
  167. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/logs.txt +2 -2
  168. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/type_errors.txt +11 -8
  169. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/logs.txt +0 -0
  170. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/tests.json +28 -14
  171. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/type_errors.txt +8 -1
  172. package/testeranto/reports/allTests/summary.json +16 -9
  173. package/testeranto/reportsweb_build_errors +25 -0
  174. package/testeranto.config.ts +7 -0
  175. package/tsc.log +313 -237
  176. package/testeranto/bundles/web/allTests/src/lib/BaseSuite.test/web.test/manifest.json +0 -1
  177. package/testeranto/bundles/web/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/manifest.json +0 -1
  178. package/testeranto/reports/allTests/src/Pure.test/pure/manifest.json +0 -1
  179. package/testeranto/reports/allTests/src/lib/BaseSuite.test/node.test/node/manifest.json +0 -1
  180. package/testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/manifest.json +0 -1
  181. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/manifest.json +0 -1
  182. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/manifest.json +0 -1
  183. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/manifest.json +0 -1
  184. package/testeranto/reports/allTests/src/lib/core.test/core.test/node/manifest.json +0 -1
  185. package/testeranto/reports/allTests/src/lib/pmProxy.test/index/node/manifest.json +0 -1
  186. /package/{testeranto/reports/allTests/src/Pure.test/pure/logs.txt → dist/types/src/components/SunriseAnimation.test/implementation.d.ts} +0 -0
  187. /package/{testeranto/reports/allTests/src/lib/BaseSuite.test/pure.test/pure/logs.txt → dist/types/src/components/SunriseAnimation.test/index.d.ts} +0 -0
@@ -0,0 +1,332 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import React from 'react';
3
+ import { Tab, Container, Alert, Table, Badge, Nav, Card, ListGroup } from 'react-bootstrap';
4
+ import { NavBar } from '../../NavBar';
5
+ import { TestStatusBadge } from '../TestStatusBadge';
6
+
7
+ const BuildLogViewer = ({ logs, runtime }: { logs: any, runtime: string }) => {
8
+ if (!logs) return <Alert variant="info">Loading {runtime.toLowerCase()} build logs...</Alert>;
9
+
10
+ const hasErrors = logs.errors?.length > 0;
11
+ const hasWarnings = logs.warnings?.length > 0;
12
+ const [activeTab, setActiveTab] = React.useState('summary');
13
+
14
+ return (
15
+ <div>
16
+ <Tab.Container activeKey={activeTab} onSelect={(k) => setActiveTab(k || 'summary')}>
17
+ <Nav variant="tabs" className="mb-3">
18
+ <Nav.Item>
19
+ <Nav.Link eventKey="summary">Build Summary</Nav.Link>
20
+ </Nav.Item>
21
+ <Nav.Item>
22
+ <Nav.Link eventKey="warnings">
23
+ {hasWarnings ? `⚠️ Warnings (${logs.warnings.length})` : 'Warnings'}
24
+ </Nav.Link>
25
+ </Nav.Item>
26
+ <Nav.Item>
27
+ <Nav.Link eventKey="errors">
28
+ {hasErrors ? `❌ Errors (${logs.errors.length})` : 'Errors'}
29
+ </Nav.Link>
30
+ </Nav.Item>
31
+ </Nav>
32
+
33
+ <Tab.Content>
34
+ <Tab.Pane eventKey="summary">
35
+ <Card>
36
+ <Card.Header className="d-flex justify-content-between align-items-center">
37
+ <h5>Build Summary</h5>
38
+ <div>
39
+ {hasErrors && (
40
+ <Badge bg="danger" className="me-2">
41
+ {logs.errors.length} Error{logs.errors.length !== 1 ? 's' : ''}
42
+ </Badge>
43
+ )}
44
+ {hasWarnings && (
45
+ <Badge bg="warning" text="dark">
46
+ {logs.warnings.length} Warning{logs.warnings.length !== 1 ? 's' : ''}
47
+ </Badge>
48
+ )}
49
+ {!hasErrors && !hasWarnings && (
50
+ <Badge bg="success">Build Successful</Badge>
51
+ )}
52
+ </div>
53
+ </Card.Header>
54
+ <Card.Body>
55
+ <div className="mb-3">
56
+ <h6>Input Files ({Object.keys(logs.metafile?.inputs || {}).length})</h6>
57
+ <ListGroup className="max-h-200 overflow-auto">
58
+ {Object.keys(logs.metafile?.inputs || {}).map((file) => (
59
+ <ListGroup.Item key={file} className="py-2">
60
+ <code>{file}</code>
61
+ <div className="text-muted small">
62
+ {logs.metafile.inputs[file].bytes} bytes
63
+ </div>
64
+ </ListGroup.Item>
65
+ ))}
66
+ </ListGroup>
67
+ </div>
68
+ <div>
69
+ <h6>Output Files ({Object.keys(logs.metafile?.outputs || {}).length})</h6>
70
+ <ListGroup className="max-h-200 overflow-auto">
71
+ {Object.keys(logs.metafile?.outputs || {}).map((file) => (
72
+ <ListGroup.Item key={file} className="py-2">
73
+ <code>{file}</code>
74
+ <div className="text-muted small">
75
+ {logs.metafile.outputs[file].bytes} bytes
76
+ {logs.metafile.outputs[file].entryPoint && (
77
+ <span className="ms-2 badge bg-info">Entry Point</span>
78
+ )}
79
+ </div>
80
+ </ListGroup.Item>
81
+ ))}
82
+ </ListGroup>
83
+ </div>
84
+ </Card.Body>
85
+ </Card>
86
+ </Tab.Pane>
87
+ <Tab.Pane eventKey="warnings">
88
+ {hasWarnings ? (
89
+ <Card className="border-warning">
90
+ <Card.Header className="bg-warning text-white d-flex justify-content-between align-items-center">
91
+ <span>Build Warnings ({logs.warnings.length})</span>
92
+ <Badge bg="light" text="dark">
93
+ {new Date().toLocaleString()}
94
+ </Badge>
95
+ </Card.Header>
96
+ <Card.Body className="p-0">
97
+ <ListGroup variant="flush">
98
+ {logs.warnings.map((warn: any, i: number) => (
99
+ <ListGroup.Item key={i} className="text-warning">
100
+ <div className="d-flex justify-content-between">
101
+ <strong>
102
+ {warn.location?.file || 'Unknown file'}
103
+ {warn.location?.line && `:${warn.location.line}`}
104
+ </strong>
105
+ <small className="text-muted">
106
+ {warn.pluginName ? `[${warn.pluginName}]` : ''}
107
+ </small>
108
+ </div>
109
+ <div className="mt-1">
110
+ <pre className="mb-0 p-2 bg-light rounded">
111
+ {warn.text || warn.message || JSON.stringify(warn)}
112
+ </pre>
113
+ </div>
114
+ {warn.detail && (
115
+ <div className="mt-1 small text-muted">
116
+ <pre className="mb-0 p-2 bg-light rounded">
117
+ {warn.detail}
118
+ </pre>
119
+ </div>
120
+ )}
121
+ </ListGroup.Item>
122
+ ))}
123
+ </ListGroup>
124
+ </Card.Body>
125
+ </Card>
126
+ ) : (
127
+ <Alert variant="info">No warnings found</Alert>
128
+ )}
129
+ </Tab.Pane>
130
+ <Tab.Pane eventKey="errors">
131
+ {hasErrors ? (
132
+ <Card className="border-danger">
133
+ <Card.Header className="bg-danger text-white d-flex justify-content-between align-items-center">
134
+ <span>Build Errors ({logs.errors.length})</span>
135
+ <Badge bg="light" text="dark">
136
+ {new Date().toLocaleString()}
137
+ </Badge>
138
+ </Card.Header>
139
+ <Card.Body className="p-0">
140
+ <ListGroup variant="flush">
141
+ {logs.errors.map((err: any, i: number) => (
142
+ <ListGroup.Item key={i} className="text-danger">
143
+ <div className="d-flex justify-content-between">
144
+ <strong>
145
+ {err.location?.file || 'Unknown file'}
146
+ {err.location?.line && `:${err.location.line}`}
147
+ </strong>
148
+ <small className="text-muted">
149
+ {err.pluginName ? `[${err.pluginName}]` : ''}
150
+ </small>
151
+ </div>
152
+ <div className="mt-1">
153
+ <pre className="mb-0 p-2 bg-light rounded">
154
+ {err.text || err.message || JSON.stringify(err)}
155
+ </pre>
156
+ </div>
157
+ {err.detail && (
158
+ <div className="mt-1 small text-muted">
159
+ <pre className="mb-0 p-2 bg-light rounded">
160
+ {err.detail}
161
+ </pre>
162
+ </div>
163
+ )}
164
+ </ListGroup.Item>
165
+ ))}
166
+ </ListGroup>
167
+ </Card.Body>
168
+ </Card>
169
+ ) : (
170
+ <Alert variant="success">
171
+ <h5>No Errors Found</h5>
172
+ <p className="mb-0">The build completed without any errors.</p>
173
+ </Alert>
174
+ )}
175
+ </Tab.Pane>
176
+ </Tab.Content>
177
+ </Tab.Container>
178
+ </div>
179
+ );
180
+ };
181
+
182
+ export type IProjectPageViewProps = {
183
+ summary,
184
+ nodeLogs,
185
+ webLogs,
186
+ pureLogs,
187
+ config,
188
+ loading,
189
+ error,
190
+ projectName,
191
+ route,
192
+ setRoute,
193
+ navigate
194
+ };
195
+
196
+ export const ProjectPageView = ({
197
+ summary,
198
+ nodeLogs,
199
+ webLogs,
200
+ pureLogs,
201
+ config,
202
+ loading,
203
+ error,
204
+ projectName,
205
+ route,
206
+ setRoute,
207
+ navigate
208
+ }: IProjectPageViewProps) => {
209
+ if (loading) return <div>Loading project data...</div>;
210
+ if (error) return <Alert variant="danger">Error: {error}</Alert>;
211
+ if (!summary) return <Alert variant="warning">No data found for project</Alert>;
212
+
213
+ const testStatuses = Object.entries(summary).map(([testName, testData]) => {
214
+ const runTime = config.tests?.find((t) => t[0] === testName)?.[1] || 'node';
215
+ return {
216
+ testName,
217
+ testsExist: testData.testsExist !== false,
218
+ runTimeErrors: Number(testData.runTimeErrors) || 0,
219
+ typeErrors: Number(testData.typeErrors) || 0,
220
+ staticErrors: Number(testData.staticErrors) || 0,
221
+ runTime
222
+ };
223
+ });
224
+
225
+ return (
226
+ <Container fluid>
227
+ <NavBar
228
+ title={projectName}
229
+ backLink="/"
230
+ navItems={[
231
+ {
232
+ to: `#tests`,
233
+ label: testStatuses.some(t => t.runTimeErrors > 0) ? '❌ Tests' :
234
+ testStatuses.some(t => t.typeErrors > 0 || t.staticErrors > 0) ? '⚠️ Tests' : '✅ Tests',
235
+ active: route === 'tests',
236
+ className: testStatuses.some(t => t.runTimeErrors > 0) ? 'text-danger fw-bold' :
237
+ testStatuses.some(t => t.typeErrors > 0 || t.staticErrors > 0) ? 'text-warning fw-bold' : ''
238
+ },
239
+ {
240
+ to: `#node`,
241
+ label: nodeLogs?.errors?.length ? '❌ Node Build' :
242
+ nodeLogs?.warnings?.length ? '⚠️ Node Build' : 'Node Build',
243
+ active: route === 'node',
244
+ className: nodeLogs?.errors?.length ? 'text-danger fw-bold' :
245
+ nodeLogs?.warnings?.length ? 'text-warning fw-bold' : ''
246
+ },
247
+ {
248
+ to: `#web`,
249
+ label: webLogs?.errors?.length ? '❌ Web Build' :
250
+ webLogs?.warnings?.length ? '⚠️ Web Build' : 'Web Build',
251
+ active: route === 'web',
252
+ className: webLogs?.errors?.length ? 'text-danger fw-bold' :
253
+ webLogs?.warnings?.length ? 'text-warning fw-bold' : ''
254
+ },
255
+ {
256
+ to: `#pure`,
257
+ label: pureLogs?.errors?.length ? '❌ Pure Build' :
258
+ pureLogs?.warnings?.length ? '⚠️ Pure Build' : 'Pure Build',
259
+ active: route === 'pure',
260
+ className: pureLogs?.errors?.length ? 'text-danger fw-bold' :
261
+ pureLogs?.warnings?.length ? 'text-warning fw-bold' : ''
262
+ },
263
+ ]}
264
+ />
265
+
266
+ <Tab.Container activeKey={route} onSelect={(k) => {
267
+ if (k) {
268
+ setRoute(k);
269
+ navigate(`#${k}`, { replace: true });
270
+ }
271
+ }}>
272
+ <Tab.Content>
273
+ <Tab.Pane eventKey="tests">
274
+ <Table striped bordered hover>
275
+ <thead>
276
+ <tr>
277
+ <th>Test</th>
278
+ <th>Runtime</th>
279
+ <th>Status</th>
280
+ <th>Type Errors</th>
281
+ <th>Lint Errors</th>
282
+ </tr>
283
+ </thead>
284
+ <tbody>
285
+ {testStatuses.map((test) => (
286
+ <tr key={test.testName}>
287
+ <td>
288
+ <a href={`#/projects/${projectName}/tests/${encodeURIComponent(test.testName)}/${test.runTime}`}>
289
+ {test.testName}
290
+ </a>
291
+ </td>
292
+ <td>
293
+ <Badge bg="secondary" className="ms-2">
294
+ {test.runTime}
295
+ </Badge>
296
+ </td>
297
+ <td>
298
+ <TestStatusBadge
299
+ testName={test.testName}
300
+ testsExist={test.testsExist}
301
+ runTimeErrors={test.runTimeErrors}
302
+ />
303
+ </td>
304
+ <td>
305
+ <a href={`#/projects/${projectName}/tests/${encodeURIComponent(test.testName)}/${test.runTime}#types`}>
306
+ {test.typeErrors > 0 ? `❌ ${test.typeErrors}` : '✅'}
307
+ </a>
308
+ </td>
309
+ <td>
310
+ <a href={`#/projects/${projectName}/tests/${encodeURIComponent(test.testName)}/${test.runTime}#lint`}>
311
+ {test.staticErrors > 0 ? `❌ ${test.staticErrors}` : '✅'}
312
+ </a>
313
+ </td>
314
+ </tr>
315
+ ))}
316
+ </tbody>
317
+ </Table>
318
+ </Tab.Pane>
319
+ <Tab.Pane eventKey="node">
320
+ <BuildLogViewer logs={nodeLogs} runtime="Node" />
321
+ </Tab.Pane>
322
+ <Tab.Pane eventKey="web">
323
+ <BuildLogViewer logs={webLogs} runtime="Web" />
324
+ </Tab.Pane>
325
+ <Tab.Pane eventKey="pure">
326
+ <BuildLogViewer logs={pureLogs} runtime="Pure" />
327
+ </Tab.Pane>
328
+ </Tab.Content>
329
+ </Tab.Container>
330
+ </Container>
331
+ );
332
+ };
@@ -0,0 +1,99 @@
1
+ import React from 'react';
2
+ import { Table, Alert } from 'react-bootstrap';
3
+ import { NavBar } from '../../NavBar';
4
+
5
+ export const ProjectsPageView = ({
6
+ projects,
7
+ summaries,
8
+ configs,
9
+ loading,
10
+ error,
11
+ navigate
12
+ }) => {
13
+ const getStatusIcon = (status: string) => {
14
+ switch (status) {
15
+ case 'success': return '✅';
16
+ case 'failed': return '❌';
17
+ case 'warning': return '⚠️';
18
+ default: return '❓';
19
+ }
20
+ };
21
+
22
+ if (loading) return <div>Loading projects...</div>;
23
+ if (error) return <Alert variant="danger">Error: {error}</Alert>;
24
+
25
+ return (
26
+ <div className="p-3">
27
+ <NavBar title="Testeranto" backLink={null} />
28
+ <Table striped bordered hover responsive>
29
+ <thead>
30
+ <tr>
31
+ <th>Project</th>
32
+ <th>Tests</th>
33
+ <th>Node</th>
34
+ <th>Web</th>
35
+ <th>Pure</th>
36
+ </tr>
37
+ </thead>
38
+ <tbody>
39
+ {projects.map((project) => (
40
+ <tr key={project.name}>
41
+ <td>
42
+ <a href="#" onClick={(e) => {
43
+ e.preventDefault();
44
+ navigate(`/projects/${project.name}`);
45
+ }}>{project.name}</a>
46
+ </td>
47
+ <td>
48
+ <div style={{ maxHeight: '200px', overflowY: 'auto' }}>
49
+ {summaries[project.name] ? (
50
+ Object.keys(summaries[project.name]).map(testName => {
51
+ const testData = summaries[project.name][testName];
52
+ const runTime = configs[project.name].tests.find((t) => t[0] === testName)[1];
53
+ const hasRuntimeErrors = testData.runTimeErrors > 0;
54
+ const hasStaticErrors = testData.typeErrors > 0 || testData.staticErrors > 0;
55
+
56
+ return (
57
+ <div key={testName}>
58
+ <a
59
+ href={`#/projects/${project.name}/tests/${encodeURIComponent(testName)}/${runTime}`}
60
+ >
61
+ {hasRuntimeErrors ? '❌ ' : hasStaticErrors ? '⚠️ ' : ''}
62
+ {testName.split('/').pop()}
63
+ </a>
64
+ </div>
65
+ )
66
+ })
67
+ ) : (
68
+ <div>Loading tests...</div>
69
+ )}
70
+ </div>
71
+ </td>
72
+ <td>
73
+ <a
74
+ href={`#/projects/${project.name}#node`}
75
+ >
76
+ {getStatusIcon(project.nodeStatus)} Node build logs
77
+ </a>
78
+ </td>
79
+ <td>
80
+ <a
81
+ href={`#/projects/${project.name}#web`}
82
+ >
83
+ {getStatusIcon(project.webStatus)} Web build logs
84
+ </a>
85
+ </td>
86
+ <td>
87
+ <a
88
+ href={`#/projects/${project.name}#pure`}
89
+ >
90
+ {getStatusIcon(project.pureStatus)} Pure build logs
91
+ </a>
92
+ </td>
93
+ </tr>
94
+ ))}
95
+ </tbody>
96
+ </Table>
97
+ </div>
98
+ );
99
+ };