Add modulePathIgnorePatterns to exclude compiled output directories
(esm/ and lib/) in packages and plugins from being tested by jest.
These directories contain transpiled build artifacts that have issues
with _jsx references in jest.mock() calls.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- ChartRenderer.test.tsx: Remove viz_type from formData to allow vizType
prop to take precedence for suppressContextMenu test, use as unknown
for test data type assertions
- ExploreChartHeader.test.tsx: Fix placeholder text assertion - use
findByDisplayValue instead of findByText since chart has a title
- ExploreViewContainer: Pass exploreState prop to ExploreChartPanel
to match original behavior of spread props
- ExploreChartPanel: Add exploreState to props interface
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add type_generic to Column interface for string column filtering
- Add currency_code_column to DatasourceObject interface for currency
code column selection
- Fix theme possibly undefined errors with optional chaining and
fallback values
- Fix SelectValue type assignments with proper type casts
- Change fontWeightMedium to fontWeightStrong (fontWeightMedium
doesn't exist in theme)
These fixes address TypeScript errors introduced after rebasing on
master which included the Dynamic currency feature.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix ExploreViewContainer type assertions for props passing
- Fix ExploreChartHeader.test.tsx with proper type imports
- Fix logger.test.ts with correct middleware typing
- Fix exploreReducer.ts with proper control state and function parameter types
- Fix test files (getChartDataUri, getChartKey, getExploreUrl, getSimpleSQLExpression)
- Fix HeaderReportDropdown and ReportModal type issues
- Fix useExploreAdditionalActionsMenu menu item literal types
- Update ExploreState interface to match expected types
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix ExploreChartHeader.test.tsx: add missing ChartState properties to test props
- Fix ResultSet/index.tsx: use 'base' for mountExploreUrl, map columns to names
- Fix CopyToClipboardButton.test.tsx: pass data as array instead of object
- Fix ExploreChartPanel/index.tsx: use undefined instead of null, add form_data check,
wrap setControlValue to adapt signature
- Fix ExploreViewContainer/index.tsx: remove unused KeyboardEvent import, fix history
state types, cast form_data for isMatrixifyEnabled
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- DrillDetailPane: Cast datasourceType to DatasourceType enum
- FilterValue: Cast result types to ChartDataResponseResult
- FiltersConfigForm: Cast result types to ChartDataResponseResult
- embedded/utils: Change null to undefined and add QueryFormData cast
- embedded/utils.test: Add any casts for mock resolved values
- saveModalActions: Change null to undefined
- DataTableControl: Fix data prop type to array
- DataTableControls: Filter undefined from formattedTimeColumns
- useResultsPane: Cast ensureIsArray result to QueryResultInterface
- EmbedCodeContent: Use LatestQueryFormData type and guard datasource
- AnnotationLayerControl: Use Payload type and cast parameters
- ViewQueryModal: Cast ensureIsArray result to Result type
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Cast hooks to any to bypass onAddFilter signature mismatch
- Convert null to undefined for queriesData
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use DataRecordFilters for initialValues type
- Fix postTransformProps type to match ChartRenderer
- Fix contextMenuRef type to use RefObject<ChartContextMenuRef>
- Use 'as unknown as' pattern for AnnotationLayer casts in tests
- Fix SUPERSET_WEBSERVER_TIMEOUT cast in test
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change setControlValue type from Function to proper signature
- Use simpler 'as any' cast for thunk dispatch in mock store tests
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use Awaited<ReturnType<...>> for async stub return type
- Fix SupersetClient.post mock implementations with proper type casting
- Use AnnotationSourceType.Native enum instead of string literal
- Add thunk action type assertion for store.dispatch calls
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change initialValues type from object to Record<string, unknown>
- Add declaration for __webpack_require__ webpack global
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Import ContextMenuFilters from @superset-ui/core instead of local interface
- Update handleOnContextMenu to use ContextMenuFilters type
- Import and use FeatureFlagMap for window.featureFlags declaration in tests
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add missing chartRenderingSucceeded method to Actions type in Chart.tsx
to match the ChartActions interface expected by ChartRenderer.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use ChartSource enum instead of string literals in Chart.tsx
- Add proper type casting for mock return types in chartActions.test.ts
- Add missing third argument (undefined) to ThunkAction calls
- Use AnnotationType/SourceType/Style enums instead of string literals
- Add `as unknown as` casting where mock types don't match actual types
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add `as unknown as` casting to mock implementations to satisfy TypeScript's
strict type checking while preserving the original test behavior.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add safety check for empty json.result array in chartAction.ts
- Fix grammar: "active" -> "activate" in ReportModal error message
- Fix error message to be generic: remove "attached to this dashboard"
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add default value `inline = false` for Field component
- Fix onCellChange type from `boolean` to `unknown` in CollectionTable
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add proper type definitions for DatabaseState and QueryResult interfaces
- Fix SpatialControl value type to use proper SpatialType union
- Fix DatabaseSelector and TableSelector db prop types
- Add proper type casts for itemRenderers in CollectionTable
- Remove non-existent props (controlId, canEdit, dbId, inline)
- Add missing sortColumns prop to CollectionTable
- Fix ResultTable props with proper defaults
- Add setCachedChanges to exploreUtils buildV1ChartDataPayload
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix filterField type mismatch in ReportModal reducer - map 'dashboard_id'/'chart_id' to 'dashboard'/'chart' properties
- Fix chartAction.ts type errors: properly type getExploreUrl params, handle null URLs, fix waitForAsyncData types
- Fix SliceUpdatedAction owners type mismatch - handle both number[] and {value, label}[] formats
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- common.ts: wrap return in Boolean() for proper boolean type
- logger.test.ts: add dispatch property to MockStore interface
- exploreReducer.ts: use flexible ExtendedControlState interface, fix SliceUpdatedAction owners type
- ReportModal/actions.ts: use ThunkDispatch for thunk actions, add error handling to addReport
- ReportModal/reducer.ts: cast through unknown for dynamic property access
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use vizType (derived from currentFormData) instead of formData.viz_type
so drill-to-detail props are correctly enabled/disabled when the user
changes visualization type without re-running the query.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move DELETE_REPORT dispatch and success toast from .finally() to .then()
so they only execute on successful deletion, not on failure.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>