@@ -177,18 +177,6 @@ describe.runIf(process.platform !== "win32")("CUA MCP proxy transport", () => {
177177 } ) ,
178178 ) ;
179179 break ;
180- case "browser_navigate" :
181- fake . respond (
182- request ,
183- toolResult ( {
184- status : "ok" ,
185- target_id : "target-1" ,
186- tab_id : "tab-1" ,
187- url : "https://example.com/" ,
188- refs_invalidated : true ,
189- } ) ,
190- ) ;
191- break ;
192180 case "end_session" :
193181 fake . respond ( request , toolResult ( { session : "openclaw-test" , active : false } ) ) ;
194182 break ;
@@ -221,12 +209,6 @@ describe.runIf(process.platform !== "win32")("CUA MCP proxy transport", () => {
221209 delivery : { mode : 0 , deliveredCount : 1 } ,
222210 evidence : [ { kind : 0 } ] ,
223211 } ) ;
224- await driver . callTool ( "browser_navigate" , {
225- target_id : "target-1" ,
226- tab_id : "tab-1" ,
227- url : "https://example.com/" ,
228- } ) ;
229-
230212 await driver . dispose ( ) ;
231213 await vi . waitFor ( ( ) => {
232214 closed = endpoint . requests . some (
@@ -242,17 +224,6 @@ describe.runIf(process.platform !== "win32")("CUA MCP proxy transport", () => {
242224 ( request ) => request . method === "tools/call" && request . params ?. name === "click" ,
243225 ) ?. params ?. arguments ,
244226 ) . toMatchObject ( { x : 20 , y : 30 , button : "left" , count : 1 , scope : "desktop" } ) ;
245- expect (
246- endpoint . requests . find (
247- ( request ) =>
248- request . method === "tools/call" && request . params ?. name === "browser_navigate" ,
249- ) ?. params ?. arguments ,
250- ) . toMatchObject ( {
251- target_id : "target-1" ,
252- tab_id : "tab-1" ,
253- url : "https://example.com/" ,
254- session : expect . stringMatching ( / ^ o p e n c l a w - / ) ,
255- } ) ;
256227 } finally {
257228 await endpoint . close ( ) ;
258229 }
@@ -297,6 +268,9 @@ describe.runIf(process.platform !== "win32")("CUA MCP proxy transport", () => {
297268 const calls = Array . from ( { length : 65 } , ( ) => driver . callTool ( "list_windows" , { } ) ) ;
298269 await expect ( calls [ 64 ] ) . rejects . toThrow ( "too many pending requests" ) ;
299270 await vi . waitFor ( ( ) => expect ( held ) . toHaveLength ( 64 ) ) ;
271+ expect ( held [ 0 ] ?. params ?. arguments ) . toMatchObject ( {
272+ session : expect . stringMatching ( / ^ o p e n c l a w - / ) ,
273+ } ) ;
300274 for ( const request of held ) {
301275 endpoint . respond ( request , toolResult ( { windows : [ ] } ) ) ;
302276 }
0 commit comments