Skip to content

Commit

Permalink
Add mock of a legacy ui api to re-enable Canvas storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
poffdeluxe committed Feb 3, 2020
1 parent 3601602 commit e332f5d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions x-pack/legacy/plugins/canvas/.storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ module.exports = async ({ config }) => {
'../tasks/mocks/uiNotifyFormatMsg'
);
config.resolve.alias['ui/notify'] = path.resolve(__dirname, '../tasks/mocks/uiNotify');
config.resolve.alias['ui/url/absolute_to_parsed_url'] = path.resolve(__dirname, '../tasks/mocks/uiAbsoluteToParsedUrl');
config.resolve.alias['ui/chrome'] = path.resolve(__dirname, '../tasks/mocks/uiChrome');
config.resolve.alias.ui = path.resolve(KIBANA_ROOT, 'src/legacy/ui/public');
config.resolve.alias.ng_mock$ = path.resolve(KIBANA_ROOT, 'src/test_utils/public/ng_mock');
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

export function absoluteToParsedUrl(absoluteUrl: string, basePath = '') {
return 'parsed-url';
}

0 comments on commit e332f5d

Please sign in to comment.