From d65d5a10fcb21dbf004961730978e70f3f66a3dc Mon Sep 17 00:00:00 2001 From: James Yang Date: Thu, 13 Aug 2026 12:58:41 -0400 Subject: [PATCH] test: cover time and datetime-local locator fills Extend date fill coverage so #1249's remaining input types share the same value-setter assertions in integration and RPC smoke tests. --- .../browser-runtime/rpc-client-smoke.test.ts | 34 ++++++++++++------- .../tests/integration/locatorFill.test.ts | 32 ++++++++++------- 2 files changed, 40 insertions(+), 26 deletions(-) diff --git a/packages/protocol/tests/browser-runtime/rpc-client-smoke.test.ts b/packages/protocol/tests/browser-runtime/rpc-client-smoke.test.ts index 5ec7a44e7..983d69e15 100644 --- a/packages/protocol/tests/browser-runtime/rpc-client-smoke.test.ts +++ b/packages/protocol/tests/browser-runtime/rpc-client-smoke.test.ts @@ -346,19 +346,25 @@ describe("Stagehand service worker RPC client smoke", () => { }), ).resolves.toBe("clicked:user@example.com"); - await expect( - activeRpcClient.send(StagehandMethods.locatorFill, { - pageId: page.pageId, - selector: "#locator-date", - value: "2026-07-21", - }), - ).resolves.toStrictEqual({ filled: true }); - await expect( - activeRpcClient.send(StagehandMethods.locatorInputValue, { - pageId: page.pageId, - selector: "#locator-date", - }), - ).resolves.toBe("2026-07-21"); + for (const { selector, value } of [ + { selector: "#locator-date", value: "2026-07-21" }, + { selector: "#locator-time", value: "14:30" }, + { selector: "#locator-datetime-local", value: "2026-07-21T09:15" }, + ] as const) { + await expect( + activeRpcClient.send(StagehandMethods.locatorFill, { + pageId: page.pageId, + selector, + value, + }), + ).resolves.toStrictEqual({ filled: true }); + await expect( + activeRpcClient.send(StagehandMethods.locatorInputValue, { + pageId: page.pageId, + selector, + }), + ).resolves.toBe(value); + } await expect( activeRpcClient.send(StagehandMethods.locatorIsVisible, { @@ -637,6 +643,8 @@ async function startFixtureServer(): Promise { + +