testeranto 0.159.0 → 0.161.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 (60) hide show
  1. package/dist/common/src/PM/PM_WithEslintAndTsc.js +8 -1
  2. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.implementation.js +13 -1
  3. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.mock.js +4 -1
  4. package/dist/common/src/lib/baseBuilder.test/baseBuilder.test.specification.js +6 -1
  5. package/dist/common/src/lib/classBuilder.test/classBuilder.test.implementation.js +9 -8
  6. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  7. package/dist/module/src/PM/PM_WithEslintAndTsc.js +8 -1
  8. package/dist/module/src/ProjectPage.js +128 -21
  9. package/dist/module/src/ProjectsPage.js +15 -9
  10. package/dist/module/src/TestPage.js +13 -1
  11. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.implementation.js +13 -1
  12. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.mock.js +4 -1
  13. package/dist/module/src/lib/baseBuilder.test/baseBuilder.test.specification.js +6 -1
  14. package/dist/module/src/lib/classBuilder.test/classBuilder.test.implementation.js +9 -8
  15. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  16. package/dist/prebuild/App.js +814 -376
  17. package/dist/prebuild/run.mjs +8 -1
  18. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  19. package/notify.sh +47 -0
  20. package/package.json +1 -1
  21. package/src/PM/PM_WithEslintAndTsc.ts +8 -1
  22. package/src/ProjectPage.tsx +204 -38
  23. package/src/ProjectsPage.tsx +23 -19
  24. package/src/TestPage.tsx +12 -1
  25. package/src/lib/baseBuilder.test/baseBuilder.test.implementation.ts +15 -9
  26. package/src/lib/baseBuilder.test/baseBuilder.test.mock.ts +4 -1
  27. package/src/lib/baseBuilder.test/baseBuilder.test.specification.ts +6 -1
  28. package/src/lib/classBuilder.test/classBuilder.test.implementation.ts +8 -5
  29. package/testeranto/App.js +814 -376
  30. package/testeranto/bundles/node/allTests/metafile.json +15 -10
  31. package/testeranto/bundles/node/allTests/src/lib/baseBuilder.test/baseBuilder.test.node.mjs +22 -5
  32. package/testeranto/bundles/node/allTests/src/lib/classBuilder.test/classBuilder.test.mjs +7 -7
  33. package/testeranto/bundles/pure/allTests/metafile.json +7 -7
  34. package/testeranto/bundles/pure/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure.mjs +22 -5
  35. package/testeranto/bundles/web/allTests/metafile.json +7 -7
  36. package/testeranto/bundles/web/allTests/src/lib/baseBuilder.test/baseBuilder.test.web.mjs +22 -5
  37. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/lint_errors.txt +4 -4
  38. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/message.txt +2 -1
  39. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/prompt.txt +5 -0
  40. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.node/node/type_errors.txt +22 -19
  41. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/lint_errors.txt +4 -4
  42. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/message.txt +2 -1
  43. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/prompt.txt +5 -0
  44. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.pure/pure/type_errors.txt +22 -19
  45. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/lint_errors.txt +4 -4
  46. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/logs.txt +1 -9
  47. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/message.txt +2 -1
  48. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/prompt.txt +5 -0
  49. package/testeranto/reports/allTests/src/lib/baseBuilder.test/baseBuilder.test.web/web/type_errors.txt +22 -19
  50. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/bdd_errors.txt +1 -0
  51. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/logs.txt +85 -23
  52. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/message.txt +2 -1
  53. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/prompt.txt +5 -0
  54. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/tests.json +24 -0
  55. package/testeranto/reports/allTests/src/lib/classBuilder.test/classBuilder.test/node/type_errors.txt +13 -9
  56. package/testeranto/reports/allTests/summary.json +5 -5
  57. package/dist/module/src/BuildLogsPage.js +0 -99
  58. package/dist/module/src/Project.js +0 -332
  59. package/src/BuildLogsPage.tsx +0 -108
  60. package/src/Project.tsx +0 -375
@@ -97,12 +97,19 @@ ${addableFiles
97
97
  })
98
98
  .join("\n")}
99
99
 
100
+ /read node_modules/testeranto/docs/index.md
101
+ /read node_modules/testeranto/docs/style.md
102
+ /read node_modules/testeranto/docs/testing.ai.txt
103
+ /read node_modules/testeranto/src/CoreTypes.ts
104
+
100
105
  /read ${testPaths}
101
106
  /read ${logPath}
102
107
  /read ${typePath}
103
108
  /read ${lintPath}
104
109
  `);
105
- fs.writeFileSync(messagePath, `Fix the failing tests described in ${testPaths} and ${logPath}. DO NOT refactor beyond what is necessary. Always prefer minimal changes, focusing mostly on keeping the BDD tests passing`);
110
+ fs.writeFileSync(messagePath, `
111
+ Fix the failing tests described in ${testPaths} and ${logPath}. Focus on the bdd tests before all other concerns. You may add any debugging you think is necessary.
112
+ `);
106
113
  this.summary[entryPoint].prompt = `aider --model deepseek/deepseek-chat --load testeranto/${this.name}/reports/${platform}/${entryPoint
107
114
  .split(".")
108
115
  .slice(0, -1)
@@ -1,10 +1,113 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { Tab, Container, Alert, Table } from 'react-bootstrap';
2
+ import { Tab } from 'react-bootstrap';
3
+ import { Card, ListGroup, Badge } from 'react-bootstrap';
4
+ const BuildLogViewer = ({ logs, runtime }) => {
5
+ var _a, _b, _c, _d, _e, _f;
6
+ if (!logs)
7
+ return React.createElement(Alert, { variant: "info" },
8
+ "Loading ",
9
+ runtime.toLowerCase(),
10
+ " build logs...");
11
+ const hasErrors = ((_a = logs.errors) === null || _a === void 0 ? void 0 : _a.length) > 0;
12
+ const hasWarnings = ((_b = logs.warnings) === null || _b === void 0 ? void 0 : _b.length) > 0;
13
+ const [activeTab, setActiveTab] = useState('summary');
14
+ return (React.createElement("div", null,
15
+ React.createElement(Tab.Container, { activeKey: activeTab, onSelect: (k) => setActiveTab(k || 'summary') },
16
+ React.createElement(Nav, { variant: "tabs", className: "mb-3" },
17
+ React.createElement(Nav.Item, null,
18
+ React.createElement(Nav.Link, { eventKey: "summary" }, "Build Summary")),
19
+ React.createElement(Nav.Item, null,
20
+ React.createElement(Nav.Link, { eventKey: "warnings" }, hasWarnings ? `⚠️ Warnings (${logs.warnings.length})` : 'Warnings')),
21
+ React.createElement(Nav.Item, null,
22
+ React.createElement(Nav.Link, { eventKey: "errors" }, hasErrors ? `❌ Errors (${logs.errors.length})` : 'Errors'))),
23
+ React.createElement(Tab.Content, null,
24
+ React.createElement(Tab.Pane, { eventKey: "summary" },
25
+ React.createElement(Card, null,
26
+ React.createElement(Card.Header, { className: "d-flex justify-content-between align-items-center" },
27
+ React.createElement("h5", null, "Build Summary"),
28
+ React.createElement("div", null,
29
+ hasErrors && (React.createElement(Badge, { bg: "danger", className: "me-2" },
30
+ logs.errors.length,
31
+ " Error",
32
+ logs.errors.length !== 1 ? 's' : '')),
33
+ hasWarnings && (React.createElement(Badge, { bg: "warning", text: "dark" },
34
+ logs.warnings.length,
35
+ " Warning",
36
+ logs.warnings.length !== 1 ? 's' : '')),
37
+ !hasErrors && !hasWarnings && (React.createElement(Badge, { bg: "success" }, "Build Successful")))),
38
+ React.createElement(Card.Body, null,
39
+ React.createElement("div", { className: "mb-3" },
40
+ React.createElement("h6", null,
41
+ "Input Files (",
42
+ Object.keys(((_c = logs.metafile) === null || _c === void 0 ? void 0 : _c.inputs) || {}).length,
43
+ ")"),
44
+ React.createElement(ListGroup, { className: "max-h-200 overflow-auto" }, Object.keys(((_d = logs.metafile) === null || _d === void 0 ? void 0 : _d.inputs) || {}).map((file) => (React.createElement(ListGroup.Item, { key: file, className: "py-2" },
45
+ React.createElement("code", null, file),
46
+ React.createElement("div", { className: "text-muted small" },
47
+ logs.metafile.inputs[file].bytes,
48
+ " bytes")))))),
49
+ React.createElement("div", null,
50
+ React.createElement("h6", null,
51
+ "Output Files (",
52
+ Object.keys(((_e = logs.metafile) === null || _e === void 0 ? void 0 : _e.outputs) || {}).length,
53
+ ")"),
54
+ React.createElement(ListGroup, { className: "max-h-200 overflow-auto" }, Object.keys(((_f = logs.metafile) === null || _f === void 0 ? void 0 : _f.outputs) || {}).map((file) => (React.createElement(ListGroup.Item, { key: file, className: "py-2" },
55
+ React.createElement("code", null, file),
56
+ React.createElement("div", { className: "text-muted small" },
57
+ logs.metafile.outputs[file].bytes,
58
+ " bytes",
59
+ logs.metafile.outputs[file].entryPoint && (React.createElement("span", { className: "ms-2 badge bg-info" }, "Entry Point"))))))))))),
60
+ React.createElement(Tab.Pane, { eventKey: "warnings" }, hasWarnings ? (React.createElement(Card, { className: "border-warning" },
61
+ React.createElement(Card.Header, { className: "bg-warning text-white d-flex justify-content-between align-items-center" },
62
+ React.createElement("span", null,
63
+ "Build Warnings (",
64
+ logs.warnings.length,
65
+ ")"),
66
+ React.createElement(Badge, { bg: "light", text: "dark" }, new Date().toLocaleString())),
67
+ React.createElement(Card.Body, { className: "p-0" },
68
+ React.createElement(ListGroup, { variant: "flush" }, logs.warnings.map((warn, i) => {
69
+ var _a, _b;
70
+ return (React.createElement(ListGroup.Item, { key: i, className: "text-warning" },
71
+ React.createElement("div", { className: "d-flex justify-content-between" },
72
+ React.createElement("strong", null,
73
+ ((_a = warn.location) === null || _a === void 0 ? void 0 : _a.file) || 'Unknown file',
74
+ ((_b = warn.location) === null || _b === void 0 ? void 0 : _b.line) && `:${warn.location.line}`),
75
+ React.createElement("small", { className: "text-muted" }, warn.pluginName ? `[${warn.pluginName}]` : '')),
76
+ React.createElement("div", { className: "mt-1" },
77
+ React.createElement("pre", { className: "mb-0 p-2 bg-light rounded" }, warn.text || warn.message || JSON.stringify(warn))),
78
+ warn.detail && (React.createElement("div", { className: "mt-1 small text-muted" },
79
+ React.createElement("pre", { className: "mb-0 p-2 bg-light rounded" }, warn.detail)))));
80
+ }))))) : (React.createElement(Alert, { variant: "info" }, "No warnings found"))),
81
+ React.createElement(Tab.Pane, { eventKey: "errors" }, hasErrors ? (React.createElement(Card, { className: "border-danger" },
82
+ React.createElement(Card.Header, { className: "bg-danger text-white d-flex justify-content-between align-items-center" },
83
+ React.createElement("span", null,
84
+ "Build Errors (",
85
+ logs.errors.length,
86
+ ")"),
87
+ React.createElement(Badge, { bg: "light", text: "dark" }, new Date().toLocaleString())),
88
+ React.createElement(Card.Body, { className: "p-0" },
89
+ React.createElement(ListGroup, { variant: "flush" }, logs.errors.map((err, i) => {
90
+ var _a, _b;
91
+ return (React.createElement(ListGroup.Item, { key: i, className: "text-danger" },
92
+ React.createElement("div", { className: "d-flex justify-content-between" },
93
+ React.createElement("strong", null,
94
+ ((_a = err.location) === null || _a === void 0 ? void 0 : _a.file) || 'Unknown file',
95
+ ((_b = err.location) === null || _b === void 0 ? void 0 : _b.line) && `:${err.location.line}`),
96
+ React.createElement("small", { className: "text-muted" }, err.pluginName ? `[${err.pluginName}]` : '')),
97
+ React.createElement("div", { className: "mt-1" },
98
+ React.createElement("pre", { className: "mb-0 p-2 bg-light rounded" }, err.text || err.message || JSON.stringify(err))),
99
+ err.detail && (React.createElement("div", { className: "mt-1 small text-muted" },
100
+ React.createElement("pre", { className: "mb-0 p-2 bg-light rounded" }, err.detail)))));
101
+ }))))) : (React.createElement(Alert, { variant: "success" },
102
+ React.createElement("h5", null, "No Errors Found"),
103
+ React.createElement("p", { className: "mb-0" }, "The build completed without any errors."))))))));
104
+ };
105
+ import { Nav, Container, Alert, Table } from 'react-bootstrap';
3
106
  import { useParams, useNavigate, useLocation } from 'react-router-dom';
4
107
  import "./TestReport.scss";
5
108
  import { NavBar } from './NavBar';
6
109
  export const ProjectPage = () => {
7
- var _a, _b, _c, _d, _e, _f;
110
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
8
111
  const [summary, setSummary] = useState(null);
9
112
  const [nodeLogs, setNodeLogs] = useState(null);
10
113
  const [webLogs, setWebLogs] = useState(null);
@@ -83,24 +186,37 @@ export const ProjectPage = () => {
83
186
  return React.createElement(Alert, { variant: "warning" }, "No data found for project");
84
187
  return (React.createElement(Container, { fluid: true },
85
188
  React.createElement(NavBar, { title: projectName, backLink: "/", navItems: [
86
- { to: `#tests`, label: 'Tests', active: route === 'tests' },
189
+ {
190
+ to: `#tests`,
191
+ label: Object.values(summary).some(t => t.runTimeErrors > 0) ? '❌ Tests' :
192
+ Object.values(summary).some(t => t.typeErrors > 0 || t.staticErrors > 0) ? '⚠️ Tests' : '✅ Tests',
193
+ active: route === 'tests',
194
+ className: Object.values(summary).some(t => t.runTimeErrors > 0) ? 'text-danger fw-bold' :
195
+ Object.values(summary).some(t => t.typeErrors > 0 || t.staticErrors > 0) ? 'text-warning fw-bold' : ''
196
+ },
87
197
  {
88
198
  to: `#node`,
89
- label: ((_a = nodeLogs === null || nodeLogs === void 0 ? void 0 : nodeLogs.errors) === null || _a === void 0 ? void 0 : _a.length) ? '❌ Node Build' : '✅ Node Build',
199
+ label: ((_a = nodeLogs === null || nodeLogs === void 0 ? void 0 : nodeLogs.errors) === null || _a === void 0 ? void 0 : _a.length) ? '❌ Node Build' :
200
+ ((_b = nodeLogs === null || nodeLogs === void 0 ? void 0 : nodeLogs.warnings) === null || _b === void 0 ? void 0 : _b.length) ? '⚠️ Node Build' : 'Node Build',
90
201
  active: route === 'node',
91
- className: ((_b = nodeLogs === null || nodeLogs === void 0 ? void 0 : nodeLogs.errors) === null || _b === void 0 ? void 0 : _b.length) ? 'text-danger fw-bold' : 'text-success fw-bold'
202
+ className: ((_c = nodeLogs === null || nodeLogs === void 0 ? void 0 : nodeLogs.errors) === null || _c === void 0 ? void 0 : _c.length) ? 'text-danger fw-bold' :
203
+ ((_d = nodeLogs === null || nodeLogs === void 0 ? void 0 : nodeLogs.warnings) === null || _d === void 0 ? void 0 : _d.length) ? 'text-warning fw-bold' : ''
92
204
  },
93
205
  {
94
206
  to: `#web`,
95
- label: ((_c = webLogs === null || webLogs === void 0 ? void 0 : webLogs.errors) === null || _c === void 0 ? void 0 : _c.length) ? '❌ Web Build' : '✅ Web Build',
207
+ label: ((_e = webLogs === null || webLogs === void 0 ? void 0 : webLogs.errors) === null || _e === void 0 ? void 0 : _e.length) ? '❌ Web Build' :
208
+ ((_f = webLogs === null || webLogs === void 0 ? void 0 : webLogs.warnings) === null || _f === void 0 ? void 0 : _f.length) ? '⚠️ Web Build' : 'Web Build',
96
209
  active: route === 'web',
97
- className: ((_d = webLogs === null || webLogs === void 0 ? void 0 : webLogs.errors) === null || _d === void 0 ? void 0 : _d.length) ? 'text-danger fw-bold' : 'text-success fw-bold'
210
+ className: ((_g = webLogs === null || webLogs === void 0 ? void 0 : webLogs.errors) === null || _g === void 0 ? void 0 : _g.length) ? 'text-danger fw-bold' :
211
+ ((_h = webLogs === null || webLogs === void 0 ? void 0 : webLogs.warnings) === null || _h === void 0 ? void 0 : _h.length) ? 'text-warning fw-bold' : ''
98
212
  },
99
213
  {
100
214
  to: `#pure`,
101
- label: ((_e = pureLogs === null || pureLogs === void 0 ? void 0 : pureLogs.errors) === null || _e === void 0 ? void 0 : _e.length) ? '❌ Pure Build' : '✅ Pure Build',
215
+ label: ((_j = pureLogs === null || pureLogs === void 0 ? void 0 : pureLogs.errors) === null || _j === void 0 ? void 0 : _j.length) ? '❌ Pure Build' :
216
+ ((_k = pureLogs === null || pureLogs === void 0 ? void 0 : pureLogs.warnings) === null || _k === void 0 ? void 0 : _k.length) ? '⚠️ Pure Build' : 'Pure Build',
102
217
  active: route === 'pure',
103
- className: ((_f = pureLogs === null || pureLogs === void 0 ? void 0 : pureLogs.errors) === null || _f === void 0 ? void 0 : _f.length) ? 'text-danger fw-bold' : 'text-success fw-bold'
218
+ className: ((_l = pureLogs === null || pureLogs === void 0 ? void 0 : pureLogs.errors) === null || _l === void 0 ? void 0 : _l.length) ? 'text-danger fw-bold' :
219
+ ((_m = pureLogs === null || pureLogs === void 0 ? void 0 : pureLogs.warnings) === null || _m === void 0 ? void 0 : _m.length) ? 'text-warning fw-bold' : ''
104
220
  },
105
221
  ] }),
106
222
  React.createElement(Tab.Container, { activeKey: route, onSelect: (k) => {
@@ -115,7 +231,6 @@ export const ProjectPage = () => {
115
231
  React.createElement("thead", null,
116
232
  React.createElement("tr", null,
117
233
  React.createElement("th", null, "Test"),
118
- React.createElement("th", null, "Build logs"),
119
234
  React.createElement("th", null, "BDD Errors"),
120
235
  React.createElement("th", null, "Type Errors"),
121
236
  React.createElement("th", null, "Lint Errors"))),
@@ -124,11 +239,6 @@ export const ProjectPage = () => {
124
239
  return (React.createElement("tr", { key: testName },
125
240
  React.createElement("td", null,
126
241
  React.createElement("a", { href: `#/projects/${projectName}/tests/${encodeURIComponent(testName)}/${runTime}` }, testName)),
127
- React.createElement("td", null,
128
- React.createElement("a", { href: `#/projects/${projectName}#${runTime}` },
129
- runTime,
130
- " ",
131
- testData.runTimeErrors === 0 ? '✅' : '❌')),
132
242
  React.createElement("td", null,
133
243
  React.createElement("a", { href: `#/projects/${projectName}/tests/${encodeURIComponent(testName)}/${runTime}#results` }, testData.runTimeErrors === 0 ? '✅ Passed' :
134
244
  testData.runTimeErrors > 0 ? `⚠️ ${testData.runTimeErrors} errors` :
@@ -139,12 +249,9 @@ export const ProjectPage = () => {
139
249
  React.createElement("a", { href: `#/projects/${projectName}/tests/${encodeURIComponent(testName)}/${runTime}#lint` }, testData.staticErrors))));
140
250
  })))),
141
251
  React.createElement(Tab.Pane, { eventKey: "node" },
142
- React.createElement("ul", null, nodeLogs.errors.map((err, i) => (React.createElement("li", { key: i }, err.text || err.message || JSON.stringify(err))))),
143
- React.createElement("pre", { className: "bg-dark text-white p-3" }, nodeLogs ? JSON.stringify(nodeLogs, null, 2) : 'Loading node build logs...')),
252
+ React.createElement(BuildLogViewer, { logs: nodeLogs, runtime: "Node" })),
144
253
  React.createElement(Tab.Pane, { eventKey: "web" },
145
- React.createElement("ul", null, webLogs.errors.map((err, i) => (React.createElement("li", { key: i }, err.text || err.message || JSON.stringify(err))))),
146
- React.createElement("pre", { className: "bg-dark text-white p-3" }, webLogs ? JSON.stringify(webLogs, null, 2) : 'Loading web build logs...')),
254
+ React.createElement(BuildLogViewer, { logs: webLogs, runtime: "Web" })),
147
255
  React.createElement(Tab.Pane, { eventKey: "pure" },
148
- React.createElement("ul", null, pureLogs.errors.map((err, i) => (React.createElement("li", { key: i }, err.text || err.message || JSON.stringify(err))))),
149
- React.createElement("pre", { className: "bg-dark text-white p-3" }, pureLogs ? JSON.stringify(pureLogs, null, 2) : 'Loading pure build logs...'))))));
256
+ React.createElement(BuildLogViewer, { logs: pureLogs, runtime: "Pure" }))))));
150
257
  };
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { Table, Alert, Badge } from 'react-bootstrap';
2
+ import { Table, Alert } from 'react-bootstrap';
3
3
  import { useNavigate } from 'react-router-dom';
4
4
  import { NavBar } from "./NavBar";
5
5
  export const ProjectsPage = () => {
@@ -16,7 +16,7 @@ export const ProjectsPage = () => {
16
16
  const projectNames = await projectsRes.json();
17
17
  // const projectNames = Object.keys(config.projects);
18
18
  const projectsData = await Promise.all(projectNames.map(async (name) => {
19
- var _a, _b, _c;
19
+ var _a, _b, _c, _d, _e, _f;
20
20
  const [summaryRes, nodeRes, webRes, pureRes, configRes] = await Promise.all([
21
21
  fetch(`reports/${name}/summary.json`),
22
22
  fetch(`bundles/node/${name}/metafile.json`),
@@ -36,9 +36,9 @@ export const ProjectsPage = () => {
36
36
  return {
37
37
  name,
38
38
  testCount: Object.keys(summary).length,
39
- nodeStatus: ((_a = nodeData.errors) === null || _a === void 0 ? void 0 : _a.length) ? 'failed' : 'success',
40
- webStatus: ((_b = webData.errors) === null || _b === void 0 ? void 0 : _b.length) ? 'failed' : 'success',
41
- pureStatus: ((_c = pureData.errors) === null || _c === void 0 ? void 0 : _c.length) ? 'failed' : 'success',
39
+ nodeStatus: ((_a = nodeData.errors) === null || _a === void 0 ? void 0 : _a.length) ? 'failed' : ((_b = nodeData.warnings) === null || _b === void 0 ? void 0 : _b.length) ? 'warning' : 'success',
40
+ webStatus: ((_c = webData.errors) === null || _c === void 0 ? void 0 : _c.length) ? 'failed' : ((_d = webData.warnings) === null || _d === void 0 ? void 0 : _d.length) ? 'warning' : 'success',
41
+ pureStatus: ((_e = pureData.errors) === null || _e === void 0 ? void 0 : _e.length) ? 'failed' : ((_f = pureData.warnings) === null || _f === void 0 ? void 0 : _f.length) ? 'warning' : 'success',
42
42
  config: Object.keys(configData).length,
43
43
  };
44
44
  }));
@@ -57,6 +57,7 @@ export const ProjectsPage = () => {
57
57
  switch (status) {
58
58
  case 'success': return '✅';
59
59
  case 'failed': return '❌';
60
+ case 'warning': return '⚠️';
60
61
  default: return '❓';
61
62
  }
62
63
  };
@@ -85,20 +86,25 @@ export const ProjectsPage = () => {
85
86
  } }, project.name)),
86
87
  React.createElement("td", null,
87
88
  React.createElement("div", { style: { maxHeight: '200px', overflowY: 'auto' } }, summaries[project.name] ? (Object.keys(summaries[project.name]).map(testName => {
89
+ const testData = summaries[project.name][testName];
88
90
  const runTime = configs[project.name].tests.find((t) => t[0] === testName)[1];
91
+ const hasRuntimeErrors = testData.runTimeErrors > 0;
92
+ const hasStaticErrors = testData.typeErrors > 0 || testData.staticErrors > 0;
89
93
  return (React.createElement("div", { key: testName },
90
- React.createElement("a", { href: `#/projects/${project.name}/tests/${encodeURIComponent(testName)}/${runTime}` }, testName.split('/').pop())));
94
+ React.createElement("a", { href: `#/projects/${project.name}/tests/${encodeURIComponent(testName)}/${runTime}` },
95
+ hasRuntimeErrors ? '❌ ' : hasStaticErrors ? '⚠️ ' : '',
96
+ testName.split('/').pop())));
91
97
  })) : (React.createElement("div", null, "Loading tests...")))),
92
98
  React.createElement("td", null,
93
99
  React.createElement("a", { href: `#/projects/${project.name}#node` },
94
100
  getStatusIcon(project.nodeStatus),
95
- project.nodeStatus === 'failed' && (React.createElement(Badge, { bg: "danger", className: "ms-2" }, "Failed")))),
101
+ " Node build logs")),
96
102
  React.createElement("td", null,
97
103
  React.createElement("a", { href: `#/projects/${project.name}#web` },
98
104
  getStatusIcon(project.webStatus),
99
- project.webStatus === 'failed' && (React.createElement(Badge, { bg: "danger", className: "ms-2" }, "Failed")))),
105
+ " Web build logs")),
100
106
  React.createElement("td", null,
101
107
  React.createElement("a", { href: `#/projects/${project.name}#pure` },
102
108
  getStatusIcon(project.pureStatus),
103
- project.pureStatus === 'failed' && (React.createElement(Badge, { bg: "danger", className: "ms-2" }, "Failed")))))))))));
109
+ " Pure build logs")))))))));
104
110
  };
@@ -118,7 +118,19 @@ export const TestPage = () => {
118
118
  : 'eslint ✅',
119
119
  active: route === 'lint'
120
120
  },
121
- ], rightContent: React.createElement(Button, { variant: "info", onClick: () => alert("Magic robot activated!"), className: "ms-2" }, "\uD83E\uDD16") }),
121
+ ], rightContent: React.createElement(Button, { variant: "info", onClick: async () => {
122
+ try {
123
+ const promptPath = `testeranto/reports/${projectName}/${testPath.split('.').slice(0, -1).join('.')}/${runtime}/prompt.txt`;
124
+ const messagePath = `testeranto/reports/${projectName}/${testPath.split('.').slice(0, -1).join('.')}/${runtime}/message.txt`;
125
+ const command = `aider --load ${promptPath} --message-file ${messagePath}`;
126
+ await navigator.clipboard.writeText(command);
127
+ alert("Copied aider command to clipboard!");
128
+ }
129
+ catch (err) {
130
+ alert("Failed to copy command to clipboard");
131
+ console.error("Copy failed:", err);
132
+ }
133
+ }, className: "ms-2" }, "\uD83E\uDD16") }),
122
134
  React.createElement(Tab.Container, { activeKey: route, onSelect: (k) => {
123
135
  if (k) {
124
136
  setRoute(k);
@@ -6,7 +6,19 @@ export const implementation = {
6
6
  },
7
7
  givens: {
8
8
  Default: () => {
9
- return new MockBaseBuilder({}, {}, {}, {}, {}, {}, { ports: [] }, () => []);
9
+ const builder = new MockBaseBuilder({}, // input
10
+ {}, // suitesOverrides
11
+ {}, // givenOverrides
12
+ {}, // whenOverrides
13
+ {}, // thenOverrides
14
+ { ports: [0] }, // testResourceRequirement
15
+ () => [] // testSpecification
16
+ );
17
+ // Initialize required arrays
18
+ builder.artifacts = [];
19
+ builder.testJobs = [];
20
+ builder.specs = [];
21
+ return builder;
10
22
  },
11
23
  WithCustomInput: (input) => {
12
24
  return new MockBaseBuilder(input, {}, {}, {}, {}, {}, { ports: [] }, () => []);
@@ -3,7 +3,10 @@ import { BaseBuilder } from "../basebuilder";
3
3
  * Concrete implementation of BaseBuilder for testing purposes only
4
4
  */
5
5
  export class MockBaseBuilder extends BaseBuilder {
6
- constructor(input, suitesOverrides = {}, givenOverrides = {}, whenOverrides = {}, thenOverrides = {}, testResourceRequirement = { ports: [] }, testSpecification = () => []) {
6
+ constructor(input, suitesOverrides = {}, givenOverrides = {}, whenOverrides = {}, thenOverrides = {}, testResourceRequirement = { ports: [0] }, testSpecification = () => []) {
7
+ // Initialize required arrays
8
+ this.artifacts = [];
9
+ this.testJobs = [];
7
10
  super(input, suitesOverrides, givenOverrides, whenOverrides, thenOverrides, testResourceRequirement, testSpecification);
8
11
  this.summary = {};
9
12
  this.summary = {};
@@ -1,7 +1,12 @@
1
1
  export const specification = (Suite, Given, When, Then) => {
2
2
  return [
3
3
  Suite.Default("Testing BaseBuilder functionality", {
4
- testInitialization: Given.Default(["BaseBuilder should initialize correctly"], [], [Then.initializedProperly()]),
4
+ testInitialization: Given.Default(["BaseBuilder should initialize correctly"], [], [
5
+ Then.initializedProperly(),
6
+ Then.artifactsTracked(),
7
+ Then.jobsCreated(),
8
+ Then.specsGenerated()
9
+ ]),
5
10
  testSpecsGeneration: Given.Default(["BaseBuilder should generate specs from test specification"], [], [Then.specsGenerated()]),
6
11
  testJobsCreation: Given.Default(["BaseBuilder should create test jobs"], [], [Then.jobsCreated()]),
7
12
  }, []),
@@ -8,21 +8,20 @@ export const implementation = {
8
8
  },
9
9
  givens: {
10
10
  Default: () => {
11
- return new mock(implementation, // Use the current implementation
11
+ console.log('Creating default test builder instance');
12
+ const builder = new mock(implementation, // Use the current implementation
12
13
  specification, // Use the current specification
13
14
  {}, // Default input
14
- MockSuite,
15
- // class {}, // suiteKlasser
16
- class {
15
+ MockSuite, class {
17
16
  }, // givenKlasser
18
17
  class {
19
18
  }, // whenKlasser
20
19
  class {
21
20
  }, // thenKlasser
22
- class {
23
- }, // checkKlasser
24
21
  { ports: [] } // Default resource requirements
25
22
  );
23
+ console.log('Builder created:', builder);
24
+ return builder;
26
25
  },
27
26
  WithCustomInput: (input) => {
28
27
  return new mock(implementation, specification, input, class {
@@ -80,8 +79,10 @@ export const implementation = {
80
79
  },
81
80
  thens: {
82
81
  initializedProperly: () => (builder) => {
83
- if (!(builder instanceof TestClassBuilder)) {
84
- throw new Error("Builder was not properly initialized");
82
+ var _a;
83
+ console.log('Checking builder initialization:', builder);
84
+ if (!(builder instanceof mock)) {
85
+ throw new Error(`Builder was not properly initialized. Expected mock instance but got ${(_a = builder === null || builder === void 0 ? void 0 : builder.constructor) === null || _a === void 0 ? void 0 : _a.name}`);
85
86
  }
86
87
  return builder;
87
88
  },