diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-20 13:43:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-20 13:43:29 +0300 |
commit | 3b1af5cc7ed2666ff18b718ce5d30fa5a2756674 (patch) | |
tree | 3bc4a40e0ee51ec27eabf917c537033c0c5b14d4 /storybook/config/preview.js | |
parent | 9bba14be3f2c211bf79e15769cd9b77bc73a13bc (diff) |
Add latest changes from gitlab-org/gitlab@16-1-stable-eev16.1.0-rc42
Diffstat (limited to 'storybook/config/preview.js')
-rw-r--r-- | storybook/config/preview.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/storybook/config/preview.js b/storybook/config/preview.js index 6f3b8190742..fc04623071a 100644 --- a/storybook/config/preview.js +++ b/storybook/config/preview.js @@ -1,7 +1,8 @@ -import { withServer } from 'storybook-mirage'; // eslint-disable-line import/no-unresolved +// Some modules read window.gon on initialization thus we need to define this object before anything else +import './gon'; import Vue from 'vue'; -import { createMockServer } from 'test_helpers/mock_server'; import translateMixin from '~/vue_shared/translate'; +import { initializeGitLabAPIAccess } from './addons/gitlab_api_access/preview'; const stylesheetsRequireCtx = require.context( '../../app/assets/stylesheets', @@ -9,13 +10,10 @@ const stylesheetsRequireCtx = require.context( /(application|application_utilities|highlight\/themes\/white)\.scss$/, ); -window.gon = { - user_color_scheme: 'white', -}; +initializeGitLabAPIAccess(); + translateMixin(Vue); stylesheetsRequireCtx('./application.scss'); stylesheetsRequireCtx('./application_utilities.scss'); stylesheetsRequireCtx('./highlight/themes/white.scss'); - -export const decorators = [withServer(createMockServer)]; |