sadpandajoe opened a new pull request, #35606: URL: https://github.com/apache/superset/pull/35606
## SUMMARY Converts DatasourceEditor test files from JSX to TypeScript as part of the frontend modernization effort to eliminate JavaScript files and improve type safety. **Files converted:** - DatasourceEditor.test.jsx → .tsx - DatasourceEditorCurrency.test.jsx → .tsx - DatasourceEditorRTL.test.tsx → .tsx - mockDatasource.js → .ts **Key improvements:** - Eliminated all `any` types by using proper `DatasetObject` type from existing codebase - Created `DatasourceEditorProps` interface for component props - Derived `MetricType` from dataset metrics array for type-safe assertions - Added missing properties to mockDatasource fixture to satisfy TypeScript - Fixed 2 failing tests by correcting metric row selection (accounting for ID sorting) ## BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A - Test file conversion only ## TESTING INSTRUCTIONS ```bash # Run all DatasourceEditor tests npm test -- src/components/Datasource/components/DatasourceEditor/tests/*.test.tsx --no-coverage # Should show: 32/32 tests passing (100%) ``` ## ADDITIONAL INFORMATION - All pre-commit hooks passing (eslint, type-checking, prettier) - Zero TypeScript `any` types - all properly typed using existing type definitions - Maintained all existing test functionality with enhanced type safety - Test improvements: Added onChange callback verification and async/await consistency -- 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]
