* Changed alerting API endpoints urls, bodies and params to follow Kibana STYLEGUIDE * Changed alerting REST API to keep the pattern 'alerts/alert/{id}' * fixed tests * fixed tests * Fixed jest tests * Renamed plugin from alerting to alerts * fixed tests * fixed tests * Fixed alert type check error * Fixed find api * fixed type checks * fixed tests security issues * Fixed view in app * - Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
25 lines
730 B
TypeScript
25 lines
730 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;
|
|
* you may not use this file except in compliance with the Elastic License.
|
|
*/
|
|
|
|
import { AlertingPublicPlugin } from './plugin';
|
|
|
|
export type Setup = jest.Mocked<ReturnType<AlertingPublicPlugin['setup']>>;
|
|
export type Start = jest.Mocked<ReturnType<AlertingPublicPlugin['start']>>;
|
|
|
|
const createSetupContract = (): Setup => ({
|
|
registerNavigation: jest.fn(),
|
|
registerDefaultNavigation: jest.fn(),
|
|
});
|
|
|
|
const createStartContract = (): Start => ({
|
|
getNavigation: jest.fn(),
|
|
});
|
|
|
|
export const alertingPluginMock = {
|
|
createSetupContract,
|
|
createStartContract,
|
|
};
|