Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 131 additions & 0 deletions tests/McpResponse.test.js.snapshot
Original file line number Diff line number Diff line change
@@ -1,3 +1,91 @@
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 > allows response text lines to be added 1`] = `
# test response
Testing 1
Testing 2
`;

exports[`McpResponse > list pages 1`] = `
# test response
## Pages
0: about:blank [selected]
`;

exports[`McpResponse > returns correctly formatted snapshot for a simple tree 1`] = `
# test response
## Page content
Expand Down Expand Up @@ -43,3 +131,46 @@ uid=1_0 RootWebArea "My test page" url="about:blank"
uid=1_5 InlineTextBox "test"

`;

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.
`;
Loading