File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed
Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ body[data-theme='dark'] .bigframes-widget.bigframes-widget {
8181.bigframes-widget .table-container {
8282 background-color : var (--bf-bg );
8383 margin : 0 ;
84- max- height: 620 px ;
84+ height : 400 px ;
8585 overflow : auto;
8686 padding : 0 ;
8787}
Original file line number Diff line number Diff line change @@ -340,6 +340,33 @@ describe('TableWidget', () => {
340340 * Tests that the widget correctly renders HTML with truncated columns (ellipsis)
341341 * and ensures that the ellipsis column is not treated as a sortable column.
342342 */
343+ it ( 'should have a fixed height for the table container' , ( ) => {
344+ // Mock the initial state
345+ model . get . mockImplementation ( ( property ) => {
346+ if ( property === 'table_html' ) {
347+ return '<table>...</table>' ;
348+ }
349+ return null ;
350+ } ) ;
351+
352+ // Load the CSS
353+ const fs = require ( 'fs' ) ;
354+ const path = require ( 'path' ) ;
355+ const css = fs . readFileSync (
356+ path . resolve ( __dirname , '../../bigframes/display/table_widget.css' ) ,
357+ 'utf8' ,
358+ ) ;
359+ const style = document . createElement ( 'style' ) ;
360+ style . textContent = css ;
361+ document . head . appendChild ( style ) ;
362+
363+ render ( { model, el } ) ;
364+
365+ const tableContainer = el . querySelector ( '.table-container' ) ;
366+ const styles = window . getComputedStyle ( tableContainer ) ;
367+ expect ( styles . height ) . toBe ( '400px' ) ;
368+ } ) ;
369+
343370 it ( 'should render truncated columns with ellipsis and not make ellipsis sortable' , ( ) => {
344371 // Mock HTML with truncated columns
345372 // Use the structure produced by the python backend
You can’t perform that action at this time.
0 commit comments