-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Expand file tree
/
Copy pathMcpResponse.test.js.snapshot
More file actions
510 lines (453 loc) · 26.6 KB
/
McpResponse.test.js.snapshot
File metadata and controls
510 lines (453 loc) · 26.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
exports[`McpResponse > add network request when attached 1`] = `
# test response
## Request http://example.com
Status: [pending]
### Request Headers
- content-size:10
## Network requests
Showing 1-1 of 1 (Page 1 of 1).
reqid=1 GET http://example.com [pending]
`;
exports[`McpResponse > add network request when attached with POST data 1`] = `
# test response
## Request http://example.com
Status: [success - 200]
### Request Headers
- content-size:10
### Request Body
{"request":"body"}
### Response Headers
- Content-Type:application/json
### Response Body
{"response":"body"}
## Network requests
Showing 1-1 of 1 (Page 1 of 1).
reqid=1 POST http://example.com [success - 200]
`;
exports[`McpResponse > add network requests when setting is true 1`] = `
# test response
## Network requests
Showing 1-2 of 2 (Page 1 of 1).
reqid=1 GET http://example.com [pending]
reqid=2 GET http://example.com [pending]
`;
exports[`McpResponse > adds a message when no console messages exist 1`] = `
# test response
## Console messages
<no console messages found>
`;
exports[`McpResponse > adds a prompt dialog 1`] = `
# test response
# Open dialog
prompt: message (default value: "default").
Call handle_dialog to handle it before continuing.
`;
exports[`McpResponse > adds an alert dialog 1`] = `
# test response
# Open dialog
alert: message.
Call handle_dialog to handle it before continuing.
`;
exports[`McpResponse > adds console messages when the setting is true 1`] = `
# test response
## Console messages
Showing 1-1 of 1 (Page 1 of 1).
msgid=1 [log] Hello from the test (1 args)
`;
exports[`McpResponse > adds cpu throttling setting when it is over 1 1`] = `
# test response
## CPU emulation
Emulating: 4x slowdown
`;
exports[`McpResponse > adds throttling setting when it is not null 1`] = `
# test response
## Network emulation
Emulating: Slow 3G
Default navigation timeout set to 100000 ms
`;
exports[`McpResponse > adds userAgent emulation setting when it is set 1`] = `
# test response
## UserAgent emulation
Emulating userAgent: MyUA
`;
exports[`McpResponse > adds viewport emulation setting when it is set 1`] = `
# test response
## Viewport emulation
Emulating viewport: {"width":400,"height":400,"deviceScaleFactor":1}
`;
exports[`McpResponse > allows response text lines to be added 1`] = `
# test response
Testing 1
Testing 2
`;
exports[`McpResponse > list pages 1`] = `
# test response
## Pages
1: about:blank [selected]
`;
exports[`McpResponse > returns correctly formatted snapshot for a simple tree 1`] = `
# test response
## Latest page snapshot
uid=1_0 RootWebArea "My test page" url="about:blank"
uid=1_1 button "Click me" focusable focused
uid=1_2 textbox value="Input"
`;
exports[`McpResponse > returns values for textboxes 1`] = `
# test response
## Latest page snapshot
uid=1_0 RootWebArea "My test page" url="about:blank"
uid=1_1 StaticText "username"
uid=1_2 textbox "username" focusable focused value="mcp"
`;
exports[`McpResponse > returns verbose snapshot and structured content 1`] = `
# test response
## Latest page snapshot
uid=1_0 RootWebArea "My test page" url="about:blank"
uid=1_1 ignored
uid=1_2 ignored
uid=1_3 complementary
uid=1_4 StaticText "test"
uid=1_5 InlineTextBox "test"
`;
exports[`McpResponse > returns verbose snapshot and structured content 2`] = `
{
"snapshot": {
"id": "1_0",
"role": "RootWebArea",
"name": "My test page",
"url": "about:blank",
"children": [
{
"id": "1_1",
"role": "none",
"children": [
{
"id": "1_2",
"role": "none",
"children": [
{
"id": "1_3",
"role": "complementary",
"children": [
{
"id": "1_4",
"role": "StaticText",
"name": "test",
"children": [
{
"id": "1_5",
"role": "InlineTextBox",
"name": "test"
}
]
}
]
}
]
}
]
}
]
}
}
`;
exports[`McpResponse > saves snapshot to file and returns structured content 1`] = `
# test response
Saved snapshot to <file>
`;
exports[`McpResponse > saves snapshot to file and returns structured content 2`] = `
{
"snapshotFilePath": "<file>"
}
`;
exports[`McpResponse > saves snapshot to file and returns structured content 3`] = `
uid=1_0 RootWebArea "My test page" url="about:blank"
uid=1_1 ignored
uid=1_2 ignored
uid=1_3 complementary
uid=1_4 StaticText "test"
uid=1_5 InlineTextBox "test"
`;
exports[`McpResponse network pagination > trace insights > includes error if insight not found 1`] = `
# test response
No Performance Insights for the given insight set id. Only use ids given in the "Available insight sets" list.
`;
exports[`McpResponse network pagination > trace insights > includes the trace insight output 1`] = `
# test response
## Insight Title: LCP breakdown
## Insight Summary:
This insight is used to analyze the time spent that contributed to the final LCP time and identify which of the 4 phases (or 2 if there was no LCP resource) are contributing most to the delay in rendering the LCP element.
## Detailed analysis:
The Largest Contentful Paint (LCP) time for this navigation was 129 ms.
The LCP element is an image fetched from https://web-dev.imgix.net/image/kheDArv5csY6rvQUJDbWRscckLr1/4i7JstVZvgTFk9dxCe4a.svg (eventKey: s-1314, ts: 122411037986).
## LCP resource network request: https://web-dev.imgix.net/image/kheDArv5csY6rvQUJDbWRscckLr1/4i7JstVZvgTFk9dxCe4a.svg
eventKey: s-1314
Timings:
- Queued at: 41 ms
- Request sent at: 47 ms
- Download complete at: 56 ms
- Main thread processing completed at: 58 ms
Durations:
- Download time: 0.3 ms
- Main thread processing time: 2 ms
- Total duration: 17 ms
Redirects: no redirects
Status code: 200
MIME Type: image/svg+xml
Protocol: unknown
Priority: VeryHigh
Render blocking: No
From a service worker: No
Initiators (root request to the request that directly loaded this one): none
We can break this time down into the 4 phases that combine to make the LCP time:
- Time to first byte: 8 ms (6.1% of total LCP time)
- Resource load delay: 33 ms (25.7% of total LCP time)
- Resource load duration: 15 ms (11.4% of total LCP time)
- Element render delay: 73 ms (56.8% of total LCP time)
## Estimated savings: none
## External resources:
- https://developer.chrome.com/docs/performance/insights/lcp-breakdown
- https://web.dev/articles/lcp
- https://web.dev/articles/optimize-lcp
`;
exports[`McpResponse network pagination > trace summaries > includes the trace summary text and structured data 1`] = `
# test response
## Summary of Performance trace findings:
URL: https://web.dev/
Trace bounds: {min: 122410994891, max: 122416385853}
CPU throttling: none
Network throttling: none
# Available insight sets
The following is a list of insight sets. An insight set covers a specific part of the trace, split by navigations. The insights within each insight set are specific to that part of the trace. Be sure to consider the insight set id and bounds when calling functions. If no specific insight set or navigation is mentioned, assume the user is referring to the first one.
## insight set id: NAVIGATION_0
URL: https://web.dev/
Bounds: {min: 122410996889, max: 122416385853}
Metrics (lab / observed):
- LCP: 129 ms, event: (eventKey: r-6063, ts: 122411126100), nodeId: 7
- LCP breakdown:
- TTFB: 8 ms, bounds: {min: 122410996889, max: 122411004828}
- Load delay: 33 ms, bounds: {min: 122411004828, max: 122411037986}
- Load duration: 15 ms, bounds: {min: 122411037986, max: 122411052690}
- Render delay: 73 ms, bounds: {min: 122411052690, max: 122411126100}
- CLS: 0.00
Metrics (field / real users): n/a – no data for this page in CrUX
Available insights:
- insight name: LCPBreakdown
description: Each [subpart has specific improvement strategies](https://developer.chrome.com/docs/performance/insights/lcp-breakdown). Ideally, most of the LCP time should be spent on loading the resources, not within delays.
relevant trace bounds: {min: 122410996889, max: 122411126100}
example question: Help me optimize my LCP score
example question: Which LCP phase was most problematic?
example question: What can I do to reduce the LCP time for this page load?
- insight name: LCPDiscovery
description: [Optimize LCP](https://developer.chrome.com/docs/performance/insights/lcp-discovery) by making the LCP image discoverable from the HTML immediately, and avoiding lazy-loading
relevant trace bounds: {min: 122411004828, max: 122411055039}
example question: Suggest fixes to reduce my LCP
example question: What can I do to reduce my LCP discovery time?
example question: Why is LCP discovery time important?
- insight name: RenderBlocking
description: Requests are blocking the page's initial render, which may delay LCP. [Deferring or inlining](https://developer.chrome.com/docs/performance/insights/render-blocking) can move these network requests out of the critical path.
relevant trace bounds: {min: 122411037528, max: 122411053852}
example question: Show me the most impactful render blocking requests that I should focus on
example question: How can I reduce the number of render blocking requests?
- insight name: DocumentLatency
description: Your first network request is the most important. [Reduce its latency](https://developer.chrome.com/docs/performance/insights/document-latency) by avoiding redirects, ensuring a fast server response, and enabling text compression.
relevant trace bounds: {min: 122410998910, max: 122411043781}
estimated metric savings: FCP 0 ms, LCP 0 ms
estimated wasted bytes: 77.1 kB
example question: How do I decrease the initial loading time of my page?
example question: Did anything slow down the request for this document?
- insight name: ThirdParties
description: 3rd party code can significantly impact load performance. [Reduce and defer loading of 3rd party code](https://developer.chrome.com/docs/performance/insights/third-parties) to prioritize your page's content.
relevant trace bounds: {min: 122411037881, max: 122416229595}
example question: Which third parties are having the largest impact on my page performance?
## Details on call tree & network request formats:
Information on performance traces may contain main thread activity represented as call frames and network requests.
Each call frame is presented in the following format:
'id;eventKey;name;duration;selfTime;urlIndex;childRange;[line];[column];[S]'
Key definitions:
* id: A unique numerical identifier for the call frame. Never mention this id in the output to the user.
* eventKey: String that uniquely identifies this event in the flame chart.
* name: A concise string describing the call frame (e.g., 'Evaluate Script', 'render', 'fetchData').
* duration: The total execution time of the call frame, including its children.
* selfTime: The time spent directly within the call frame, excluding its children's execution.
* urlIndex: Index referencing the "All URLs" list. Empty if no specific script URL is associated.
* childRange: Specifies the direct children of this node using their IDs. If empty ('' or 'S' at the end), the node has no children. If a single number (e.g., '4'), the node has one child with that ID. If in the format 'firstId-lastId' (e.g., '4-5'), it indicates a consecutive range of child IDs from 'firstId' to 'lastId', inclusive.
* line: An optional field for a call frame's line number. This is where the function is defined.
* column: An optional field for a call frame's column number. This is where the function is defined.
* S: _Optional_. The letter 'S' terminates the line if that call frame was selected by the user.
Example Call Tree:
1;r-123;main;500;100;0;1;;
2;r-124;update;200;50;;3;0;1;
3;p-49575-15428179-2834-374;animate;150;20;0;4-5;0;1;S
4;p-49575-15428179-3505-1162;calculatePosition;80;80;0;1;;
5;p-49575-15428179-5391-2767;applyStyles;50;50;0;1;;
Network requests are formatted like this:
\`urlIndex;eventKey;queuedTime;requestSentTime;downloadCompleteTime;processingCompleteTime;totalDuration;downloadDuration;mainThreadProcessingDuration;statusCode;mimeType;priority;initialPriority;finalPriority;renderBlocking;protocol;fromServiceWorker;initiators;redirects:[[redirectUrlIndex|startTime|duration]];responseHeaders:[header1Value|header2Value|...]\`
- \`urlIndex\`: Numerical index for the request's URL, referencing the "All URLs" list.
- \`eventKey\`: String that uniquely identifies this request's trace event.
Timings (all in milliseconds, relative to navigation start):
- \`queuedTime\`: When the request was queued.
- \`requestSentTime\`: When the request was sent.
- \`downloadCompleteTime\`: When the download completed.
- \`processingCompleteTime\`: When main thread processing finished.
Durations (all in milliseconds):
- \`totalDuration\`: Total time from the request being queued until its main thread processing completed.
- \`downloadDuration\`: Time spent actively downloading the resource.
- \`mainThreadProcessingDuration\`: Time spent on the main thread after the download completed.
- \`statusCode\`: The HTTP status code of the response (e.g., 200, 404).
- \`mimeType\`: The MIME type of the resource (e.g., "text/html", "application/javascript").
- \`priority\`: The final network request priority (e.g., "VeryHigh", "Low").
- \`initialPriority\`: The initial network request priority.
- \`finalPriority\`: The final network request priority (redundant if \`priority\` is always final, but kept for clarity if \`initialPriority\` and \`priority\` differ).
- \`renderBlocking\`: 't' if the request was render-blocking, 'f' otherwise.
- \`protocol\`: The network protocol used (e.g., "h2", "http/1.1").
- \`fromServiceWorker\`: 't' if the request was served from a service worker, 'f' otherwise.
- \`initiators\`: A list (separated by ,) of URL indices for the initiator chain of this request. Listed in order starting from the root request to the request that directly loaded this one. This represents the network dependencies necessary to load this request. If there is no initiator, this is empty.
- \`redirects\`: A comma-separated list of redirects, enclosed in square brackets. Each redirect is formatted as
\`[redirectUrlIndex|startTime|duration]\`, where: \`redirectUrlIndex\`: Numerical index for the redirect's URL. \`startTime\`: The start time of the redirect in milliseconds, relative to navigation start. \`duration\`: The duration of the redirect in milliseconds.
- \`responseHeaders\`: A list (separated by '|') of values for specific, pre-defined response headers, enclosed in square brackets.
The order of headers corresponds to an internal fixed list. If a header is not present, its value will be empty.
`;
exports[`McpResponse network pagination > trace summaries > includes the trace summary text and structured data 2`] = `
"## Summary of Performance trace findings:\\nURL: https://web.dev/\\nTrace bounds: {min: 122410994891, max: 122416385853}\\nCPU throttling: none\\nNetwork throttling: none\\n\\n# Available insight sets\\n\\nThe following is a list of insight sets. An insight set covers a specific part of the trace, split by navigations. The insights within each insight set are specific to that part of the trace. Be sure to consider the insight set id and bounds when calling functions. If no specific insight set or navigation is mentioned, assume the user is referring to the first one.\\n\\n## insight set id: NAVIGATION_0\\n\\nURL: https://web.dev/\\nBounds: {min: 122410996889, max: 122416385853}\\nMetrics (lab / observed):\\n - LCP: 129 ms, event: (eventKey: r-6063, ts: 122411126100), nodeId: 7\\n - LCP breakdown:\\n - TTFB: 8 ms, bounds: {min: 122410996889, max: 122411004828}\\n - Load delay: 33 ms, bounds: {min: 122411004828, max: 122411037986}\\n - Load duration: 15 ms, bounds: {min: 122411037986, max: 122411052690}\\n - Render delay: 73 ms, bounds: {min: 122411052690, max: 122411126100}\\n - CLS: 0.00\\nMetrics (field / real users): n/a – no data for this page in CrUX\\nAvailable insights:\\n - insight name: LCPBreakdown\\n description: Each [subpart has specific improvement strategies](https://developer.chrome.com/docs/performance/insights/lcp-breakdown). Ideally, most of the LCP time should be spent on loading the resources, not within delays.\\n relevant trace bounds: {min: 122410996889, max: 122411126100}\\n example question: Help me optimize my LCP score\\n example question: Which LCP phase was most problematic?\\n example question: What can I do to reduce the LCP time for this page load?\\n - insight name: LCPDiscovery\\n description: [Optimize LCP](https://developer.chrome.com/docs/performance/insights/lcp-discovery) by making the LCP image discoverable from the HTML immediately, and avoiding lazy-loading\\n relevant trace bounds: {min: 122411004828, max: 122411055039}\\n example question: Suggest fixes to reduce my LCP\\n example question: What can I do to reduce my LCP discovery time?\\n example question: Why is LCP discovery time important?\\n - insight name: RenderBlocking\\n description: Requests are blocking the page's initial render, which may delay LCP. [Deferring or inlining](https://developer.chrome.com/docs/performance/insights/render-blocking) can move these network requests out of the critical path.\\n relevant trace bounds: {min: 122411037528, max: 122411053852}\\n example question: Show me the most impactful render blocking requests that I should focus on\\n example question: How can I reduce the number of render blocking requests?\\n - insight name: DocumentLatency\\n description: Your first network request is the most important. [Reduce its latency](https://developer.chrome.com/docs/performance/insights/document-latency) by avoiding redirects, ensuring a fast server response, and enabling text compression.\\n relevant trace bounds: {min: 122410998910, max: 122411043781}\\n estimated metric savings: FCP 0 ms, LCP 0 ms\\n estimated wasted bytes: 77.1 kB\\n example question: How do I decrease the initial loading time of my page?\\n example question: Did anything slow down the request for this document?\\n - insight name: ThirdParties\\n description: 3rd party code can significantly impact load performance. [Reduce and defer loading of 3rd party code](https://developer.chrome.com/docs/performance/insights/third-parties) to prioritize your page's content.\\n relevant trace bounds: {min: 122411037881, max: 122416229595}\\n example question: Which third parties are having the largest impact on my page performance?\\n\\n## Details on call tree & network request formats:\\nInformation on performance traces may contain main thread activity represented as call frames and network requests.\\n\\nEach call frame is presented in the following format:\\n\\n'id;eventKey;name;duration;selfTime;urlIndex;childRange;[line];[column];[S]'\\n\\nKey definitions:\\n\\n* id: A unique numerical identifier for the call frame. Never mention this id in the output to the user.\\n* eventKey: String that uniquely identifies this event in the flame chart.\\n* name: A concise string describing the call frame (e.g., 'Evaluate Script', 'render', 'fetchData').\\n* duration: The total execution time of the call frame, including its children.\\n* selfTime: The time spent directly within the call frame, excluding its children's execution.\\n* urlIndex: Index referencing the \\"All URLs\\" list. Empty if no specific script URL is associated.\\n* childRange: Specifies the direct children of this node using their IDs. If empty ('' or 'S' at the end), the node has no children. If a single number (e.g., '4'), the node has one child with that ID. If in the format 'firstId-lastId' (e.g., '4-5'), it indicates a consecutive range of child IDs from 'firstId' to 'lastId', inclusive.\\n* line: An optional field for a call frame's line number. This is where the function is defined.\\n* column: An optional field for a call frame's column number. This is where the function is defined.\\n* S: _Optional_. The letter 'S' terminates the line if that call frame was selected by the user.\\n\\nExample Call Tree:\\n\\n1;r-123;main;500;100;0;1;;\\n2;r-124;update;200;50;;3;0;1;\\n3;p-49575-15428179-2834-374;animate;150;20;0;4-5;0;1;S\\n4;p-49575-15428179-3505-1162;calculatePosition;80;80;0;1;;\\n5;p-49575-15428179-5391-2767;applyStyles;50;50;0;1;;\\n\\n\\nNetwork requests are formatted like this:\\n\`urlIndex;eventKey;queuedTime;requestSentTime;downloadCompleteTime;processingCompleteTime;totalDuration;downloadDuration;mainThreadProcessingDuration;statusCode;mimeType;priority;initialPriority;finalPriority;renderBlocking;protocol;fromServiceWorker;initiators;redirects:[[redirectUrlIndex|startTime|duration]];responseHeaders:[header1Value|header2Value|...]\`\\n\\n- \`urlIndex\`: Numerical index for the request's URL, referencing the \\"All URLs\\" list.\\n- \`eventKey\`: String that uniquely identifies this request's trace event.\\nTimings (all in milliseconds, relative to navigation start):\\n- \`queuedTime\`: When the request was queued.\\n- \`requestSentTime\`: When the request was sent.\\n- \`downloadCompleteTime\`: When the download completed.\\n- \`processingCompleteTime\`: When main thread processing finished.\\nDurations (all in milliseconds):\\n- \`totalDuration\`: Total time from the request being queued until its main thread processing completed.\\n- \`downloadDuration\`: Time spent actively downloading the resource.\\n- \`mainThreadProcessingDuration\`: Time spent on the main thread after the download completed.\\n- \`statusCode\`: The HTTP status code of the response (e.g., 200, 404).\\n- \`mimeType\`: The MIME type of the resource (e.g., \\"text/html\\", \\"application/javascript\\").\\n- \`priority\`: The final network request priority (e.g., \\"VeryHigh\\", \\"Low\\").\\n- \`initialPriority\`: The initial network request priority.\\n- \`finalPriority\`: The final network request priority (redundant if \`priority\` is always final, but kept for clarity if \`initialPriority\` and \`priority\` differ).\\n- \`renderBlocking\`: 't' if the request was render-blocking, 'f' otherwise.\\n- \`protocol\`: The network protocol used (e.g., \\"h2\\", \\"http/1.1\\").\\n- \`fromServiceWorker\`: 't' if the request was served from a service worker, 'f' otherwise.\\n- \`initiators\`: A list (separated by ,) of URL indices for the initiator chain of this request. Listed in order starting from the root request to the request that directly loaded this one. This represents the network dependencies necessary to load this request. If there is no initiator, this is empty.\\n- \`redirects\`: A comma-separated list of redirects, enclosed in square brackets. Each redirect is formatted as\\n\`[redirectUrlIndex|startTime|duration]\`, where: \`redirectUrlIndex\`: Numerical index for the redirect's URL. \`startTime\`: The start time of the redirect in milliseconds, relative to navigation start. \`duration\`: The duration of the redirect in milliseconds.\\n- \`responseHeaders\`: A list (separated by '|') of values for specific, pre-defined response headers, enclosed in square brackets.\\nThe order of headers corresponds to an internal fixed list. If a header is not present, its value will be empty.\\n"
`;
exports[`McpResponse network pagination > trace summaries > includes the trace summary text and structured data 3`] = `
[
{
"insightName": "INPBreakdown",
"insightKey": "INPBreakdown"
},
{
"insightName": "LCPBreakdown",
"insightKey": "LCPBreakdown"
},
{
"insightName": "LCPDiscovery",
"insightKey": "LCPDiscovery"
},
{
"insightName": "CLSCulprits",
"insightKey": "CLSCulprits"
},
{
"insightName": "RenderBlocking",
"insightKey": "RenderBlocking"
},
{
"insightName": "NetworkDependencyTree",
"insightKey": "NetworkDependencyTree"
},
{
"insightName": "ImageDelivery",
"insightKey": "ImageDelivery"
},
{
"insightName": "DocumentLatency",
"insightKey": "DocumentLatency"
},
{
"insightName": "FontDisplay",
"insightKey": "FontDisplay"
},
{
"insightName": "Viewport",
"insightKey": "Viewport"
},
{
"insightName": "DOMSize",
"insightKey": "DOMSize"
},
{
"insightName": "ThirdParties",
"insightKey": "ThirdParties"
},
{
"insightName": "DuplicatedJavaScript",
"insightKey": "DuplicatedJavaScript"
},
{
"insightName": "SlowCSSSelector",
"insightKey": "SlowCSSSelector"
},
{
"insightName": "ForcedReflow",
"insightKey": "ForcedReflow"
},
{
"insightName": "Cache",
"insightKey": "Cache"
},
{
"insightName": "ModernHTTP",
"insightKey": "ModernHTTP"
},
{
"insightName": "LegacyJavaScript",
"insightKey": "LegacyJavaScript"
}
]
`;
exports[`McpResponse network request filtering > filters network requests by resource type 1`] = `
# test response
## Network requests
Showing 1-2 of 2 (Page 1 of 1).
reqid=1 GET http://example.com [pending]
reqid=1 GET http://example.com [pending]
`;
exports[`McpResponse network request filtering > filters network requests by single resource type 1`] = `
# test response
## Network requests
Showing 1-1 of 1 (Page 1 of 1).
reqid=1 GET http://example.com [pending]
`;
exports[`McpResponse network request filtering > shows all requests when empty resourceTypes array is provided 1`] = `
# test response
## Network requests
Showing 1-5 of 5 (Page 1 of 1).
reqid=1 GET http://example.com [pending]
reqid=1 GET http://example.com [pending]
reqid=1 GET http://example.com [pending]
reqid=1 GET http://example.com [pending]
reqid=1 GET http://example.com [pending]
`;
exports[`McpResponse network request filtering > shows all requests when no filters are provided 1`] = `
# test response
## Network requests
Showing 1-5 of 5 (Page 1 of 1).
reqid=1 GET http://example.com [pending]
reqid=1 GET http://example.com [pending]
reqid=1 GET http://example.com [pending]
reqid=1 GET http://example.com [pending]
reqid=1 GET http://example.com [pending]
`;
exports[`McpResponse network request filtering > shows no requests when filter matches nothing 1`] = `
# test response
## Network requests
No requests found.
`;
exports[`extensions > lists extensions 1`] = `
# test response
## Extensions
id=id1 "Extension 1" v1.0 Enabled
id=id2 "Extension 2" v2.0 Disabled
`;
exports[`extensions > lists extensions 2`] = `
{
"extensions": [
{
"id": "id1",
"name": "Extension 1",
"version": "1.0",
"isEnabled": true,
"path": "/path/to/ext1"
},
{
"id": "id2",
"name": "Extension 2",
"version": "2.0",
"isEnabled": false,
"path": "/path/to/ext2"
}
]
}
`;