mistercrunch commented on code in PR #34809:
URL: https://github.com/apache/superset/pull/34809#discussion_r2294558207
##########
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:
now that you're de-structuring `onClick`, it's no longer getting
pass-through to the <span /> bellow, is this intentional?
--
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]