@@ -36,19 +36,19 @@ def test_workbook_socket_updates_after_navigation_with_pending_frame():
3636 page .on ('pageerror' ,lambda e :errors .append (str (e )))
3737 page .goto (origin );page .wait_for_function ('typeof window.mount === "function"' )
3838 page .evaluate ('(ids)=>{seed(ids[0]);seed(ids[1]);mount(ids[0]);}' ,[first ,second ])
39- page .wait_for_function ('(id)=>socketReady(id)' ,arg = first )
39+ page .wait_for_function ('(id)=>socketReady(id)' ,arg = first , polling = 10 )
4040 if mode == 'navigate-with-pending-frame' :
4141 assert page .request .get (origin + f'/send?id={ first } &column=old&value=old-A' ).status == 200
42- page .wait_for_function ('pending()===1' )
42+ page .wait_for_function ('pending()===1' , polling = 10 )
4343 target = first if mode == 'same-workbook' else second
4444 if target == second :
4545 page .evaluate ('(id)=>mount(id)' ,second )
46- page .wait_for_function ('(pair)=>socketReady(pair[1])&&!socketReady(pair[0])' ,arg = [first ,second ])
46+ page .wait_for_function ('(pair)=>socketReady(pair[1])&&!socketReady(pair[0])' ,arg = [first ,second ], polling = 10 )
4747 assert page .request .get (origin + f'/send?id={ target } &column=current&value=current-{ target } ' ).status == 200
4848 # A real subsequent message is a protocol acknowledgement that
4949 # queued earlier WebSocket events have reached the mounted hook.
5050 page .request .get (origin + f'/send?id={ target } &column=ack&value=seen' )
51- page .wait_for_function ('acks===1' )
51+ page .wait_for_function ('acks===1' , polling = 10 )
5252 pending = page .evaluate ('pending()' );page .evaluate ('flush()' )
5353 snapshot = page .evaluate ('(id)=>snapshot(id)' ,target )
5454 enrichments = snapshot ['rows' ][0 ]['enrichments' ]
0 commit comments