Skip to content

Commit

Permalink
Fixed failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
YulNaumenko committed Mar 3, 2020
1 parent 8f01998 commit b27f1da
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
21 changes: 15 additions & 6 deletions x-pack/legacy/plugins/siem/public/legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,24 @@ 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: ((npSetup.plugins as unknown) as {
triggers_actions_ui: TriggersAndActionsUIPublicPluginSetup;
}).triggers_actions_ui,
triggers_actions_ui: setupDependencies.triggers_actions_ui,
});
pluginInstance.start(npStart.core, {
...npStart.plugins,
triggers_actions_ui: ((npStart.plugins as unknown) as {
triggers_actions_ui: TriggersAndActionsUIPublicPluginStart;
}).triggers_actions_ui,
triggers_actions_ui: startDependencies.triggers_actions_ui,
});
2 changes: 2 additions & 0 deletions x-pack/test/functional/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ 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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
await testSubjects.click('thresholdAlertTimeFieldSelect');
const fieldOptions = await find.allByCssSelector('#thresholdTimeField option');
await fieldOptions[1].click();
await nameInput.click();
await nameInput.click();
await testSubjects.click('.slack-ActionTypeSelectOption');
await testSubjects.click('createActionConnectorButton');
const connectorNameInput = await testSubjects.find('nameInput');
Expand Down

0 comments on commit b27f1da

Please sign in to comment.