From a3037750405cae6af919bfab666b309d25d01716 Mon Sep 17 00:00:00 2001 From: Yuliia Naumenko Date: Wed, 4 Mar 2020 18:11:24 -0800 Subject: [PATCH] Fixed failing tests --- x-pack/legacy/plugins/siem/index.ts | 2 +- x-pack/legacy/plugins/siem/public/legacy.ts | 27 ++----------------- .../pages/overview/overview_empty/index.tsx | 1 + x-pack/legacy/plugins/siem/public/plugin.tsx | 6 ----- .../common/config.ts | 2 -- x-pack/test/functional/config.js | 2 -- x-pack/test/licensing_plugin/config.ts | 2 -- x-pack/test/plugin_api_integration/config.js | 2 -- 8 files changed, 4 insertions(+), 40 deletions(-) diff --git a/x-pack/legacy/plugins/siem/index.ts b/x-pack/legacy/plugins/siem/index.ts index 3773283555b32..db398821aecfd 100644 --- a/x-pack/legacy/plugins/siem/index.ts +++ b/x-pack/legacy/plugins/siem/index.ts @@ -40,7 +40,7 @@ export const siem = (kibana: any) => { id: APP_ID, configPrefix: 'xpack.siem', publicDir: resolve(__dirname, 'public'), - require: ['kibana', 'elasticsearch', 'alerting', 'actions', 'triggers_actions_ui'], + require: ['kibana', 'elasticsearch', 'alerting', 'actions'], uiExports: { app: { description: i18n.translate('xpack.siem.securityDescription', { diff --git a/x-pack/legacy/plugins/siem/public/legacy.ts b/x-pack/legacy/plugins/siem/public/legacy.ts index 9e64b54f17f21..49a03c93120d4 100644 --- a/x-pack/legacy/plugins/siem/public/legacy.ts +++ b/x-pack/legacy/plugins/siem/public/legacy.ts @@ -6,33 +6,10 @@ import { npSetup, npStart } from 'ui/new_platform'; -import { - TriggersAndActionsUIPublicPluginSetup, - TriggersAndActionsUIPublicPluginStart, -} from '../../../../plugins/triggers_actions_ui/public'; import { PluginInitializerContext } from '../../../../../src/core/public'; import { plugin } from './'; const pluginInstance = plugin({} as PluginInitializerContext); -type PluginsSetupExtended = typeof npSetup.plugins & { - // adds plugins which aren't in the PluginsSetup interface, but do exist - triggers_actions_ui: TriggersAndActionsUIPublicPluginSetup; -}; - -type PluginsStartExtended = typeof npStart.plugins & { - // adds plugins which aren't in the PluginsSetup interface, but do exist - triggers_actions_ui: TriggersAndActionsUIPublicPluginStart; -}; - -const setupDependencies = npSetup.plugins as PluginsSetupExtended; -const startDependencies = npStart.plugins as PluginsStartExtended; - -pluginInstance.setup(npSetup.core, { - ...npSetup.plugins, - triggers_actions_ui: setupDependencies.triggers_actions_ui, -}); -pluginInstance.start(npStart.core, { - ...npStart.plugins, - triggers_actions_ui: startDependencies.triggers_actions_ui, -}); +pluginInstance.setup(npSetup.core, npSetup.plugins); +pluginInstance.start(npStart.core, npStart.plugins); diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/overview_empty/index.tsx b/x-pack/legacy/plugins/siem/public/pages/overview/overview_empty/index.tsx index c6bdf592cccea..1325826f172c7 100644 --- a/x-pack/legacy/plugins/siem/public/pages/overview/overview_empty/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/overview/overview_empty/index.tsx @@ -5,6 +5,7 @@ */ import React from 'react'; + import * as i18nCommon from '../../common/translations'; import { EmptyPage } from '../../../components/empty_page'; import { useKibana } from '../../../lib/kibana'; diff --git a/x-pack/legacy/plugins/siem/public/plugin.tsx b/x-pack/legacy/plugins/siem/public/plugin.tsx index ad9d535f9b3f1..8be5510cda83a 100644 --- a/x-pack/legacy/plugins/siem/public/plugin.tsx +++ b/x-pack/legacy/plugins/siem/public/plugin.tsx @@ -18,10 +18,6 @@ import { Start as NewsfeedStart } from '../../../../../src/plugins/newsfeed/publ import { Start as InspectorStart } from '../../../../../src/plugins/inspector/public'; import { UiActionsStart } from '../../../../../src/plugins/ui_actions/public'; import { UsageCollectionSetup } from '../../../../../src/plugins/usage_collection/public'; -import { - TriggersAndActionsUIPublicPluginSetup, - TriggersAndActionsUIPublicPluginStart, -} from '../../../../plugins/triggers_actions_ui/public'; import { initTelemetry } from './lib/telemetry'; import { KibanaServices } from './lib/kibana'; @@ -30,7 +26,6 @@ export { AppMountParameters, CoreSetup, CoreStart, PluginInitializerContext }; export interface SetupPlugins { home: HomePublicPluginSetup; usageCollection: UsageCollectionSetup; - triggers_actions_ui: TriggersAndActionsUIPublicPluginSetup; } export interface StartPlugins { data: DataPublicPluginStart; @@ -38,7 +33,6 @@ export interface StartPlugins { inspector: InspectorStart; newsfeed?: NewsfeedStart; uiActions: UiActionsStart; - triggers_actions_ui: TriggersAndActionsUIPublicPluginStart; } export type StartServices = CoreStart & StartPlugins; diff --git a/x-pack/test/detection_engine_api_integration/common/config.ts b/x-pack/test/detection_engine_api_integration/common/config.ts index 1db424898cea3..d2bfeeb6433d3 100644 --- a/x-pack/test/detection_engine_api_integration/common/config.ts +++ b/x-pack/test/detection_engine_api_integration/common/config.ts @@ -75,8 +75,6 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions) `--xpack.actions.enabledActionTypes=${JSON.stringify(enabledActionTypes)}`, '--xpack.alerting.enabled=true', '--xpack.eventLog.logEntries=true', - '--xpack.triggers_actions_ui.enabled=true', - '--xpack.triggers_actions_ui.createAlertUiEnabled=true', ...disabledPlugins.map(key => `--xpack.${key}.enabled=false`), `--plugin-path=${path.join(__dirname, 'fixtures', 'plugins', 'alerts')}`, `--plugin-path=${path.join(__dirname, 'fixtures', 'plugins', 'actions')}`, diff --git a/x-pack/test/functional/config.js b/x-pack/test/functional/config.js index 968ffdc064bc4..b589451c76165 100644 --- a/x-pack/test/functional/config.js +++ b/x-pack/test/functional/config.js @@ -88,8 +88,6 @@ export default async function({ readConfigFile }) { '--telemetry.banner=false', '--timelion.ui.enabled=true', '--xpack.endpoint.enabled=true', - '--xpack.triggers_actions_ui.enabled=true', - '--xpack.triggers_actions_ui.createAlertUiEnabled=true', ], }, uiSettings: { diff --git a/x-pack/test/licensing_plugin/config.ts b/x-pack/test/licensing_plugin/config.ts index 829cfe294b753..60d44cbd4c47f 100644 --- a/x-pack/test/licensing_plugin/config.ts +++ b/x-pack/test/licensing_plugin/config.ts @@ -44,8 +44,6 @@ export default async function({ readConfigFile }: FtrConfigProviderContext) { serverArgs: [ ...functionalTestsConfig.get('kbnTestServer.serverArgs'), '--xpack.licensing.api_polling_frequency=100', - '--xpack.triggers_actions_ui.enabled=true', - '--xpack.triggers_actions_ui.createAlertUiEnabled=true', ], }, diff --git a/x-pack/test/plugin_api_integration/config.js b/x-pack/test/plugin_api_integration/config.js index 8b5381568570a..830933278f2bc 100644 --- a/x-pack/test/plugin_api_integration/config.js +++ b/x-pack/test/plugin_api_integration/config.js @@ -37,8 +37,6 @@ export default async function({ readConfigFile }) { ...integrationConfig.get('kbnTestServer'), serverArgs: [ ...integrationConfig.get('kbnTestServer.serverArgs'), - '--xpack.triggers_actions_ui.enabled=true', - '--xpack.triggers_actions_ui.createAlertUiEnabled=true', ...plugins.map( pluginDir => `--plugin-path=${path.resolve(__dirname, 'plugins', pluginDir)}` ),