@@ -2,18 +2,21 @@ import { mkdir } from "node:fs/promises";
22import path from "node:path" ;
33import { expect , it } from "vitest" ;
44import {
5+ controlUiBundledGatewayUrl ,
56 controlUiSessionUrl ,
67 installMockGateway ,
78 waitForControlUiRoute ,
89} from "../test-helpers/control-ui-e2e.ts" ;
910import { createControlUiE2eSuite } from "./control-ui-e2e-suite.test-support.ts" ;
11+ import { readThemedPopupPaint } from "./popup-theme.test-support.ts" ;
1012
1113const suite = createControlUiE2eSuite ( {
1214 name : "Control UI session activity feed capture" ,
1315 startServerBeforeBrowser : true ,
1416} ) ;
1517
1618const outputDir = path . resolve ( process . cwd ( ) , ".artifacts/control-ui-e2e/session-activity-feed" ) ;
19+ const proofPhase = process . env . OPENCLAW_MENU_THEME_PROOF_PHASE ;
1720
1821suite . define ( ( ) => {
1922 it ( "captures online, global activity, and person-filtered activity surfaces" , async ( ) => {
@@ -342,6 +345,18 @@ suite.define(() => {
342345 path : path . join ( outputDir , "04-sidebar-online-user-expanded-dark.png" ) ,
343346 } ) ;
344347
348+ await page . evaluate (
349+ ( { gatewayUrl } ) => {
350+ localStorage . setItem (
351+ `openclaw.control.settings.v1:${ gatewayUrl } ` ,
352+ JSON . stringify ( { gatewayUrl, theme : "dash" , themeMode : "dark" } ) ,
353+ ) ;
354+ } ,
355+ { gatewayUrl : controlUiBundledGatewayUrl ( suite . server . baseUrl ) } ,
356+ ) ;
357+ await page . reload ( ) ;
358+ await expect . poll ( ( ) => page . locator ( "html" ) . getAttribute ( "data-theme" ) ) . toBe ( "dash" ) ;
359+
345360 await page . evaluate ( ( ) => {
346361 const app = document . querySelector ( "openclaw-app" ) as HTMLElement & {
347362 runtime ?: { context : { navigate : ( routeId : string ) => void } } ;
@@ -368,6 +383,15 @@ suite.define(() => {
368383 . count ( ) ,
369384 )
370385 . toBe ( 3 ) ;
386+ const peoplePopover = activityPage . locator ( "wa-popover.activity-feed__people-popover" ) ;
387+ const peoplePaint = await readThemedPopupPaint ( peoplePopover , "body" ) ;
388+ if ( proofPhase ) {
389+ await page . screenshot ( {
390+ animations : "disabled" ,
391+ path : path . join ( outputDir , `05-people-menu-${ proofPhase } .png` ) ,
392+ } ) ;
393+ }
394+ expect ( peoplePaint . actual ) . toEqual ( peoplePaint . expected ) ;
371395 await page . keyboard . press ( "Escape" ) ;
372396 const activityFeed = activityPage . locator ( ".activity-feed" ) ;
373397 const activitySession = ( key : string ) =>
0 commit comments