Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed Feb 6, 2024
1 parent b246b80 commit e9efc49
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,13 @@ class RuleEditorFlyoutUI extends Component {
}

componentDidMount() {
this.toastNotificationService = toastNotificationServiceProvider(
this.props.kibana.services.notifications.toasts
);
if (typeof this.props.setShowFunction === 'function') {
this.props.setShowFunction(this.showFlyout);
if (this.props.kibana.services.notifications) {
this.toastNotificationService = toastNotificationServiceProvider(
this.props.kibana.services.notifications.toasts
);
if (typeof this.props.setShowFunction === 'function') {
this.props.setShowFunction(this.showFlyout);
}
}
}

Expand Down Expand Up @@ -480,7 +482,7 @@ class RuleEditorFlyoutUI extends Component {
};

render() {
const docsUrl = this.props.kibana.services.docLinks.links.ml.customRules;
const docsUrl = this.props.kibana.services.docLinks?.links.ml.customRules;
const {
isFlyoutVisible,
job,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ function getTimeseriesChartPropsMock() {
showModelBounds: true,
svgWidth: 1600,
timefilter: {},
tooltipService: {},
sourceIndicesWithGeoFields: {},
};
}

Expand Down

0 comments on commit e9efc49

Please sign in to comment.