Skip to content

Commit

Permalink
test fixed
Browse files Browse the repository at this point in the history
Signed-off-by: Riya Saxena <[email protected]>
  • Loading branch information
riysaxen-amzn committed Jun 4, 2024
1 parent df5a7f0 commit 3c5c2e4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export default class CreateMonitor extends Component {
this.setState({
initialValues: {
...this.state.initialValues,
dataSourceId: this.props.dataSourceId
dataSourceId: this.props.landingDataSourceId
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ exports[`CreateMonitor renders 1`] = `
}
>
<Formik
enableReinitialize={true}
initialValues={
Object {
"adResultIndex": undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
} from '../../../components/MonitorExpressions/expressions/utils/constants';
import { MONITOR_TYPE } from '../../../../../utils/constants';
import { SUPPORTED_DOC_LEVEL_QUERY_OPERATORS } from '../../../components/DocumentLevelMonitorQueries/utils/constants';
import { dataSourceEnabled } from '../../../../utils/helpers';

export const BUCKET_COUNT = 5;

Expand Down Expand Up @@ -78,9 +79,12 @@ export const FORMIK_INITIAL_VALUES = {
associatedMonitorsList: [],
associatedMonitorsEditor: '',
preventVisualEditor: false,
dataSourceId: ''
};

if (dataSourceEnabled()) {
FORMIK_INITIAL_VALUES["dataSourceId"] = "random-dataSourceId";
}

export const FORMIK_INITIAL_AGG_VALUES = {
aggregationType: 'count',
fieldName: '',
Expand Down

0 comments on commit 3c5c2e4

Please sign in to comment.