@@ -27,6 +27,8 @@ import { enumOptions } from '@object-ui/test-support';
2727// `React.lazy` factory resolves at once instead of racing the test's wait
2828// window (AGENTS.md, flaky-test discipline).
2929import '@object-ui/plugin-dashboard' ;
30+ // The console registers the chart renderer the series families draw through.
31+ import '@object-ui/plugin-charts' ;
3032
3133vi . mock ( '@object-ui/react' , async ( importOriginal ) => {
3234 const mod = await importOriginal < typeof import ( '@object-ui/react' ) > ( ) ;
@@ -128,8 +130,9 @@ describe('one widget-type registry, derived from the spec (objectstack#26745)',
128130 ) ;
129131 } ) ;
130132
131- it ( 'every offered type renders through the real DashboardRenderer — no placeholder, no red panel' , async ( ) => {
132- const widgets = WIDGET_TYPE_IDS . map ( ( type , i ) => ( {
133+ /** Render one widget per type through the real renderer; the drawn text once every cell is laid out. */
134+ async function renderedText ( types : readonly string [ ] ) : Promise < string > {
135+ const widgets = types . map ( ( type , i ) => ( {
133136 id : `w_${ i } ` ,
134137 type,
135138 title : `Widget ${ type } ` ,
@@ -151,8 +154,17 @@ describe('one widget-type registry, derived from the spec (objectstack#26745)',
151154 const cells = container . querySelectorAll ( '[style*="grid-column"]' ) ;
152155 if ( cells . length !== widgets . length ) throw new Error ( `expected ${ widgets . length } widget cells, saw ${ cells . length } ` ) ;
153156 } ) ;
154- expect ( container . textContent ) . not . toMatch ( / c h a r t t y p e i s n o t s u p p o r t e d y e t / ) ;
155- expect ( container . textContent ) . not . toMatch ( / U n k n o w n c o m p o n e n t t y p e / ) ;
157+ return container . textContent ?? '' ;
158+ }
159+
160+ it ( 'every offered type renders through the real DashboardRenderer — no placeholder, no red panel' , async ( ) => {
161+ const text = await renderedText ( WIDGET_TYPE_IDS ) ;
162+ expect ( text ) . not . toMatch ( / c h a r t t y p e i s n o t s u p p o r t e d y e t / ) ;
163+ expect ( text ) . not . toMatch ( / U n k n o w n c o m p o n e n t t y p e / ) ;
164+ } ) ;
165+
166+ it ( 'control: the same probe sees the placeholder a family with no renderer draws' , async ( ) => {
167+ expect ( await renderedText ( [ 'heatmap' ] ) ) . toMatch ( / c h a r t t y p e i s n o t s u p p o r t e d y e t / ) ;
156168 } ) ;
157169
158170 it ( 'every offered type has its Add-menu name and its Type-select name in en and zh' , ( ) => {
0 commit comments