From bf02eaabdfbad4b731fedbd8a1f0191eb58e1ca0 Mon Sep 17 00:00:00 2001 From: Julia Date: Mon, 16 Oct 2023 11:29:49 +0200 Subject: [PATCH] [RAM] default value when have deleted slack connector attached to a rule (#168695) Solves: https://github.com/elastic/kibana/issues/168563 and https://github.com/elastic/kibana/issues/168027 ## Summary Should work like this: https://github.com/elastic/kibana/assets/26089545/10544c51-428a-4d31-af6c-bf1ae7df06d6 But worked like this: https://github.com/elastic/kibana/assets/26089545/9a171bcf-74ce-45be-af68-571a83615165 And warning message under the dropdown was replaced: From: Screenshot 2023-10-09 at 22 04 58 To: Screenshot 2023-10-12 at 14 29 38 - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit cde32938731d7cafd089e4665872609abd25c126) --- .../public/connector_types/slack/slack.tsx | 2 +- .../public/connector_types/slack_api/translations.ts | 2 +- .../action_connector_form/connectors_selection.tsx | 8 ++------ .../apps/triggers_actions_ui/details.ts | 3 +-- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/x-pack/plugins/stack_connectors/public/connector_types/slack/slack.tsx b/x-pack/plugins/stack_connectors/public/connector_types/slack/slack.tsx index 8fe351407ab92..95c35565e27b5 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/slack/slack.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/slack/slack.tsx @@ -39,7 +39,7 @@ export function getConnectorType(): ConnectorTypeModel> => { - let selectedConnector = connectors.find((connector) => connector.id === actionItemId); - if (allowGroupConnector.length > 0 && !selectedConnector) { - selectedConnector = connectors.find((connector) => - allowGroupConnector.includes(connector.actionTypeId) - ); - } + const selectedConnector = connectors.find((connector) => connector.id === actionItemId); + if (!selectedConnector) { return []; } diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details.ts index b2732c064721b..2d5c8a1815214 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details.ts @@ -420,8 +420,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }); }); - // FLAKY: https://github.com/elastic/kibana/issues/168027 - describe.skip('Edit rule with deleted connector', function () { + describe('Edit rule with deleted connector', function () { const testRunUuid = uuidv4(); afterEach(async () => {