Skip to content

Commit

Permalink
Reduce storybook changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Heenawter committed Oct 2, 2024
1 parent 8cde390 commit 223fb94
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
1 change: 0 additions & 1 deletion src/plugins/presentation_util/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ module.exports = {
coverageReporters: ['text', 'html'],
collectCoverageFrom: [
'<rootDir>/src/plugins/presentation_util/{common,public,server}/**/*.{ts,tsx}',
'!<rootDir>/**/*.stories.*',
],
};
12 changes: 0 additions & 12 deletions src/plugins/presentation_util/storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,11 @@
*/

import { defaultConfig } from '@kbn/storybook';
import { Options } from '@storybook/core-common';
import path from 'path';
import webpack from 'webpack';

module.exports = {
...defaultConfig,
define: {
global: 'window',
},
stories: ['../../**/*.stories.+(tsx|mdx)'],
webpackFinal: async (config: webpack.Configuration, options: Options) => {
const originalConfig = await defaultConfig.webpackFinal!(config, options);

originalConfig!.resolve!.alias!['../public/services/kibana_services'] = path.resolve(
__dirname,
'../public/services/mock_kibana_services'
);
return originalConfig;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,7 @@ export const servicesContextDecorator = (): DecoratorFn => {
storybook.args.useStaticData = true;
}

// pluginServices.setRegistry(pluginServiceRegistry.start(storybook.args));
// const ContextProvider = pluginServices.getContextProvider();

return (
<I18nProvider>
{story()}
{/* <ContextProvider>{story()}</ContextProvider> */}
</I18nProvider>
);
return <I18nProvider>{story()}</I18nProvider>;
};
};

Expand Down

0 comments on commit 223fb94

Please sign in to comment.