sadpandajoe commented on code in PR #34809: URL: https://github.com/apache/superset/pull/34809#discussion_r2294742490
########## superset-frontend/spec/helpers/shim.tsx: ########## @@ -92,18 +92,25 @@ jest.mock('@superset-ui/core/components/Icons/AsyncIcon', () => ({ fileName, role, 'aria-label': ariaLabel, + onClick, ...rest }: { fileName: string; - role: string; - 'aria-label': AriaAttributes['aria-label']; - }) => ( - <span - role={role ?? 'img'} - aria-label={ariaLabel || fileName.replace('_', '-')} - {...rest} - /> - ), + role?: string; + 'aria-label'?: AriaAttributes['aria-label']; + onClick?: () => void; + }) => { + // Simple mock that provides the essential attributes for testing + const label = ariaLabel || fileName?.replace(/_/g, '-').toLowerCase() || ''; Review Comment: Nice catch! The onClick wasn't being passed through in the shim mock, and while existing tests check role changes, none actually test that clicking works. Going to update my test to add a quick click there too to catch this in the future. -- 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