@@ -23,7 +23,6 @@ describe('ToolbarItem', () => {
2323 </ ToolbarItem >
2424 ) ;
2525 const bpWrapClass = bp === 'default' ? 'pf-m-wrap' : `pf-m-wrap-on-${ bp } ` ;
26-
2726 expect ( screen . getByTestId ( 'toolbaritem' ) ) . toHaveClass ( bpWrapClass ) ;
2827 } ) ;
2928
@@ -41,17 +40,17 @@ describe('ToolbarItem', () => {
4140
4241 describe ( 'ToolbarItem widths' , ( ) => {
4342 const bps = [ 'default' , 'sm' , 'md' , 'lg' , 'xl' , '2xl' ] ;
44- const sizes = [ 'sm ' , 'md ' , 'lg ' , 'xl' , '2xl' , '3xl' , '4xl '] ;
43+ const widths = [ '100px ' , '3rem ' , '50% ' , '200px ' ] ;
4544
4645 describe . each ( bps ) ( 'widths at various breakpoints' , ( bp ) => {
47- it . each ( sizes ) ( `applies width CSS var when widths is set to %s at ${ bp } ` , ( size ) => {
46+ it . each ( widths ) ( `applies width CSS var when widths is set to %s at ${ bp } ` , ( width ) => {
4847 render (
49- < ToolbarItem data-testid = "toolbaritem" widths = { { [ bp ] : size } } >
48+ < ToolbarItem data-testid = "toolbaritem" widths = { { [ bp ] : width } } >
5049 Test
5150 </ ToolbarItem >
5251 ) ;
5352 const styleAttr = screen . getByTestId ( 'toolbaritem' ) . getAttribute ( 'style' ) || '' ;
54- const cssVarName = `${ ( toolbarItemWidth as any ) . name } ${ bp === 'default' ? '' : `-on-${ bp } ` } ` ;
53+ const cssVarName = `${ toolbarItemWidth . name } ${ bp === 'default' ? '' : `-on-${ bp } ` } ` ;
5554 expect ( styleAttr ) . toContain ( cssVarName ) ;
5655 } ) ;
5756 } ) ;
0 commit comments