kibana/x-pack/plugins/ml/public/mocks.ts
Vadim Kibana 708e235457
Redirect endpoint compression (#111471)
* add ability to lz-encode redirect url params

* move redirect param utils to /common

* improve error message

* add getRedirectUrl() to locators

* wire in version into locator redirect method

* make redirect url default to compressed

* fix typescript errors

* pass throuh initialization context to share plugin

* fix test mocks

* improve locators mocks usage

* fix typescript types

* use getRedirectUrl in example plugin

* make redirect url options optional

* add locator tests

* deprecate geturl

* load redirect app UI on demand
2021-09-16 18:45:24 +02:00

26 lines
729 B
TypeScript

/*
* 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.
*/
import { MlPluginSetup, MlPluginStart } from './plugin';
import { sharePluginMock } from '../../../../src/plugins/share/public/mocks';
const createSetupContract = (): jest.Mocked<MlPluginSetup> => {
return {
locator: sharePluginMock.createLocator(),
};
};
const createStartContract = (): jest.Mocked<MlPluginStart> => {
return {
locator: sharePluginMock.createLocator(),
};
};
export const mlPluginMock = {
createSetupContract,
createStartContract,
};