Skip to content

Commit eb689f4

Browse files
committed
Enable APM storybook publishing
Changes to fix APM's Storybook setup were made in #93087 and #93294. This re-enables it and fixes a couple places where we weren't using a theme provider.
1 parent fda67ad commit eb689f4

3 files changed

Lines changed: 27 additions & 19 deletions

File tree

test/scripts/jenkins_storybook.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ node scripts/storybook --dll
77

88
cd "$KIBANA_DIR"
99

10-
# yarn storybook --site apm # TODO re-enable after being fixed
10+
yarn storybook --site apm
1111
yarn storybook --site canvas
1212
yarn storybook --site ci_composite
1313
yarn storybook --site url_template_editor

x-pack/plugins/apm/public/components/alerting/error_count_alert_trigger/index.stories.tsx

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import React from 'react';
99
import { MemoryRouter } from 'react-router-dom';
1010
import { ErrorCountAlertTrigger } from '.';
11+
import { EuiThemeProvider } from '../../../../../../../src/plugins/kibana_react/common';
1112
import { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plugin_context';
1213
import {
1314
mockApmPluginContextValue,
@@ -19,15 +20,19 @@ export default {
1920
component: ErrorCountAlertTrigger,
2021
decorators: [
2122
(Story: React.ComponentClass) => (
22-
<MockApmPluginContextWrapper
23-
value={(mockApmPluginContextValue as unknown) as ApmPluginContextValue}
24-
>
25-
<MemoryRouter>
26-
<div style={{ width: 400 }}>
27-
<Story />
28-
</div>
29-
</MemoryRouter>
30-
</MockApmPluginContextWrapper>
23+
<EuiThemeProvider>
24+
<MockApmPluginContextWrapper
25+
value={
26+
(mockApmPluginContextValue as unknown) as ApmPluginContextValue
27+
}
28+
>
29+
<MemoryRouter>
30+
<div style={{ width: 400 }}>
31+
<Story />
32+
</div>
33+
</MemoryRouter>
34+
</MockApmPluginContextWrapper>
35+
</EuiThemeProvider>
3136
),
3237
],
3338
};

x-pack/plugins/apm/public/components/shared/ApmHeader/apm_header.stories.tsx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { EuiTitle } from '@elastic/eui';
99
import React, { ComponentType } from 'react';
1010
import { MemoryRouter } from 'react-router-dom';
1111
import { HttpSetup } from '../../../../../../../src/core/public';
12+
import { EuiThemeProvider } from '../../../../../../../src/plugins/kibana_react/common';
1213
import { MockApmPluginContextWrapper } from '../../../context/apm_plugin/mock_apm_plugin_context';
1314
import { MockUrlParamsContextProvider } from '../../../context/url_params_context/mock_url_params_context_provider';
1415
import { createCallApmApi } from '../../../services/rest/createCallApmApi';
@@ -22,15 +23,17 @@ export default {
2223
createCallApmApi(({} as unknown) as HttpSetup);
2324

2425
return (
25-
<MockUrlParamsContextProvider
26-
params={{ rangeFrom: 'now-15m', rangeTo: 'now' }}
27-
>
28-
<MockApmPluginContextWrapper>
29-
<MemoryRouter>
30-
<Story />
31-
</MemoryRouter>
32-
</MockApmPluginContextWrapper>
33-
</MockUrlParamsContextProvider>
26+
<EuiThemeProvider>
27+
<MockUrlParamsContextProvider
28+
params={{ rangeFrom: 'now-15m', rangeTo: 'now' }}
29+
>
30+
<MockApmPluginContextWrapper>
31+
<MemoryRouter>
32+
<Story />
33+
</MemoryRouter>
34+
</MockApmPluginContextWrapper>
35+
</MockUrlParamsContextProvider>
36+
</EuiThemeProvider>
3437
);
3538
},
3639
],

0 commit comments

Comments
 (0)