@@ -1069,3 +1069,41 @@ test('#3114 cut 34: a decided meeting whose file is gone reads in the window lan
10691069 off ( )
10701070 }
10711071} )
1072+
1073+ // #3114 cut 35: a meeting still open, deliberating or blocked drew the host id on the Project
1074+ // board. The three ids are keys of their own, the same shape `running` / `stalled` already uses.
1075+ // Only the drawn state is the page's copy: `data-status`, the question and the level stay the
1076+ // host's own, and a status the client cannot name is drawn as it came, never guessed.
1077+ const pendingRecord = ( ) => ( {
1078+ project : { id : 'project-1' , name : 'FlyBot' } , rows, canManage : false , decisions : { dir : '/team/flybot' , files : [ ] } ,
1079+ meetings : {
1080+ decided : [ ] ,
1081+ pending : [
1082+ { id : 'meeting-a' , date : '2026-10-30' , question : 'Which board carries the record?' , status : 'open' , level : 'ordinary' } ,
1083+ { id : 'meeting-b' , date : '2026-10-31' , question : 'Should the board page?' , status : 'deliberating' , level : 'major' } ,
1084+ { id : 'meeting-c' , date : '2026-11-01' , question : 'Which stream carries it?' , status : 'blocked' , level : 'severe' , blockingQuestion : 'Which stream carries it?' } ,
1085+ { id : 'meeting-d' , date : '2026-11-02' , question : 'Which board carries the next record?' , status : 'on-hold' , level : 'ordinary' } ,
1086+ ] , reason : '' ,
1087+ } ,
1088+ } )
1089+ // `.bt-project-status` is drawn once per pending row, so the row is found by its key and the span by its class.
1090+ const pendingRow = id => all ( ProjectBoardPane ( pendingRecord ( ) ) ) . find ( node => node . props ?. key === `meeting:${ id } ` )
1091+ const statusOf = id => textOf ( all ( pendingRow ( id ) ) . find ( node => node . props ?. className === 'bt-project-status' ) )
1092+
1093+ test ( '#3114 cut 35: a meeting still open, deliberating or blocked reads its state in the window language' , ( ) => {
1094+ assert . equal ( statusOf ( 'meeting-c' ) , 'blocked' , 'an English window is unchanged' )
1095+ const off = installLocale ( fakeLocale ( 'zh' ) )
1096+ try {
1097+ assert . equal ( statusOf ( 'meeting-a' ) , '待讨论' , 'an open meeting reads its state in Chinese' )
1098+ assert . equal ( statusOf ( 'meeting-b' ) , '讨论中' , 'a deliberating meeting reads its state in Chinese' )
1099+ assert . equal ( statusOf ( 'meeting-c' ) , '待答复' , 'a blocked meeting reads its state in Chinese' )
1100+ assert . equal ( statusOf ( 'meeting-d' ) , 'on-hold' , 'a status the client cannot name is drawn as it came' )
1101+ const statuses = [ 'meeting-a' , 'meeting-b' , 'meeting-c' , 'meeting-d' ] . map ( id => pendingRow ( id ) . props [ 'data-status' ] )
1102+ assert . deepEqual ( statuses , [ 'open' , 'deliberating' , 'blocked' , 'on-hold' ] , 'the attribute stays the host id' )
1103+ const blocked = pendingRow ( 'meeting-c' )
1104+ assert . match ( textOf ( blocked ) , / W h i c h s t r e a m c a r r i e s i t \? / , 'the host blocking question stays as it came' )
1105+ assert . match ( textOf ( blocked ) , / 严 重 / , 'the level still reads in the window language' )
1106+ } finally {
1107+ off ( )
1108+ }
1109+ } )
0 commit comments