File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed
services/dynamic-scheduler
src/simcore_service_dynamic_scheduler/api/frontend/routes Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ async def service_details(node_id: NodeID):
3434 return
3535
3636 scheduler_internals = service_model .model_dump (mode = "json" )
37- service_status = json .loads (scheduler_internals .pop ("service_status" ))
37+ service_status = scheduler_internals .pop ("service_status" , "null" )
38+ service_status = json .loads ("null" if service_status == "" else service_status )
3839 dynamic_service_start = scheduler_internals .pop ("dynamic_service_start" )
3940
4041 ui .markdown ("**Service Status**" )
Original file line number Diff line number Diff line change 3535]
3636
3737
38+ async def test_service_details_no_status_present (
39+ app_runner : None ,
40+ async_page : Page ,
41+ server_host_port : str ,
42+ node_id : NodeID ,
43+ not_initialized_app : FastAPI ,
44+ get_dynamic_service_start : Callable [[NodeID ], DynamicServiceStart ],
45+ ):
46+ await set_request_as_running (
47+ not_initialized_app , get_dynamic_service_start (node_id )
48+ )
49+
50+ await async_page .goto (server_host_port )
51+
52+ # 1. one service is tracked
53+ await assert_contains_text (async_page , "Total tracked services:" )
54+ await assert_contains_text (async_page , "1" )
55+ await assert_contains_text (async_page , "Details" , instances = 1 )
56+
57+ # 2. open details page
58+ await click_on_text (async_page , "Details" )
59+ # NOTE: if something is wrong with the page the bottom to remove from tracking
60+ # will not be present
61+ await assert_contains_text (async_page , "Remove from tracking" , instances = 1 )
62+
63+
3864@pytest .mark .parametrize (
3965 "service_status" ,
4066 [
You can’t perform that action at this time.
0 commit comments