File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
superset-frontend/src/features/databases/DatabaseModal Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -220,4 +220,21 @@ describe('ExtraOptions Component', () => {
220220 ) ;
221221 expect ( sqlLabTab ) . toHaveAttribute ( 'aria-expanded' , 'false' ) ;
222222 } ) ;
223+
224+ test ( 'all collapse panels should expand when clicking anywhere on the header' , ( ) => {
225+ renderComponent ( ) ;
226+ const allPanelTabs = screen . getAllByRole ( 'tab' ) ;
227+ expect ( allPanelTabs . length ) . toBeGreaterThanOrEqual ( 4 ) ; // At least 4 main panels
228+
229+ allPanelTabs . forEach ( panelTab => {
230+ // Initially should be collapsed
231+ expect ( panelTab ) . toHaveAttribute ( 'aria-expanded' , 'false' ) ;
232+ // Click on the panel tab (entire header should be clickable)
233+ fireEvent . click ( panelTab ) ;
234+ expect ( panelTab ) . toHaveAttribute ( 'aria-expanded' , 'true' ) ;
235+ fireEvent . click ( panelTab ) ;
236+ // Panel should collapse back
237+ expect ( panelTab ) . toHaveAttribute ( 'aria-expanded' , 'false' ) ;
238+ } ) ;
239+ } ) ;
223240} ) ;
You can’t perform that action at this time.
0 commit comments