Rework page wait again

Further reducing bouncing between page and server for loop polling. If there is
a page, the page polls. If there isn't a page, the server polls. Simpler.
This commit is contained in:
Karl Seguin
2025-09-03 19:37:09 +08:00
parent e237e709b6
commit b6137b03cd
12 changed files with 185 additions and 179 deletions

View File

@@ -424,7 +424,7 @@ pub const JsRunner = struct {
}
return err;
};
self.page.session.wait(1);
self.page.session.wait(1000);
@import("root").js_runner_duration += std.time.Instant.since(try std.time.Instant.now(), start);
if (case.@"1") |expected| {
@@ -518,7 +518,7 @@ pub fn htmlRunner(file: []const u8) !void {
const url = try std.fmt.allocPrint(arena_allocator, "http://localhost:9582/src/tests/{s}", .{file});
try page.navigate(url, .{});
page.wait(2);
_ = page.wait(2000);
const value = js_context.exec("testing.getStatus()", "testing.getStatus()") catch |err| {
const msg = try_catch.err(arena_allocator) catch @errorName(err) orelse "unknown";