rusackas commented on code in PR #26138: URL: https://github.com/apache/superset/pull/26138#discussion_r1483298339
########## superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx: ########## @@ -350,3 +353,127 @@ test('Should not show the "Edit chart" without proper permissions', () => { }); expect(screen.queryByText('Edit chart')).not.toBeInTheDocument(); }); + +describe('handleDropdownNavigation', () => { + const mockToggleDropdown = jest.fn(); + const mockSetSelectedKeys = jest.fn(); + + const menu = React.createElement( + 'div', + { selectedKeys: ['item1'] }, + React.createElement('div', { key: 'item1' }), + React.createElement('div', { key: 'item2' }), + React.createElement('div', { key: 'item3' }), + ); + + beforeEach(() => { + jest.clearAllMocks(); + }); + + test('should continue with system tab navigation if dropdown is closed and tab key is pressed', () => { + const event = { key: 'Tab', preventDefault: jest.fn() }; + handleDropdownNavigation( + // @ts-ignore Review Comment: Well thanks for fixing... I'm not worried about ts-ignore in tests, so much as the actual application. It's another pile I want to track as tech debt when that dashboard is out in public hands :) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org