sadpandajoe commented on code in PR #34809: URL: https://github.com/apache/superset/pull/34809#discussion_r2294467584
########## 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: This is why `VizTypeControl.test.tsx` needed to be update. Initially we were just updating the first `_` so we would get something like `first-word_second_word` but now it should all be `first-word-second-word` -- 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