From 73c4eebd3338e5cacd1a55af4ece9a854eb673fe Mon Sep 17 00:00:00 2001 From: Amit Galitzky Date: Wed, 12 Jun 2024 12:51:10 -0700 Subject: [PATCH] updating snapshot and adding null check on associated detectors Signed-off-by: Amit Galitzky --- .../containers/AssociatedDetectors.tsx | 2 +- .../__tests__/__snapshots__/DefineDetector.test.tsx.snap | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/public/components/FeatureAnywhereContextMenu/AssociatedDetectors/containers/AssociatedDetectors.tsx b/public/components/FeatureAnywhereContextMenu/AssociatedDetectors/containers/AssociatedDetectors.tsx index bc0a6891..fb983465 100644 --- a/public/components/FeatureAnywhereContextMenu/AssociatedDetectors/containers/AssociatedDetectors.tsx +++ b/public/components/FeatureAnywhereContextMenu/AssociatedDetectors/containers/AssociatedDetectors.tsx @@ -77,7 +77,7 @@ function AssociatedDetectors({ embeddable, closeFlyout, setMode }) { (state: AppState) => state.ad.errorMessage ); const embeddableTitle = embeddable.getTitle(); - const indexPatternId = embeddable.vis.data.aggs.indexPattern.id; + const indexPatternId = embeddable.vis.data.aggs != null ? embeddable.vis.data.aggs.indexPattern.id : ""; const [dataSourceId, setDataSourceId] = useState(undefined); async function getDataSourceId() { diff --git a/public/pages/DefineDetector/containers/__tests__/__snapshots__/DefineDetector.test.tsx.snap b/public/pages/DefineDetector/containers/__tests__/__snapshots__/DefineDetector.test.tsx.snap index 93f0c0c4..03db2f2e 100644 --- a/public/pages/DefineDetector/containers/__tests__/__snapshots__/DefineDetector.test.tsx.snap +++ b/public/pages/DefineDetector/containers/__tests__/__snapshots__/DefineDetector.test.tsx.snap @@ -528,11 +528,11 @@ exports[` Full creating detector definition renders the compon data-test-subj="comboBoxInput" tabindex="-1" > -

- Find timestamp -

+ timestamp +