testeranto 0.75.0 → 0.79.3

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 (136) hide show
  1. package/README.md +25 -24
  2. package/devBot.dockerfile +12 -0
  3. package/dist/common/Node.js +1 -0
  4. package/dist/common/PM/index.js +0 -64
  5. package/dist/common/PM/main.js +278 -7
  6. package/dist/common/PM/node.js +4 -0
  7. package/dist/common/PM/web.js +3 -0
  8. package/dist/common/Project.js +6 -2
  9. package/dist/common/Puppeteer.js +12 -17
  10. package/dist/common/Reporter.js +1 -8
  11. package/dist/common/SubPackages/react-dom/component/web.js +5 -25
  12. package/dist/common/SubPackages/react-dom/jsx/web.js +80 -55
  13. package/dist/common/SubPackages/react-test-renderer/component/index.js +0 -86
  14. package/dist/common/SubPackages/react-test-renderer/component/interface.js +68 -0
  15. package/dist/common/SubPackages/react-test-renderer/component/node.js +2 -2
  16. package/dist/common/SubPackages/react-test-renderer/component/web.js +2 -2
  17. package/dist/common/TaskManBackEnd.js +156 -0
  18. package/dist/common/Types.js +0 -2
  19. package/dist/common/esbuildConfigs/index.js +1 -0
  20. package/dist/common/esbuildConfigs/inputFilesPlugin.js +49 -0
  21. package/dist/common/esbuildConfigs/node.js +3 -1
  22. package/dist/common/esbuildConfigs/web.js +3 -1
  23. package/dist/common/lib/abstractBase.js +222 -17
  24. package/dist/common/lib/basebuilder.js +4 -38
  25. package/dist/common/lib/classBuilder.js +1 -3
  26. package/dist/common/lib/core.js +3 -5
  27. package/dist/common/mongooseSchemas.js +56 -0
  28. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  29. package/dist/common/utils.js +16 -0
  30. package/dist/module/ExampleTab.js +112 -0
  31. package/dist/module/Node.js +1 -0
  32. package/dist/module/PM/index.js +0 -64
  33. package/dist/module/PM/main.js +278 -7
  34. package/dist/module/PM/node.js +4 -0
  35. package/dist/module/PM/web.js +3 -0
  36. package/dist/module/Project.js +6 -2
  37. package/dist/module/Puppeteer.js +12 -17
  38. package/dist/module/Reporter.js +1 -8
  39. package/dist/module/SubPackages/react-dom/component/web.js +5 -25
  40. package/dist/module/SubPackages/react-dom/jsx/web.js +80 -55
  41. package/dist/module/SubPackages/react-test-renderer/component/index.js +1 -59
  42. package/dist/module/SubPackages/react-test-renderer/component/interface.js +39 -0
  43. package/dist/module/SubPackages/react-test-renderer/component/node.js +1 -1
  44. package/dist/module/SubPackages/react-test-renderer/component/web.js +1 -1
  45. package/dist/module/TaskManBackEnd.js +151 -0
  46. package/dist/module/TaskManFrontEnd.js +600 -0
  47. package/dist/module/Types.js +0 -2
  48. package/dist/module/esbuildConfigs/index.js +1 -0
  49. package/dist/module/esbuildConfigs/inputFilesPlugin.js +44 -0
  50. package/dist/module/esbuildConfigs/node.js +3 -1
  51. package/dist/module/esbuildConfigs/web.js +3 -1
  52. package/dist/module/lib/abstractBase.js +222 -17
  53. package/dist/module/lib/basebuilder.js +4 -38
  54. package/dist/module/lib/classBuilder.js +1 -3
  55. package/dist/module/lib/core.js +3 -5
  56. package/dist/module/mongooseSchemas.js +50 -0
  57. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  58. package/dist/module/utils.js +9 -0
  59. package/dist/prebuild/Report.js +117 -36
  60. package/dist/prebuild/TaskManBackEnd.mjs +185 -0
  61. package/dist/prebuild/TaskManFrontEnd.css +12301 -0
  62. package/dist/prebuild/TaskManFrontEnd.js +81737 -0
  63. package/dist/types/Node.d.ts +1 -1
  64. package/dist/types/PM/index.d.ts +2 -1
  65. package/dist/types/PM/main.d.ts +6 -3
  66. package/dist/types/PM/node.d.ts +2 -0
  67. package/dist/types/PM/web.d.ts +1 -0
  68. package/dist/types/SubPackages/puppeteer.d.ts +1 -1
  69. package/dist/types/SubPackages/react/component/node.d.ts +1 -1
  70. package/dist/types/SubPackages/react/component/web.d.ts +1 -1
  71. package/dist/types/SubPackages/react/jsx/node.d.ts +2 -2
  72. package/dist/types/SubPackages/react/jsx/web.d.ts +2 -2
  73. package/dist/types/SubPackages/react-dom/component/node.d.ts +2 -2
  74. package/dist/types/SubPackages/react-dom/component/web.d.ts +8 -2
  75. package/dist/types/SubPackages/react-dom/jsx/node.d.ts +2 -2
  76. package/dist/types/SubPackages/react-dom/jsx/web.d.ts +2 -2
  77. package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +2 -2
  78. package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +0 -7
  79. package/dist/types/SubPackages/react-test-renderer/component/interface.d.ts +9 -0
  80. package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +1 -2
  81. package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +1 -2
  82. package/dist/types/SubPackages/react-test-renderer/fc/node.d.ts +1 -1
  83. package/dist/types/SubPackages/react-test-renderer/fc/web.d.ts +1 -1
  84. package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +1 -2
  85. package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +1 -2
  86. package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +1 -2
  87. package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +1 -2
  88. package/dist/types/TaskManBackEnd.d.ts +1 -0
  89. package/dist/types/Types.d.ts +19 -19
  90. package/dist/types/Web.d.ts +1 -1
  91. package/dist/types/esbuildConfigs/inputFilesPlugin.d.ts +5 -0
  92. package/dist/types/lib/abstractBase.d.ts +8 -8
  93. package/dist/types/lib/basebuilder.d.ts +1 -1
  94. package/dist/types/lib/classBuilder.d.ts +1 -1
  95. package/dist/types/lib/core.d.ts +1 -1
  96. package/dist/types/lib/index.d.ts +5 -5
  97. package/dist/types/lib/types.d.ts +15 -13
  98. package/dist/types/mongooseSchemas.d.ts +124 -0
  99. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  100. package/dist/types/utils.d.ts +2 -0
  101. package/docker-compose-dev.yml +9 -0
  102. package/docker-compose-prod.yml +18 -0
  103. package/package.json +20 -7
  104. package/src/ExampleTab.tsx +219 -0
  105. package/src/Node.ts +31 -2
  106. package/src/PM/index.ts +6 -83
  107. package/src/PM/main.ts +389 -11
  108. package/src/PM/node.ts +6 -0
  109. package/src/PM/web.ts +4 -0
  110. package/src/Project.ts +10 -2
  111. package/src/Puppeteer.ts +16 -17
  112. package/src/Report.tsx +17 -40
  113. package/src/Reporter.ts +1 -9
  114. package/src/SubPackages/react-dom/component/web.ts +10 -30
  115. package/src/SubPackages/react-dom/jsx/web.ts +111 -74
  116. package/src/SubPackages/react-test-renderer/component/index.ts +0 -66
  117. package/src/SubPackages/react-test-renderer/component/interface.ts +48 -0
  118. package/src/SubPackages/react-test-renderer/component/node.ts +2 -1
  119. package/src/SubPackages/react-test-renderer/component/web.ts +2 -1
  120. package/src/TaskManBackEnd.ts +200 -0
  121. package/src/TaskManFrontEnd.tsx +1222 -0
  122. package/src/Types.ts +136 -28
  123. package/src/Web.ts +32 -2
  124. package/src/esbuildConfigs/index.ts +1 -0
  125. package/src/esbuildConfigs/inputFilesPlugin.ts +65 -0
  126. package/src/esbuildConfigs/node.ts +3 -1
  127. package/src/esbuildConfigs/web.ts +4 -0
  128. package/src/lib/abstractBase.ts +337 -34
  129. package/src/lib/basebuilder.ts +17 -52
  130. package/src/lib/classBuilder.ts +14 -2
  131. package/src/lib/core.ts +18 -7
  132. package/src/lib/index.ts +115 -7
  133. package/src/lib/types.ts +143 -35
  134. package/src/mongooseSchemas.ts +105 -0
  135. package/src/utils.ts +15 -0
  136. package/yarn-error.log +3144 -0
@@ -0,0 +1,2 @@
1
+ import { IBuiltConfig, IRunTime } from "./lib/types";
2
+ export declare const destinationOfRuntime: (f: string, r: IRunTime, configs: IBuiltConfig) => string;
@@ -0,0 +1,9 @@
1
+ version: "3"
2
+ services:
3
+ app:
4
+ container_name: app
5
+ image: Dockerfile
6
+ restart: always
7
+ build: .
8
+ ports:
9
+ - "3000:3000"
@@ -0,0 +1,18 @@
1
+ version: "3"
2
+ services:
3
+ app:
4
+ container_name: app
5
+ image: Dockerfile
6
+ restart: always
7
+ build: .
8
+ ports:
9
+ - "3000:3000"
10
+ links:
11
+ - mongo
12
+ mongo:
13
+ container_name: mongo
14
+ image: mongo
15
+ volumes:
16
+ - ./data:/data/db
17
+ ports:
18
+ - '27017:27017'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "testeranto",
3
3
  "description": "teeny tiny tightly-typed typescript tests",
4
- "version": "0.75.0",
4
+ "version": "0.79.3",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.mts",
7
7
  "module": "dist/module/index.js",
@@ -110,9 +110,9 @@
110
110
  "import": "./src/Types.ts",
111
111
  "require": "./src/Types.ts"
112
112
  },
113
- "./src/lib": {
114
- "import": "./src/lib.ts",
115
- "require": "./src/lib.ts"
113
+ "./src/utils": {
114
+ "import": "./src/utils.ts",
115
+ "require": "./src/utils.ts"
116
116
  },
117
117
  "./src/Features": {
118
118
  "import": "./dist/module/Features.js",
@@ -174,16 +174,17 @@
174
174
  "ATDD"
175
175
  ],
176
176
  "scripts": {
177
- "doit": "rm -rf node_modules && yarn install && yarn build",
178
- "build": "sh prebuild.sh; cp ./src/cjs-shim.js ./dist/cjs-shim.js; tsc -p tsconfig.module.json; tsc -p tsconfig.common.json; tsc -p tsconfig.types.json; yarn esbuild src/Report.tsx --outfile=dist/prebuild/Report.js --bundle --external:testeranto.json --external:features.test.js --external:tests.json; sh postBuild.sh; ",
179
177
  "commit": "yarn build; git add --all && git commit -m 'stash'",
180
- "dev": "cp ./src/cjs-shim.js ./dist/cjs-shim.js && tsc -p tsconfig.module.json --watch & tsc -p tsconfig.common.json --watch & tsc -p tsconfig.types.json --watch & yarn esbuild src/Report.tsx --outfile=dist/prebuild/Report.js --bundle --external:testeranto.json --external:features.test.js --external:tests.json --watch",
178
+ "doit": "rm -rf node_modules && yarn install && yarn build",
179
+ "build": "sh prebuild.sh; cp ./src/cjs-shim.js ./dist/cjs-shim.js; tsc -p tsconfig.module.json; tsc -p tsconfig.common.json; tsc -p tsconfig.types.json; yarn esbuild src/Report.tsx --outfile=dist/prebuild/Report.js --bundle --external:testeranto.json --external:features.test.js --external:tests.json; yarn esbuild src/TaskManFrontEnd.tsx --outfile=dist/prebuild/TaskManFrontEnd.js --bundle; yarn esbuild src/TaskManBackEnd.ts --outfile=dist/prebuild/TaskManBackEnd.mjs --bundle --platform=node --format=esm --packages=external; sh postBuild.sh; ",
180
+ "dev": "cp ./src/cjs-shim.js ./dist/cjs-shim.js && tsc -p tsconfig.module.json --watch & tsc -p tsconfig.common.json --watch & tsc -p tsconfig.types.json --watch & yarn esbuild src/Report.tsx --outfile=dist/prebuild/Report.js --bundle --external:testeranto.json --external:features.test.js --external:tests.json --watch & yarn esbuild src/TaskManFrontEnd.tsx --outfile=dist/prebuild/TaskManFrontEnd.js --bundle --watch & yarn esbuild src/TaskManBackEnd.ts --platform=node --outfile=dist/prebuild/TaskManBackEnd.mjs --bundle --watch --format=esm --packages=external",
181
181
  "build-module": "tsc -p tsconfig.module.json",
182
182
  "build-common": "tsc -p tsconfig.common.json",
183
183
  "build-types": "tsc -p tsconfig.types.json",
184
184
  "build-electron": "ts-node-esm electronBuild.ts"
185
185
  },
186
186
  "peerDependencies": {
187
+ "@hello-pangea/dnd": ">=16",
187
188
  "@types/react": "^18.2.66",
188
189
  "@types/react-dom": "18.2.23",
189
190
  "@types/react-test-renderer": "18.0.7",
@@ -208,17 +209,24 @@
208
209
  "typescript": "4.8.2"
209
210
  },
210
211
  "dependencies": {
212
+ "@asseinfo/react-kanban": "^2.2.0",
213
+ "@caldwell619/react-kanban": "^0.0.12",
211
214
  "@electron/remote": "^2.1.2",
215
+ "@hello-pangea/dnd": "^18.0.1",
216
+ "@xyflow/react": "^12.4.3",
212
217
  "babel-loader": "^8.2.5",
213
218
  "bootstrap": "^5.2.3",
219
+ "dot-prop": "^9.0.0",
214
220
  "electron": "28.0.0",
215
221
  "esbuild": "0.17.5",
216
222
  "esbuild-plugin-external-package": "^1.0.0",
217
223
  "esbuild-plugin-import-map": "^2.1.0",
218
224
  "eslint": "^8.29.0",
219
225
  "eslint-plugin-react": "^7.31.11",
226
+ "express": "^4.21.2",
220
227
  "fs-extra": "^11.2.0",
221
228
  "fs.promises.exists": "^1.1.4",
229
+ "gantt-task-react": "^0.3.9",
222
230
  "glob": "^10.3.12",
223
231
  "graphology": "^0.25.1",
224
232
  "graphology-dag": "^0.2.0",
@@ -226,9 +234,14 @@
226
234
  "html": "^1.0.0",
227
235
  "ipc": "^0.0.1",
228
236
  "jsonc": "^2.0.0",
237
+ "mongodb": "^6.13.0",
238
+ "mongoose": "^8.10.0",
239
+ "mongoose-auto-number": "2.0.0",
240
+ "mongoose-rest-query": "^0.1.29",
229
241
  "npm-watch": "^0.11.0",
230
242
  "puppeteer-core": "^23.6.0",
231
243
  "react-bootstrap": "2.10.6",
244
+ "react-router-dom": "^7.1.5",
232
245
  "react-sigma": "^1.2.35",
233
246
  "react-test-renderer": "18.2.0",
234
247
  "selenium-webdriver": "^4.25.0",
@@ -0,0 +1,219 @@
1
+ import React, { useEffect, useState } from "react";
2
+ import Col from 'react-bootstrap/Col';
3
+ import Nav from 'react-bootstrap/Nav';
4
+ import Row from 'react-bootstrap/Row';
5
+ import Tab from 'react-bootstrap/Tab';
6
+ import Tabs from 'react-bootstrap/Tabs';
7
+
8
+ import 'bootstrap/dist/css/bootstrap.min.css';
9
+
10
+ const queryString = window.location.search;
11
+
12
+ // Create a URLSearchParams object
13
+ const urlParams = new URLSearchParams(queryString);
14
+ console.log("urlParams", urlParams.has(
15
+ "local"
16
+ ))
17
+ // Get the value of a specific parameter
18
+ const isLocal = urlParams.get("local");
19
+
20
+ const urlFixer = (url: string): string => {
21
+ if (isLocal) {
22
+ return `file:///Users/adam/Code/kokomoBay/${url}`;
23
+ } else {
24
+ return `https://chromapdx.github.io/kokomoBay/${url}`;
25
+ }
26
+
27
+ }
28
+
29
+ const TextTab = (props: { url: string }) => {
30
+
31
+ const [text, setText] = useState('');
32
+
33
+ useEffect(() => {
34
+ fetch(props.url) // Replace with your API endpoint
35
+ .then(response => response.text())
36
+ .then(data => setText(data))
37
+ .catch(error => console.error('Error fetching text:', error));
38
+ }, []);
39
+
40
+ return <code><pre>{text}</pre></code>
41
+ }
42
+
43
+ export default () => {
44
+
45
+ return (
46
+ <Tab.Container id="left-tabs-example5" defaultActiveKey="examples-0">
47
+ <Row>
48
+ <Col sm={3} lg={2}>
49
+ <Nav variant="pills" className="flex-column">
50
+
51
+ <Nav.Link eventKey={`manual-example-rectangle`}>
52
+ RECTANGLE
53
+ </Nav.Link>
54
+
55
+ <Nav.Link eventKey={`manual-example-ClassicalComponent`}>
56
+ ClassicalComponent
57
+ </Nav.Link>
58
+
59
+ <Nav.Link eventKey={`manual-example-react+sol`}>
60
+ React and solidity
61
+ </Nav.Link>
62
+
63
+ </Nav>
64
+ </Col>
65
+
66
+ <Col sm={3} lg={2}>
67
+ <Tab.Content>
68
+
69
+ <Tab.Pane eventKey={`manual-example-rectangle`} key={`manual-example-rectangle`}>
70
+ <pre>
71
+ In this contrived example, we are testing the Rectangle class. Node that because it uses no web-specific, nor node-specific language features, it can be run in either runtime, thought it more efficient and reasonable to test in node.
72
+ </pre>
73
+ </Tab.Pane>
74
+
75
+ <Tab.Pane eventKey={`manual-example-ClassicalComponent`} key={`manual-example-ClassicalComponent`}>
76
+ <pre>Testing a react component with the react-test-renderer package.</pre>
77
+ </Tab.Pane>
78
+
79
+ <Tab.Pane eventKey={`manual-example-react+sol`} key={`manual-example-react+sol`}>
80
+ <pre>Testing a react component which is backed by a solidity contract. This test is performed _on_ the server but but _through_ the browser. The react element is renderer into an chromium window and accessed by puppeteer.</pre>
81
+ </Tab.Pane>
82
+
83
+
84
+ </Tab.Content>
85
+ </Col>
86
+
87
+
88
+ <Col >
89
+ <Tab.Content>
90
+
91
+ <Tab.Pane eventKey={`manual-example-rectangle`} key={`manual-example-rectangle`}>
92
+
93
+
94
+ <Tabs
95
+ defaultActiveKey="profile"
96
+ id="uncontrolled-tab-example"
97
+ className="mb-3"
98
+ >
99
+ <Tab eventKey="Rectangle.ts" title="Rectangle.ts">
100
+ {/* <TextTab url="file:///Users/adam/Code/kokomoBay/src/Rectangle.ts" /> */}
101
+ <TextTab url={urlFixer("src/Rectangle.ts")} />
102
+ </Tab>
103
+ <Tab eventKey="Rectangle.test.specification.ts" title="Rectangle.test.specification.ts">
104
+ {/* <TextTab url="file:///Users/adam/Code/kokomoBay/src/Rectangle.test.specification.ts" /> */}
105
+ <TextTab url={urlFixer("src/Rectangle.test.specification.ts")} />
106
+ </Tab>
107
+ <Tab eventKey="Rectangle.test.shape.ts" title="Rectangle.test.shape.ts">
108
+ {/* <TextTab url="file:///Users/adam/Code/kokomoBay/src/Rectangle.test.shape.ts" /> */}
109
+ <TextTab url={urlFixer("src/Rectangle.test.shape.ts")} />
110
+ </Tab>
111
+ <Tab eventKey="Rectangle.test.implementation.ts" title="Rectangle.test.implementation.ts">
112
+ {/* <TextTab url="file:///Users/adam/Code/kokomoBay/src/Rectangle.test.implementation.ts" /> */}
113
+ <TextTab url={urlFixer("src/Rectangle.test.implementation.ts")} />
114
+ </Tab>
115
+
116
+ <Tab eventKey="Rectangle.test.interface.ts" title="Rectangle.test.interface.ts">
117
+ {/* <TextTab url="file:///Users/adam/Code/kokomoBay/src/Rectangle.test.interface.ts" /> */}
118
+ <TextTab url={urlFixer("src/Rectangle.test.interface.ts")} />
119
+ </Tab>
120
+ <Tab eventKey="Rectangle.config" title="Rectangle.config">
121
+ <code><pre>{`
122
+ ...
123
+
124
+ // Run the test in node
125
+ "./src/Rectangle/Rectangle.test.node.ts",
126
+ "node",
127
+ { ports: 0 },
128
+ [],
129
+ ],
130
+
131
+ // Run the same test in chromium too!
132
+ "./src/Rectangle/Rectangle.test.web.ts",
133
+ "web",
134
+ { ports: 0 },
135
+ [],
136
+ ],
137
+
138
+ ...
139
+ `}</pre></code>
140
+ </Tab>
141
+ </Tabs>
142
+ </Tab.Pane>
143
+
144
+ <Tab.Pane eventKey={`manual-example-ClassicalComponent`} key={`manual-example-ClassicalComponent`}>
145
+ <Tabs
146
+ defaultActiveKey="profile"
147
+ id="uncontrolled-tab-example"
148
+ className="mb-3"
149
+ >
150
+ <Tab eventKey="ClassicalComponent/index.tsx" title="ClassicalComponent/index.tsx">
151
+ <TextTab url={urlFixer("src/ClassicalComponent/index.tsx")} />
152
+ {/* <TextTab url="file:///Users/adam/Code/kokomoBay/src/ClassicalComponent/index.tsx" /> */}
153
+ </Tab>
154
+ <Tab eventKey="ClassicalComponent/test.specification.ts" title="ClassicalComponent/test.specification.ts">
155
+ {/* <TextTab url="file:///Users/adam/Code/kokomoBay/src/ClassicalComponent/test.specification.ts" /> */}
156
+ <TextTab url={urlFixer("src/ClassicalComponent/test.specification.ts")} />
157
+ </Tab>
158
+ <Tab eventKey="ClassicalComponent/test.shape.ts" title="ClassicalComponent/test.shape.ts">
159
+ {/* <TextTab url="file:///Users/adam/Code/kokomoBay/src/ClassicalComponent/test.shape.ts" /> */}
160
+ <TextTab url={urlFixer("src/ClassicalComponent/test.shape.ts")} />
161
+ </Tab>
162
+ <Tab eventKey="ClassicalComponent/react-test-renderer/test.implementation.ts" title="ClassicalComponent/react-test-renderer/test.implementation.ts">
163
+ {/* <TextTab url="file:///Users/adam/Code/kokomoBay/src/ClassicalComponent/react-test-renderer/test.implementation.ts" /> */}
164
+ <TextTab url={urlFixer("src/ClassicalComponent/react-test-renderer/test.implementation.ts")} />
165
+ </Tab>
166
+
167
+ <Tab eventKey="react-test-renderer/test.interface.ts" title="react-test-renderer/test.interface.ts">
168
+ <TextTab url="https://raw.githubusercontent.com/adamwong246/testeranto/master/src/subPackages/react-test-renderer/component/interface.ts" />
169
+ </Tab>
170
+
171
+ </Tabs>
172
+
173
+ </Tab.Pane>
174
+ <Tab.Pane eventKey={`manual-example-react+sol`} key={`manual-example-react+sol`}>
175
+
176
+
177
+ <Tabs
178
+ defaultActiveKey="profile"
179
+ id="uncontrolled-tab-example"
180
+ className="mb-3"
181
+ >
182
+ <Tab eventKey="contracts/MyBaseContract.sol" title="MyBaseContract.sol">
183
+ <TextTab url={urlFixer("contracts/MyBaseContract.sol")} />
184
+ </Tab>
185
+ <Tab eventKey="src/MyFirstContractUI.tsx" title="MyFirstContractUI.tsx">
186
+ <TextTab url={urlFixer("src/MyFirstContractUI.tsx")} />
187
+ </Tab>
188
+
189
+ <Tab eventKey="src/MyFirstContract.specification.test.ts" title="MyFirstContract.specification.test.ts">
190
+ <TextTab url={urlFixer("src/MyFirstContract.specification.test.ts")} />
191
+ </Tab>
192
+ <Tab eventKey="src/MyFirstContract.solidity-react.interface.test.ts" title="MyFirstContract.solidity-react.interface.test.ts">
193
+ <TextTab url={urlFixer("src/MyFirstContract.solidity-react.interface.test.ts")} />
194
+
195
+ </Tab>
196
+ <Tab eventKey="src/MyFirstContract.solidity-react.implementation.test.ts" title="MyFirstContract.solidity-react.implementation.test.ts">
197
+ <TextTab url={urlFixer("src/MyFirstContract.solidity-react.implementation.test.ts")} />
198
+ </Tab>
199
+ <Tab eventKey="src/MyFirstContract.solidity-react.shape.test.ts" title="MyFirstContract.solidity-react.shape.test.ts">
200
+ <TextTab url={urlFixer("src/MyFirstContract.solidity-react.shape.test.ts")} />
201
+ </Tab>
202
+
203
+ <Tab eventKey="MyFirstContract.solidity-react-example-jpg" title="screenshot">
204
+
205
+ <img src={urlFixer("docs/node/src/MyFirstContract.solidity-react.testeranto/suite-0/given-test1/when/0/afterEach/andWhen.jpg")} />
206
+ </Tab>
207
+
208
+
209
+ </Tabs>
210
+
211
+ </Tab.Pane>
212
+ </Tab.Content>
213
+ </Col>
214
+
215
+
216
+ </Row>
217
+ </Tab.Container>
218
+ );
219
+ };
package/src/Node.ts CHANGED
@@ -15,7 +15,20 @@ import { ITestInterface, INodeTestInterface } from "./lib/types.js";
15
15
  import { PM_Node } from "./PM/node.js";
16
16
 
17
17
  class NodeTesteranto<
18
- TestShape extends IBaseTest
18
+ TestShape extends IBaseTest<
19
+ unknown,
20
+ unknown,
21
+ unknown,
22
+ unknown,
23
+ unknown,
24
+ unknown,
25
+ unknown,
26
+ Record<string, any>,
27
+ Record<string, any>,
28
+ Record<string, any>,
29
+ Record<string, any>,
30
+ Record<string, any>
31
+ >
19
32
  > extends Testeranto<TestShape> {
20
33
  constructor(
21
34
  input: TestShape["iinput"],
@@ -35,6 +48,7 @@ class NodeTesteranto<
35
48
 
36
49
  async receiveTestResourceConfig(partialTestResource: string) {
37
50
  const t: ITTestResourceConfiguration = JSON.parse(partialTestResource);
51
+ console.log("receiveTestResourceConfig", t);
38
52
  const pm = new PM_Node(t);
39
53
  const { failed, artifacts, logPromise } =
40
54
  await this.testJobs[0].receiveTestResourceConfig(pm);
@@ -42,7 +56,22 @@ class NodeTesteranto<
42
56
  }
43
57
  }
44
58
 
45
- export default async <ITestShape extends IBaseTest>(
59
+ export default async <
60
+ ITestShape extends IBaseTest<
61
+ unknown,
62
+ unknown,
63
+ unknown,
64
+ unknown,
65
+ unknown,
66
+ unknown,
67
+ unknown,
68
+ Record<string, any>,
69
+ Record<string, any>,
70
+ Record<string, any>,
71
+ Record<string, any>,
72
+ Record<string, any>
73
+ >
74
+ >(
46
75
  input: ITestShape["iinput"],
47
76
  testSpecification: ITestSpecification<ITestShape>,
48
77
  testImplementation: ITestImplementation<ITestShape>,
package/src/PM/index.ts CHANGED
@@ -1,18 +1,9 @@
1
- // import {
2
- // Browser,
3
- // BrowserContext,
4
- // BrowserContextOptions,
5
- // DebugInfo,
6
- // Page,
7
- // PuppeteerNode,
8
- // Target,
9
- // } from "puppeteer-core";
10
-
11
- import { Browser } from "puppeteer-core/lib/esm/puppeteer/puppeteer-core-browser";
1
+ import {
2
+ Browser,
3
+ Page,
4
+ } from "puppeteer-core/lib/esm/puppeteer/puppeteer-core-browser";
12
5
  import { ITLog, ITTestResourceConfiguration } from "../lib";
13
- import { ChildProcess } from "child_process";
14
- import { PuppeteerLaunchOptions } from "puppeteer-core/lib/esm/puppeteer";
15
- // import { ILogWriter, ITLog } from "./lib";
6
+ // import { Page } from "puppeteer-core";
16
7
 
17
8
  type IFPaths = string[];
18
9
  const fPaths: IFPaths = [];
@@ -22,13 +13,7 @@ export abstract class PM {
22
13
  browser: Browser;
23
14
  testResourceConfiguration: ITTestResourceConfiguration;
24
15
 
25
- // constructor(testResourceConfiguration: ITTestResourceConfiguration) {
26
- // this.testResourceConfiguration = testResourceConfiguration;
27
- // console.log("mkdirsync2", this.testResourceConfiguration);
28
- // }
29
-
30
16
  abstract startPuppeteer(options: any, destfolder: string): Promise<Browser>;
31
-
32
17
  abstract testArtiFactoryfileWriter(tLog: ITLog, callback: (Promise) => void);
33
18
  abstract createWriteStream(filepath: string): any;
34
19
  abstract writeFileSync(fp: string, contents: string);
@@ -36,67 +21,5 @@ export abstract class PM {
36
21
  abstract existsSync(fp: string): boolean;
37
22
  abstract write(accessObject: { uid: number }, contents: string): boolean;
38
23
  abstract end(accessObject: { uid: number }): boolean;
39
-
40
- // pages(): Promise<Page[]>;
41
- // pages(): Promise<Page[]> {
42
- // return new Promise<Page[]>((res, rej) => {
43
- // res(super.pages());
44
- // });
45
- // }
24
+ abstract customScreenShot(opts: object, page: Page): any;
46
25
  }
47
-
48
- // export class PuppetMasterBrowser extends Browser {
49
- // process(): ChildProcess | null {
50
- // return super.process();
51
- // }
52
- // createBrowserContext(
53
- // options?: BrowserContextOptions
54
- // ): Promise<BrowserContext> {
55
- // throw new Error("Method not implemented.");
56
- // }
57
- // browserContexts(): BrowserContext[] {
58
- // throw new Error("Method not implemented.");
59
- // }
60
- // defaultBrowserContext(): BrowserContext {
61
- // throw new Error("Method not implemented.");
62
- // }
63
- // wsEndpoint(): string {
64
- // throw new Error("Method not implemented.");
65
- // }
66
- // newPage(): Promise<Page> {
67
- // throw new Error("Method not implemented.");
68
- // }
69
- // targets(): Target[] {
70
- // throw new Error("Method not implemented.");
71
- // }
72
- // target(): Target {
73
- // throw new Error("Method not implemented.");
74
- // }
75
- // version(): Promise<string> {
76
- // throw new Error("Method not implemented.");
77
- // }
78
- // userAgent(): Promise<string> {
79
- // throw new Error("Method not implemented.");
80
- // }
81
- // close(): Promise<void> {
82
- // throw new Error("Method not implemented.");
83
- // }
84
- // disconnect(): Promise<void> {
85
- // throw new Error("Method not implemented.");
86
- // }
87
- // get connected(): boolean {
88
- // throw new Error("Method not implemented.");
89
- // }
90
- // get debugInfo(): DebugInfo {
91
- // throw new Error("Method not implemented.");
92
- // }
93
- // constructor(...z: []) {
94
- // super(...z);
95
- // }
96
- // // pages(): Promise<Page[]>;
97
- // pages(): Promise<Page[]> {
98
- // return new Promise<Page[]>((res, rej) => {
99
- // res(super.pages());
100
- // });
101
- // }
102
- // }