rusackas commented on code in PR #41221:
URL: https://github.com/apache/superset/pull/41221#discussion_r3440532126
##########
superset-frontend/packages/superset-ui-chart-controls/test/shared-controls/customControls.test.tsx:
##########
@@ -55,3 +55,27 @@ test('xAxisForceCategoricalControl should not treat temporal
columns as categori
mockCheckColumnType.mockClear();
});
+
+test('xAxisForceCategoricalControl is visible for numeric and temporal
x-axes', () => {
+ const mockCheckColumnType = jest.mocked(checkColumnType);
+ mockCheckColumnType.mockReturnValue(true);
+
+ const controls = {
+ x_axis: { value: 'date_column' },
+ datasource: { datasource: {} },
+ };
+
+ const visible = xAxisForceCategoricalControl.config.visibility!({
+ controls,
+ } as any);
Review Comment:
Good catch — dropped the `as any` and typed these through
`ControlStateMapping`/`ControlPanelState` instead.
--
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]