@@ -65,10 +65,22 @@ test("pins a canonical thread, switches it from the collapsible rail, and unpins
6565 const appSidebarLayer = document . querySelector < HTMLElement > (
6666 '[data-testid="app-sidebar-layer"]' ,
6767 ) ;
68+ const appSurface = document . querySelector < HTMLElement > (
69+ ".buzz-huddle-app-surface" ,
70+ ) ;
71+ const sidebarSurface = document . querySelector < HTMLElement > (
72+ '[data-sidebar="sidebar"]' ,
73+ ) ;
6874 const contentElement = document . querySelector < HTMLElement > (
6975 "[data-buzz-content-surface]:not([data-buzz-content-unframed])" ,
7076 ) ;
71- if ( ! railElement || ! appSidebarLayer || ! contentElement ) {
77+ if (
78+ ! railElement ||
79+ ! appSidebarLayer ||
80+ ! appSurface ||
81+ ! sidebarSurface ||
82+ ! contentElement
83+ ) {
7284 throw new Error (
7385 "Thread Rail, rail column, app layer, or framed content surface unavailable" ,
7486 ) ;
@@ -77,6 +89,8 @@ test("pins a canonical thread, switches it from the collapsible rail, and unpins
7789 const contentRect = contentElement . getBoundingClientRect ( ) ;
7890 const railStyle = getComputedStyle ( railElement ) ;
7991 const appSidebarLayerStyle = getComputedStyle ( appSidebarLayer ) ;
92+ const appSurfaceStyle = getComputedStyle ( appSurface ) ;
93+ const sidebarSurfaceStyle = getComputedStyle ( sidebarSurface ) ;
8094 const contentStyle = getComputedStyle ( contentElement ) ;
8195 return {
8296 railTop : Math . round ( railRect . top ) ,
@@ -89,6 +103,9 @@ test("pins a canonical thread, switches it from the collapsible rail, and unpins
89103 hasRailColumn : Boolean ( railColumnElement ) ,
90104 appSidebarLayerBackground : appSidebarLayerStyle . backgroundColor ,
91105 appSidebarLayerBackgroundImage : appSidebarLayerStyle . backgroundImage ,
106+ appSurfaceBackground : appSurfaceStyle . backgroundColor ,
107+ appSurfaceBackgroundImage : appSurfaceStyle . backgroundImage ,
108+ sidebarSurfaceBackground : sidebarSurfaceStyle . backgroundColor ,
92109 contentBackground : contentStyle . backgroundColor ,
93110 railClipPath : railStyle . clipPath ,
94111 } ;
@@ -102,6 +119,10 @@ test("pins a canonical thread, switches it from the collapsible rail, and unpins
102119 expect ( paneGeometry . hasRailColumn ) . toBe ( false ) ;
103120 expect ( paneGeometry . appSidebarLayerBackground ) . toBe ( "rgba(0, 0, 0, 0)" ) ;
104121 expect ( paneGeometry . appSidebarLayerBackgroundImage ) . toBe ( "none" ) ;
122+ expect ( paneGeometry . appSurfaceBackground ) . toBe (
123+ paneGeometry . sidebarSurfaceBackground ,
124+ ) ;
125+ expect ( paneGeometry . appSurfaceBackgroundImage ) . toBe ( "none" ) ;
105126 expect ( paneGeometry . railClipPath ) . toBe ( "none" ) ;
106127 const entry = rail . getByTestId ( `thread-rail-entry-${ root . id } ` ) ;
107128 await expect ( entry ) . toHaveAttribute ( "aria-current" , "page" ) ;
0 commit comments