eschutho commented on code in PR #26138:
URL: https://github.com/apache/superset/pull/26138#discussion_r1482168142
##########
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:
Oh, it didn't like the type of one of the arguments. I think it was the
event that I mocked. I could try to redo it if you think it would be better.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]