Add an `EuiThemeProviderDecorator` to kibanaReact which uses the Storybook globals to set the EUI theme. Add global decorators to the APM and Observability plugins so all stories are wrapped in the `EuiThemeProviderDecorator`, and they don't need to specify it in the stories. Add [jest setup helpers recommended by @storybook/testing-react](https://github.com/storybookjs/testing-react#global-config).
17 lines
559 B
JavaScript
17 lines
559 B
JavaScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
* 2.0.
|
|
*/
|
|
|
|
const path = require('path');
|
|
|
|
module.exports = {
|
|
preset: '@kbn/test',
|
|
rootDir: path.resolve(__dirname, '../../..'),
|
|
roots: ['<rootDir>/x-pack/plugins/apm'],
|
|
setupFiles: ['<rootDir>/x-pack/plugins/apm/.storybook/jest_setup.js'],
|
|
testPathIgnorePatterns: ['<rootDir>/x-pack/plugins/apm/e2e/'],
|
|
};
|