fix(test): update tests to match new CDP error handling behavior

processMessage no longer returns Zig errors when dispatchCommand fails —
it sends a CDP error response and continues. Update all expectError calls
to use processMessage + expectSentError instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Navid EMAD
2026-03-15 05:52:20 +01:00
parent a2e66f85a1
commit fe9b2e672b
3 changed files with 21 additions and 18 deletions

View File

@@ -633,7 +633,7 @@ test "cdp.page: getFrameTree" {
defer ctx.deinit();
{
try testing.expectError(error.BrowserContextNotLoaded, ctx.processMessage(.{ .id = 10, .method = "Page.getFrameTree", .params = .{ .targetId = "X" } }));
try ctx.processMessage(.{ .id = 10, .method = "Page.getFrameTree", .params = .{ .targetId = "X" } });
try ctx.expectSentError(-31998, "BrowserContextNotLoaded", .{ .id = 10 });
}