@@ -1035,6 +1035,7 @@ test.describe("thread activity", () => {
10351035 exact : true ,
10361036 } ) ;
10371037 const indicator = thread . getByRole ( "status" , { name : "Typing activity" } ) ;
1038+ const workingStatus = region . getByRole ( "status" ) ;
10381039 const openThread = async ( root ) => {
10391040 await page
10401041 . locator ( `[data-channel-timeline] [data-message-id="${ root . id } "]` )
@@ -1085,9 +1086,13 @@ test.describe("thread activity", () => {
10851086 await expect ( channelActivity ( page ) ) . toHaveCount ( 0 ) ;
10861087 publish ( keys [ 0 ] , roots [ 0 ] ) ;
10871088 await expect ( region . getByRole ( "button" ) ) . toHaveCount ( 1 ) ;
1089+ await expect ( workingStatus ) . toContainText ( "Worker 1 is working" ) ;
10881090 await expect ( indicator ) . toHaveCount ( 0 ) ;
10891091 publish ( keys [ 1 ] , roots [ 0 ] ) ;
10901092 await expect ( region . getByRole ( "button" ) ) . toHaveCount ( 2 ) ;
1093+ await expect ( workingStatus ) . toContainText (
1094+ / W o r k e r [ 1 2 ] , W o r k e r [ 1 2 ] a r e w o r k i n g / ,
1095+ ) ;
10911096 for ( const agent of agents )
10921097 await expect (
10931098 region . getByRole ( "button" , { name : new RegExp ( agent . slice ( 0 , 12 ) ) } ) ,
@@ -1098,6 +1103,7 @@ test.describe("thread activity", () => {
10981103 publish ( human , roots [ 0 ] ) ;
10991104 await expect ( indicator ) . toHaveCount ( 1 ) ;
11001105 await expect ( indicator ) . not . toContainText ( "Worker" ) ;
1106+ await expect ( workingStatus ) . toContainText ( "are working" ) ;
11011107 await page . setViewportSize ( { width : 390 , height : 844 } ) ;
11021108 await page . locator ( "[data-panel-dock]" ) . evaluate ( async ( element ) => {
11031109 await Promise . all (
@@ -1146,11 +1152,13 @@ test.describe("thread activity", () => {
11461152 await expect ( region . getByRole ( "button" ) ) . toHaveCount ( 1 ) ;
11471153 publish ( keys [ 1 ] , roots [ 0 ] , 9 ) ;
11481154 await expect ( region ) . toHaveCount ( 0 ) ;
1155+ await expect ( workingStatus ) . toHaveCount ( 0 ) ;
11491156 await expect ( indicator ) . toHaveCount ( 0 ) ;
11501157 await page
11511158 . getByRole ( "button" , { name : "Close Thread tab" , exact : true } )
11521159 . click ( ) ;
11531160 // Channel uses the same rows behind an existing visible disclosure.
1161+ const channelStatus = channelActivity ( page ) . getByRole ( "status" ) ;
11541162 const channelTyping = page
11551163 . getByRole ( "form" , { name : "Send a message to Alpha" , exact : true } )
11561164 . locator ( ".." )
@@ -1159,17 +1167,25 @@ test.describe("thread activity", () => {
11591167 await expect ( channelActivity ( page ) . locator ( "summary" ) ) . toHaveText (
11601168 "Channel-wide activity · 1 agent" ,
11611169 ) ;
1170+ await expect ( channelStatus ) . toContainText ( "Worker 1 is working" ) ;
11621171 await expect ( channelTyping ) . toHaveCount ( 0 ) ;
11631172 publish ( keys [ 1 ] ) ;
11641173 await expect ( channelActivity ( page ) . locator ( "summary" ) ) . toHaveText (
11651174 "Channel-wide activity · 2 agents" ,
11661175 ) ;
1176+ await expect ( channelStatus ) . toContainText (
1177+ / W o r k e r [ 1 2 ] , W o r k e r [ 1 2 ] a r e w o r k i n g / ,
1178+ ) ;
1179+ await expect ( channelActivity ( page ) . locator ( "details" ) ) . not . toHaveAttribute (
1180+ "open" ,
1181+ ) ;
11671182 await expandChannelActivity ( page ) ;
11681183 await expect ( channelActivity ( page ) . getByRole ( "button" ) ) . toHaveCount ( 2 ) ;
11691184 await expect ( channelTyping ) . toHaveCount ( 0 ) ;
11701185 publish ( human ) ;
11711186 await expect ( channelTyping ) . toBeVisible ( ) ;
11721187 await expect ( channelTyping ) . not . toContainText ( "Worker" ) ;
1188+ await expect ( channelStatus ) . toContainText ( "are working" ) ;
11731189 await page . screenshot ( {
11741190 path : testInfo . outputPath ( "channel-multiple-agents-human-typing.png" ) ,
11751191 } ) ;
0 commit comments