diff --git a/superset-frontend/src/features/alerts/AlertReportModal.test.tsx b/superset-frontend/src/features/alerts/AlertReportModal.test.tsx index 358aa27df..70d01885c 100644 --- a/superset-frontend/src/features/alerts/AlertReportModal.test.tsx +++ b/superset-frontend/src/features/alerts/AlertReportModal.test.tsx @@ -371,12 +371,15 @@ test('disables condition threshold if not null condition is selected', async () userEvent.click(screen.getByTestId('alert-condition-panel')); await screen.findByText(/smaller than/i); const condition = screen.getByRole('combobox', { name: /condition/i }); + const spinButton = screen.getByRole('spinbutton'); + expect(spinButton).toHaveValue(10); await comboboxSelect( condition, 'not null', () => screen.getAllByText(/not null/i)[0], ); - expect(screen.getByRole('spinbutton')).toBeDisabled(); + expect(spinButton).toHaveValue(null); + expect(spinButton).toBeDisabled(); }); // Content Section diff --git a/superset-frontend/src/features/alerts/AlertReportModal.tsx b/superset-frontend/src/features/alerts/AlertReportModal.tsx index 6de43fae6..2a9a9f438 100644 --- a/superset-frontend/src/features/alerts/AlertReportModal.tsx +++ b/superset-frontend/src/features/alerts/AlertReportModal.tsx @@ -1410,7 +1410,8 @@ const AlertReportModal: FunctionComponent = ({
- {t('Value')} * + {t('Value')}{' '} + {!conditionNotNull && *}
= ({ disabled={conditionNotNull} value={ currentAlert?.validator_config_json?.threshold !== - undefined + undefined && !conditionNotNull ? currentAlert.validator_config_json.threshold : '' }