diff --git a/x-pack/plugins/apm/public/components/shared/ErrorRateAlertTrigger/index.stories.tsx b/x-pack/plugins/apm/public/components/shared/ErrorRateAlertTrigger/index.stories.tsx
index 8f7ed54f91bd0..ebcb1627984ad 100644
--- a/x-pack/plugins/apm/public/components/shared/ErrorRateAlertTrigger/index.stories.tsx
+++ b/x-pack/plugins/apm/public/components/shared/ErrorRateAlertTrigger/index.stories.tsx
@@ -7,6 +7,11 @@
import { storiesOf } from '@storybook/react';
import React from 'react';
import { ErrorRateAlertTrigger } from '.';
+import { ApmPluginContextValue } from '../../../context/ApmPluginContext';
+import {
+ mockApmPluginContextValue,
+ MockApmPluginContextWrapper,
+} from '../../../context/ApmPluginContext/MockApmPluginContext';
storiesOf('app/ErrorRateAlertTrigger', module).add('example', () => {
const params = {
@@ -15,12 +20,16 @@ storiesOf('app/ErrorRateAlertTrigger', module).add('example', () => {
};
return (
-
- undefined}
- setAlertProperty={() => undefined}
- />
-
+
+
+ undefined}
+ setAlertProperty={() => undefined}
+ />
+
+
);
});
diff --git a/x-pack/plugins/apm/public/components/shared/TransactionDurationAlertTrigger/index.stories.tsx b/x-pack/plugins/apm/public/components/shared/TransactionDurationAlertTrigger/index.stories.tsx
index e2429d1225442..da9adbb8dfead 100644
--- a/x-pack/plugins/apm/public/components/shared/TransactionDurationAlertTrigger/index.stories.tsx
+++ b/x-pack/plugins/apm/public/components/shared/TransactionDurationAlertTrigger/index.stories.tsx
@@ -3,18 +3,24 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
+// import { storiesOf } from '@storybook/react';
import { cloneDeep, merge } from 'lodash';
-import { storiesOf } from '@storybook/react';
import React from 'react';
import { TransactionDurationAlertTrigger } from '.';
+import { ApmPluginContextValue } from '../../../context/ApmPluginContext';
import {
- MockApmPluginContextWrapper,
mockApmPluginContextValue,
+ MockApmPluginContextWrapper,
} from '../../../context/ApmPluginContext/MockApmPluginContext';
import { MockUrlParamsContextProvider } from '../../../context/UrlParamsContext/MockUrlParamsContextProvider';
-import { ApmPluginContextValue } from '../../../context/ApmPluginContext';
-storiesOf('app/TransactionDurationAlertTrigger', module).add('example', () => {
+// Disabling this because we currently don't have a way to mock `useEnvironments`
+// which is used by this component. Using the fetch-mock module should work, but
+// our current storybook setup has core-js-related problems when trying to import
+// it.
+// storiesOf('app/TransactionDurationAlertTrigger', module).add('example',
+// eslint-disable-next-line no-unused-expressions
+() => {
const params = {
threshold: 1500,
aggregationType: 'avg' as const,
@@ -44,4 +50,4 @@ storiesOf('app/TransactionDurationAlertTrigger', module).add('example', () => {
);
-});
+};