@@ -255,13 +255,43 @@ suite.define(() => {
255255 try {
256256 await page . goto ( new URL ( "settings/connection" , suite . server . baseUrl ) . href ) ;
257257 await page . locator ( "openclaw-app-shell" ) . waitFor ( ) ;
258+ await page . locator ( "openclaw-connection-page .content-header" ) . waitFor ( ) ;
258259 await gateway . deferNext ( "connect" ) ;
259260 await gateway . closeLatest ( 1012 , "test reconnect" ) ;
260261
261- await page . getByText ( "Actions are unavailable while the Gateway reconnects." ) . waitFor ( ) ;
262+ const notice = page . locator ( '.connection-action-block[role="status"]' ) ;
263+ await notice . waitFor ( ) ;
264+ expect ( ( await notice . textContent ( ) ) ?. trim ( ) ) . toBe (
265+ "Changes to settings are disabled while the Gateway is reconnecting." ,
266+ ) ;
267+ expect ( await notice . locator ( "svg" ) . count ( ) ) . toBe ( 1 ) ;
262268 const outlet = page . locator ( "openclaw-router-outlet" ) ;
263269 expect ( await outlet . getAttribute ( "inert" ) ) . not . toBeNull ( ) ;
264270 expect ( await outlet . getAttribute ( "aria-disabled" ) ) . toBe ( "true" ) ;
271+ const bounds = await page . evaluate ( ( ) => {
272+ const noticeRect = document
273+ . querySelector ( ".connection-action-block" )
274+ ?. getBoundingClientRect ( ) ;
275+ const navRect = document . querySelector ( ".shell-nav" ) ?. getBoundingClientRect ( ) ;
276+ const mainRect = document . querySelector ( "#control-ui-main" ) ?. getBoundingClientRect ( ) ;
277+ const headerRect = document
278+ . querySelector ( "openclaw-connection-page .content-header" )
279+ ?. getBoundingClientRect ( ) ;
280+ return {
281+ headerTop : headerRect ?. top ,
282+ noticeBottom : noticeRect ?. bottom ,
283+ noticeTop : noticeRect ?. top ,
284+ noticeLeft : noticeRect ?. left ,
285+ noticeRight : noticeRect ?. right ,
286+ mainTop : mainRect ?. top ,
287+ navRight : navRect ?. right ,
288+ mainRight : mainRect ?. right ,
289+ } ;
290+ } ) ;
291+ expect ( bounds . noticeTop ) . toBe ( bounds . mainTop ) ;
292+ expect ( ( bounds . headerTop ?? 0 ) - ( bounds . noticeBottom ?? 0 ) ) . toBeCloseTo ( 44 , 3 ) ;
293+ expect ( bounds . noticeLeft ) . toBe ( bounds . navRight ) ;
294+ expect ( bounds . noticeRight ) . toBe ( bounds . mainRight ) ;
265295 await mkdir ( RECOVERY_ARTIFACT_DIR , { recursive : true } ) ;
266296 await page . screenshot ( {
267297 path : path . join ( RECOVERY_ARTIFACT_DIR , "02-reconnecting-actions-blocked.png" ) ,
0 commit comments