@principal-ai/principal-view-react 0.7.11 → 0.7.13
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.
- package/dist/components/TestEventPanel.d.ts +12 -0
- package/dist/components/TestEventPanel.d.ts.map +1 -1
- package/dist/components/TestEventPanel.js +194 -49
- package/dist/components/TestEventPanel.js.map +1 -1
- package/package.json +1 -1
- package/src/components/TestEventPanel.tsx +369 -92
- package/src/stories/RealTestExecution.stories.tsx +39 -25
- package/src/stories/data/graph-converter-test-execution.json +326 -204
|
@@ -1,225 +1,347 @@
|
|
|
1
|
-
|
|
2
|
-
{
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
"code.lineno": 28,
|
|
21
|
-
"description": "Creating test configuration with 2 nodes and 1 edge"
|
|
22
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"metadata": {
|
|
3
|
+
"exportedAt": "2026-01-11T00:32:48.199Z",
|
|
4
|
+
"framework": "bun",
|
|
5
|
+
"spanCount": 3,
|
|
6
|
+
"logCount": 8
|
|
7
|
+
},
|
|
8
|
+
"spans": [
|
|
9
|
+
{
|
|
10
|
+
"id": "span-1",
|
|
11
|
+
"name": "should convert simple config to nodes and edges",
|
|
12
|
+
"startTime": 1768091568197,
|
|
13
|
+
"attributes": {
|
|
14
|
+
"span.kind": "test.case",
|
|
15
|
+
"test.name": "should convert simple config to nodes and edges",
|
|
16
|
+
"test.framework": "bun",
|
|
17
|
+
"test.file": "GraphConverter.test.ts",
|
|
18
|
+
"test.suite": "GraphConverter",
|
|
19
|
+
"test.result": "pass"
|
|
23
20
|
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
"events": [
|
|
22
|
+
{
|
|
23
|
+
"time": 1768091568197,
|
|
24
|
+
"name": "setup.started",
|
|
25
|
+
"attributes": {
|
|
26
|
+
"code.filepath": "GraphConverter.test.ts",
|
|
27
|
+
"code.lineno": 36,
|
|
28
|
+
"description": "Creating test configuration with 2 nodes and 1 edge"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"time": 1768091568197,
|
|
33
|
+
"name": "setup.complete",
|
|
34
|
+
"attributes": {
|
|
35
|
+
"code.filepath": "GraphConverter.test.ts",
|
|
36
|
+
"code.lineno": 84,
|
|
37
|
+
"config.nodes": 2,
|
|
38
|
+
"config.edges": 1
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"time": 1768091568197,
|
|
43
|
+
"name": "execution.started",
|
|
44
|
+
"attributes": {
|
|
45
|
+
"code.filepath": "GraphConverter.ts",
|
|
46
|
+
"code.lineno": 15,
|
|
47
|
+
"action": "GraphConverter.configToGraph()"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"time": 1768091568197,
|
|
52
|
+
"name": "execution.complete",
|
|
53
|
+
"attributes": {
|
|
54
|
+
"code.filepath": "GraphConverter.ts",
|
|
55
|
+
"code.lineno": 43,
|
|
56
|
+
"result.nodes.count": 2,
|
|
57
|
+
"result.edges.count": 1
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"time": 1768091568197,
|
|
62
|
+
"name": "assertion.started",
|
|
63
|
+
"attributes": {
|
|
64
|
+
"code.filepath": "GraphConverter.test.ts",
|
|
65
|
+
"code.lineno": 133,
|
|
66
|
+
"assertions": "Verifying nodes and edges structure"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"time": 1768091568198,
|
|
71
|
+
"name": "assertion.complete",
|
|
72
|
+
"attributes": {
|
|
73
|
+
"code.filepath": "GraphConverter.test.ts",
|
|
74
|
+
"code.lineno": 163,
|
|
75
|
+
"assertions.passed": 11,
|
|
76
|
+
"assertions.failed": 0
|
|
77
|
+
}
|
|
32
78
|
}
|
|
79
|
+
],
|
|
80
|
+
"status": "OK",
|
|
81
|
+
"endTime": 1768091568198,
|
|
82
|
+
"duration": 1
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "span-2",
|
|
86
|
+
"name": "should extract manual positions from node types",
|
|
87
|
+
"startTime": 1768091568198,
|
|
88
|
+
"attributes": {
|
|
89
|
+
"span.kind": "test.case",
|
|
90
|
+
"test.name": "should extract manual positions from node types",
|
|
91
|
+
"test.framework": "bun",
|
|
92
|
+
"test.file": "GraphConverter.test.ts",
|
|
93
|
+
"test.suite": "GraphConverter",
|
|
94
|
+
"test.result": "pass"
|
|
33
95
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
96
|
+
"events": [
|
|
97
|
+
{
|
|
98
|
+
"time": 1768091568198,
|
|
99
|
+
"name": "setup.started",
|
|
100
|
+
"attributes": {
|
|
101
|
+
"code.filepath": "GraphConverter.test.ts",
|
|
102
|
+
"code.lineno": 217,
|
|
103
|
+
"description": "Creating config with manual node positions"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"time": 1768091568198,
|
|
108
|
+
"name": "setup.complete",
|
|
109
|
+
"attributes": {
|
|
110
|
+
"code.filepath": "GraphConverter.test.ts",
|
|
111
|
+
"code.lineno": 244,
|
|
112
|
+
"config.nodes": 2,
|
|
113
|
+
"positions.defined": true
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"time": 1768091568198,
|
|
118
|
+
"name": "execution.started",
|
|
119
|
+
"attributes": {
|
|
120
|
+
"code.filepath": "GraphConverter.ts",
|
|
121
|
+
"code.lineno": 15,
|
|
122
|
+
"action": "GraphConverter.configToGraph()"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"time": 1768091568198,
|
|
127
|
+
"name": "execution.complete",
|
|
128
|
+
"attributes": {
|
|
129
|
+
"code.filepath": "GraphConverter.ts",
|
|
130
|
+
"code.lineno": 43,
|
|
131
|
+
"result.nodes.count": 2
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"time": 1768091568198,
|
|
136
|
+
"name": "assertion.started",
|
|
137
|
+
"attributes": {
|
|
138
|
+
"code.filepath": "GraphConverter.test.ts",
|
|
139
|
+
"code.lineno": 263,
|
|
140
|
+
"assertions": "Verifying positions preserved"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"time": 1768091568198,
|
|
145
|
+
"name": "assertion.complete",
|
|
146
|
+
"attributes": {
|
|
147
|
+
"code.filepath": "GraphConverter.test.ts",
|
|
148
|
+
"code.lineno": 270,
|
|
149
|
+
"assertions.passed": 2,
|
|
150
|
+
"assertions.failed": 0
|
|
151
|
+
}
|
|
41
152
|
}
|
|
153
|
+
],
|
|
154
|
+
"status": "OK",
|
|
155
|
+
"endTime": 1768091568198,
|
|
156
|
+
"duration": 0
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"id": "span-3",
|
|
160
|
+
"name": "should handle nodes without positions",
|
|
161
|
+
"startTime": 1768091568198,
|
|
162
|
+
"attributes": {
|
|
163
|
+
"span.kind": "test.case",
|
|
164
|
+
"test.name": "should handle nodes without positions",
|
|
165
|
+
"test.framework": "bun",
|
|
166
|
+
"test.file": "GraphConverter.test.ts",
|
|
167
|
+
"test.suite": "GraphConverter",
|
|
168
|
+
"test.result": "pass"
|
|
42
169
|
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
170
|
+
"events": [
|
|
171
|
+
{
|
|
172
|
+
"time": 1768091568198,
|
|
173
|
+
"name": "setup.started",
|
|
174
|
+
"attributes": {
|
|
175
|
+
"code.filepath": "GraphConverter.test.ts",
|
|
176
|
+
"code.lineno": 294,
|
|
177
|
+
"description": "Creating config without positions"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"time": 1768091568198,
|
|
182
|
+
"name": "setup.complete",
|
|
183
|
+
"attributes": {
|
|
184
|
+
"code.filepath": "GraphConverter.test.ts",
|
|
185
|
+
"code.lineno": 314,
|
|
186
|
+
"config.nodes": 1,
|
|
187
|
+
"positions.defined": false
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"time": 1768091568198,
|
|
192
|
+
"name": "execution.started",
|
|
193
|
+
"attributes": {
|
|
194
|
+
"code.filepath": "GraphConverter.ts",
|
|
195
|
+
"code.lineno": 15,
|
|
196
|
+
"action": "GraphConverter.configToGraph()"
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"time": 1768091568198,
|
|
201
|
+
"name": "execution.complete",
|
|
202
|
+
"attributes": {
|
|
203
|
+
"code.filepath": "GraphConverter.ts",
|
|
204
|
+
"code.lineno": 43,
|
|
205
|
+
"result.nodes.count": 1
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"time": 1768091568198,
|
|
210
|
+
"name": "assertion.started",
|
|
211
|
+
"attributes": {
|
|
212
|
+
"code.filepath": "GraphConverter.test.ts",
|
|
213
|
+
"code.lineno": 333,
|
|
214
|
+
"assertions": "Verifying position is undefined"
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"time": 1768091568198,
|
|
219
|
+
"name": "assertion.complete",
|
|
220
|
+
"attributes": {
|
|
221
|
+
"code.filepath": "GraphConverter.test.ts",
|
|
222
|
+
"code.lineno": 339,
|
|
223
|
+
"assertions.passed": 1,
|
|
224
|
+
"assertions.failed": 0
|
|
225
|
+
}
|
|
51
226
|
}
|
|
227
|
+
],
|
|
228
|
+
"status": "OK",
|
|
229
|
+
"endTime": 1768091568198,
|
|
230
|
+
"duration": 0
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
"logs": [
|
|
234
|
+
{
|
|
235
|
+
"timestamp": 1768091568197,
|
|
236
|
+
"severity": "TRACE",
|
|
237
|
+
"body": "Entering test case for simple config conversion",
|
|
238
|
+
"resource": {
|
|
239
|
+
"service.name": "graph-converter-service",
|
|
240
|
+
"service.version": "1.0.0"
|
|
52
241
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
242
|
+
"traceId": "span-1",
|
|
243
|
+
"spanId": "span-1"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"timestamp": 1768091568197,
|
|
247
|
+
"severity": "INFO",
|
|
248
|
+
"body": "Initializing test configuration",
|
|
249
|
+
"resource": {
|
|
250
|
+
"service.name": "graph-converter-service"
|
|
61
251
|
},
|
|
62
|
-
{
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"assertions.passed": 11,
|
|
69
|
-
"assertions.failed": 0
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
],
|
|
73
|
-
"status": "OK",
|
|
74
|
-
"endTime": 1767808091637,
|
|
75
|
-
"duration": 0
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"id": "span-2",
|
|
79
|
-
"name": "should extract manual positions from node types",
|
|
80
|
-
"startTime": 1767808091637,
|
|
81
|
-
"attributes": {
|
|
82
|
-
"span.kind": "test.case",
|
|
83
|
-
"test.name": "should extract manual positions from node types",
|
|
84
|
-
"test.framework": "bun",
|
|
85
|
-
"test.file": "GraphConverter.test.ts",
|
|
86
|
-
"test.suite": "GraphConverter",
|
|
87
|
-
"test.result": "pass"
|
|
252
|
+
"attributes": {
|
|
253
|
+
"config.nodeCount": 2,
|
|
254
|
+
"config.edgeCount": 1
|
|
255
|
+
},
|
|
256
|
+
"traceId": "span-1",
|
|
257
|
+
"spanId": "span-1"
|
|
88
258
|
},
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
|
|
259
|
+
{
|
|
260
|
+
"timestamp": 1768091568197,
|
|
261
|
+
"severity": "DEBUG",
|
|
262
|
+
"body": {
|
|
263
|
+
"phase": "setup-complete",
|
|
264
|
+
"nodeTypes": [
|
|
265
|
+
"node-a",
|
|
266
|
+
"node-b"
|
|
267
|
+
],
|
|
268
|
+
"edgeTypes": [
|
|
269
|
+
"connection"
|
|
270
|
+
]
|
|
98
271
|
},
|
|
99
|
-
{
|
|
100
|
-
"
|
|
101
|
-
"name": "setup.complete",
|
|
102
|
-
"attributes": {
|
|
103
|
-
"code.filepath": "GraphConverter.test.ts",
|
|
104
|
-
"code.lineno": 165,
|
|
105
|
-
"config.nodes": 2,
|
|
106
|
-
"positions.defined": true
|
|
107
|
-
}
|
|
272
|
+
"resource": {
|
|
273
|
+
"service.name": "graph-converter-service"
|
|
108
274
|
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
275
|
+
"traceId": "span-1",
|
|
276
|
+
"spanId": "span-1"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"timestamp": 1768091568197,
|
|
280
|
+
"severity": "INFO",
|
|
281
|
+
"body": "Starting graph conversion process",
|
|
282
|
+
"resource": {
|
|
283
|
+
"service.name": "graph-converter-service"
|
|
117
284
|
},
|
|
118
|
-
{
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"attributes": {
|
|
122
|
-
"code.filepath": "GraphConverter.ts",
|
|
123
|
-
"code.lineno": 43,
|
|
124
|
-
"result.nodes.count": 2
|
|
125
|
-
}
|
|
285
|
+
"attributes": {
|
|
286
|
+
"operation": "configToGraph",
|
|
287
|
+
"inputSize.bytes": 387
|
|
126
288
|
},
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
289
|
+
"traceId": "span-1",
|
|
290
|
+
"spanId": "span-1"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"timestamp": 1768091568197,
|
|
294
|
+
"severity": "DEBUG",
|
|
295
|
+
"body": "Conversion completed successfully",
|
|
296
|
+
"resource": {
|
|
297
|
+
"service.name": "graph-converter-service"
|
|
135
298
|
},
|
|
136
|
-
{
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
"assertions.failed": 0
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
],
|
|
147
|
-
"status": "OK",
|
|
148
|
-
"endTime": 1767808091637,
|
|
149
|
-
"duration": 0
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
"id": "span-3",
|
|
153
|
-
"name": "should handle nodes without positions",
|
|
154
|
-
"startTime": 1767808091637,
|
|
155
|
-
"attributes": {
|
|
156
|
-
"span.kind": "test.case",
|
|
157
|
-
"test.name": "should handle nodes without positions",
|
|
158
|
-
"test.framework": "bun",
|
|
159
|
-
"test.file": "GraphConverter.test.ts",
|
|
160
|
-
"test.suite": "GraphConverter",
|
|
161
|
-
"test.result": "pass"
|
|
299
|
+
"attributes": {
|
|
300
|
+
"output.nodeCount": 2,
|
|
301
|
+
"output.edgeCount": 1,
|
|
302
|
+
"processingTime.ms": 5
|
|
303
|
+
},
|
|
304
|
+
"traceId": "span-1",
|
|
305
|
+
"spanId": "span-1"
|
|
162
306
|
},
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
"code.lineno": 215,
|
|
170
|
-
"description": "Creating config without positions"
|
|
171
|
-
}
|
|
307
|
+
{
|
|
308
|
+
"timestamp": 1768091568197,
|
|
309
|
+
"severity": "INFO",
|
|
310
|
+
"body": "Running assertions on converted graph",
|
|
311
|
+
"resource": {
|
|
312
|
+
"service.name": "graph-converter-service"
|
|
172
313
|
},
|
|
173
|
-
{
|
|
174
|
-
"
|
|
175
|
-
"name": "setup.complete",
|
|
176
|
-
"attributes": {
|
|
177
|
-
"code.filepath": "GraphConverter.test.ts",
|
|
178
|
-
"code.lineno": 235,
|
|
179
|
-
"config.nodes": 1,
|
|
180
|
-
"positions.defined": false
|
|
181
|
-
}
|
|
314
|
+
"attributes": {
|
|
315
|
+
"totalAssertions": 11
|
|
182
316
|
},
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
317
|
+
"traceId": "span-1",
|
|
318
|
+
"spanId": "span-1"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"timestamp": 1768091568198,
|
|
322
|
+
"severity": "INFO",
|
|
323
|
+
"body": "All assertions passed - test successful",
|
|
324
|
+
"resource": {
|
|
325
|
+
"service.name": "graph-converter-service"
|
|
191
326
|
},
|
|
192
|
-
{
|
|
193
|
-
"
|
|
194
|
-
"
|
|
195
|
-
"attributes": {
|
|
196
|
-
"code.filepath": "GraphConverter.ts",
|
|
197
|
-
"code.lineno": 43,
|
|
198
|
-
"result.nodes.count": 1
|
|
199
|
-
}
|
|
327
|
+
"attributes": {
|
|
328
|
+
"test.status": "passed",
|
|
329
|
+
"test.duration.ms": 1
|
|
200
330
|
},
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
331
|
+
"traceId": "span-1",
|
|
332
|
+
"spanId": "span-1"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"timestamp": 1768091568198,
|
|
336
|
+
"severity": "DEBUG",
|
|
337
|
+
"body": "Test cleanup completed",
|
|
338
|
+
"resource": {
|
|
339
|
+
"service.name": "test-cleanup-service",
|
|
340
|
+
"cleanup.type": "post-test"
|
|
209
341
|
},
|
|
210
|
-
{
|
|
211
|
-
"
|
|
212
|
-
"name": "assertion.complete",
|
|
213
|
-
"attributes": {
|
|
214
|
-
"code.filepath": "GraphConverter.test.ts",
|
|
215
|
-
"code.lineno": 260,
|
|
216
|
-
"assertions.passed": 1,
|
|
217
|
-
"assertions.failed": 0
|
|
218
|
-
}
|
|
342
|
+
"attributes": {
|
|
343
|
+
"test.name": "should convert simple config to nodes and edges"
|
|
219
344
|
}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
"duration": 0
|
|
224
|
-
}
|
|
225
|
-
]
|
|
345
|
+
}
|
|
346
|
+
]
|
|
347
|
+
}
|