File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
superset-frontend/src/features/databases/DatabaseModal Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -219,4 +219,21 @@ describe('ExtraOptions Component', () => {
219219 ) ;
220220 expect ( sqlLabTab ) . toHaveAttribute ( 'aria-expanded' , 'false' ) ;
221221 } ) ;
222+
223+ test ( 'all collapse panels should expand when clicking anywhere on the header' , ( ) => {
224+ renderComponent ( ) ;
225+ const allPanelTabs = screen . getAllByRole ( 'tab' ) ;
226+ expect ( allPanelTabs . length ) . toBeGreaterThanOrEqual ( 4 ) ; // At least 4 main panels
227+
228+ allPanelTabs . forEach ( panelTab => {
229+ // Initially should be collapsed
230+ expect ( panelTab ) . toHaveAttribute ( 'aria-expanded' , 'false' ) ;
231+ // Click on the panel tab (entire header should be clickable)
232+ fireEvent . click ( panelTab ) ;
233+ expect ( panelTab ) . toHaveAttribute ( 'aria-expanded' , 'true' ) ;
234+ fireEvent . click ( panelTab ) ;
235+ // Panel should collapse back
236+ expect ( panelTab ) . toHaveAttribute ( 'aria-expanded' , 'false' ) ;
237+ } ) ;
238+ } ) ;
222239} ) ;
Original file line number Diff line number Diff line change @@ -592,9 +592,9 @@ const ExtraOptions = ({
592592 ? [
593593 {
594594 key : extraExtension ?. title ,
595- collapsible : extraExtension . enabled ?.( )
596- ? ( 'icon' as const )
597- : ( 'disabled' as const ) ,
595+ ... ( extraExtension . enabled ?.( )
596+ ? { }
597+ : { collapsible : 'disabled' as const } ) ,
598598 label : (
599599 < CollapseLabelInModal
600600 key = { extraExtension ?. title }
You can’t perform that action at this time.
0 commit comments