2121    MINUTE ,
2222    SECOND ,
2323    RobustWebSocket ,
24+     SocketIOWaitNodeForOutputs ,
2425    app_mode_trigger_next_app ,
26+     decode_socketio_42_message ,
2527    expected_service_running ,
2628    wait_for_service_running ,
2729)
@@ -165,7 +167,7 @@ def test_classic_ti_plan(  # noqa: PLR0915
165167        # NOTE: Sometimes this iframe flicks and shows a white page. This wait will avoid it 
166168        page .wait_for_timeout (_ELECTRODE_SELECTOR_FLICKERING_WAIT_TIME )
167169
168-         with  log_context (logging .INFO , "Configure selector" ):
170+         with  log_context (logging .INFO , "Configure selector" ,  logger = ctx . logger ):
169171            assert  (
170172                page .get_by_test_id ("settingsForm_"  +  node_ids [0 ]).count () ==  0 
171173            ), "service settings should not be visible" 
@@ -185,22 +187,20 @@ def test_classic_ti_plan(  # noqa: PLR0915
185187                electrode_id  =  "Electrode_"  +  selection [1 ]
186188                electrode_selector_iframe .get_by_test_id (group_id ).click ()
187189                electrode_selector_iframe .get_by_test_id (electrode_id ).click ()
188-         # configuration done, push and wait for output 
189-         with  (
190-             log_context (logging .INFO , "Check outputs" ),
191-             page .expect_request (
192-                 lambda  r : bool (
193-                     re .search (_GET_NODE_OUTPUTS_REQUEST_PATTERN , r .url )
194-                     and  r .method .upper () ==  "GET" 
195-                 )
196-             ) as  request_info ,
197-         ):
198-             electrode_selector_iframe .get_by_test_id ("FinishSetUp" ).click ()
199-             response  =  request_info .value .response ()
200-             assert  response 
201-             assert  response .ok , f"{ response .json ()}  " 
202-             response_body  =  response .json ()
203-             ctx .logger .info ("the following output was generated: %s" , response_body )
190+         # configuration done, push and wait for the 1 output 
191+         with  log_context (logging .INFO , "Check outputs" , logger = ctx .logger ):
192+             waiter  =  SocketIOWaitNodeForOutputs (
193+                 ctx .logger , expected_number_of_outputs = 1 , node_id = node_ids [0 ]
194+             )
195+             with  log_in_and_out .expect_event (
196+                 "framereceived" , waiter 
197+             ) as  frame_received_event :
198+                 electrode_selector_iframe .get_by_test_id ("FinishSetUp" ).click ()
199+             socket_io_message  =  decode_socketio_42_message (frame_received_event .value )
200+             ctx .logger .info (
201+                 "the following output was generated: %s" ,
202+                 socket_io_message .obj ["data" ]["outputs" ]["output_1" ]["path" ],
203+             )
204204
205205    with  log_context (
206206        logging .INFO , "Classic TI step (2/%s)" , expected_number_of_steps 
0 commit comments