@@ -85,20 +85,17 @@ test('commandless longpress response omits internal interaction diagnostics', ()
8585 ) . toEqual ( { completedSteps : 1 } ) ;
8686} ) ;
8787
88- function selectorResult ( readiness ?: { polls : number ; waitedMs : number } ) : PressCommandResult {
88+ function selectorResult ( ) : PressCommandResult {
8989 return {
9090 kind : 'selector' ,
9191 point : { x : 10 , y : 20 } ,
9292 target : { kind : 'selector' , selector : 'label=Continue' } ,
9393 node : { ref : 'e1' , index : 0 , type : 'Button' , label : 'Continue' } ,
9494 selectorChain : [ 'label=Continue' ] ,
9595 warning : 'earlier warning' ,
96- ...( readiness ? { readiness } : { } ) ,
9796 } ;
9897}
9998
100- const WAITED_SELECTOR_RESULT = selectorResult ( { polls : 3 , waitedMs : 400 } ) ;
101-
10299test . each ( [ false , true ] ) ( 'selector-touch observation after retirement=%s' , async ( retired ) => {
103100 const sessionStore = makeSessionStore ( ) ;
104101 const address = 'cwd:selector-touch-response:default' ;
@@ -252,25 +249,14 @@ test.each([
252249 } ,
253250) ;
254251
255- test ( 'the response builder reports the resolved wait and keeps the prior warning' , ( ) => {
256- const { responseData, result } = buildInteractionResponseData ( {
257- source : { kind : 'runtime' , result : WAITED_SELECTOR_RESULT } ,
258- referenceFrame : undefined ,
259- staleRefsWarning : 'stale refs' ,
260- } ) ;
261-
262- expect ( responseData . readiness ) . toEqual ( { polls : 3 , waitedMs : 400 } ) ;
263- expect ( responseData . warning ) . toBe ( 'earlier warning stale refs' ) ;
264- expect ( result . readiness ) . toBeUndefined ( ) ;
265- } ) ;
266-
267- test ( 'the response builder omits readiness when nothing waited' , ( ) => {
252+ test ( 'the response builder keeps the prior warning' , ( ) => {
268253 const { responseData } = buildInteractionResponseData ( {
269254 source : { kind : 'runtime' , result : selectorResult ( ) } ,
270255 referenceFrame : undefined ,
256+ staleRefsWarning : 'stale refs' ,
271257 } ) ;
272258
273- expect ( 'readiness' in responseData ) . toBe ( false ) ;
259+ expect ( responseData . warning ) . toBe ( 'earlier warning stale refs' ) ;
274260} ) ;
275261
276262test ( 'an already retired coordinate touch skips its frame probe without a warning' , async ( ) => {
0 commit comments