File tree Expand file tree Collapse file tree 3 files changed +22
-8
lines changed
src/plugins/embeddable/public
x-pack/plugins/advanced_ui_actions/public Expand file tree Collapse file tree 3 files changed +22
-8
lines changed Original file line number Diff line number Diff line change @@ -68,4 +68,9 @@ export function plugin(initializerContext: PluginInitializerContext) {
6868 return new EmbeddablePublicPlugin ( initializerContext ) ;
6969}
7070
71- export { EmbeddableSetup , EmbeddableStart } from './plugin' ;
71+ export {
72+ EmbeddableSetup ,
73+ EmbeddableStart ,
74+ EmbeddableSetupDependencies ,
75+ EmbeddableStartDependencies ,
76+ } from './plugin' ;
Original file line number Diff line number Diff line change 1616 * specific language governing permissions and limitations
1717 * under the License.
1818 */
19- import { EmbeddableStart , EmbeddableSetup } from '.' ;
19+ import {
20+ EmbeddableStart ,
21+ EmbeddableSetup ,
22+ EmbeddableSetupDependencies ,
23+ EmbeddableStartDependencies ,
24+ } from '.' ;
2025import { EmbeddablePublicPlugin } from './plugin' ;
2126import { coreMock } from '../../../core/public/mocks' ;
2227
@@ -45,14 +50,14 @@ const createStartContract = (): Start => {
4550 return startContract ;
4651} ;
4752
48- const createInstance = ( ) => {
53+ const createInstance = ( setupPlugins : Partial < EmbeddableSetupDependencies > = { } ) => {
4954 const plugin = new EmbeddablePublicPlugin ( { } as any ) ;
5055 const setup = plugin . setup ( coreMock . createSetup ( ) , {
51- uiActions : uiActionsPluginMock . createSetupContract ( ) ,
56+ uiActions : setupPlugins . uiActions || uiActionsPluginMock . createSetupContract ( ) ,
5257 } ) ;
53- const doStart = ( ) =>
58+ const doStart = ( startPlugins : Partial < EmbeddableStartDependencies > = { } ) =>
5459 plugin . start ( coreMock . createStart ( ) , {
55- uiActions : uiActionsPluginMock . createStartContract ( ) ,
60+ uiActions : startPlugins . uiActions || uiActionsPluginMock . createStartContract ( ) ,
5661 inspector : inspectorPluginMock . createStartContract ( ) ,
5762 } ) ;
5863 return {
Original file line number Diff line number Diff line change @@ -38,7 +38,9 @@ const createPlugin = (
3838) => {
3939 const pluginInitializerContext = coreMock . createPluginInitializerContext ( ) ;
4040 const uiActions = uiActionsPluginMock . createPlugin ( ) ;
41- const embeddable = embeddablePluginMock . createInstance ( ) ;
41+ const embeddable = embeddablePluginMock . createInstance ( {
42+ uiActions : uiActions . setup ,
43+ } ) ;
4244 const plugin = pluginInitializer ( pluginInitializerContext ) ;
4345 const setup = plugin . setup ( coreSetup , {
4446 uiActions : uiActions . setup ,
@@ -53,7 +55,9 @@ const createPlugin = (
5355 setup,
5456 doStart : ( anotherCoreStart : CoreStart = coreStart ) => {
5557 const uiActionsStart = uiActions . doStart ( ) ;
56- const embeddableStart = embeddable . doStart ( ) ;
58+ const embeddableStart = embeddable . doStart ( {
59+ uiActions : uiActionsStart ,
60+ } ) ;
5761 return plugin . start ( anotherCoreStart , {
5862 uiActions : uiActionsStart ,
5963 embeddable : embeddableStart ,
You can’t perform that action at this time.
0 commit comments