diff --git a/src/core/test/scout/.meta/api/standard.json b/src/core/test/scout/.meta/api/standard.json index 3c11f56e9faf2..f89018c50e904 100644 --- a/src/core/test/scout/.meta/api/standard.json +++ b/src/core/test/scout/.meta/api/standard.json @@ -1,5 +1,5 @@ { - "sha1": "2b70f3fcb59bf151aebaba39638cabf81e58deca", + "sha1": "67a81345ddcbff97602a970df9c912ec77780659", "tests": [ { "id": "686afb1e43c1702-93eb078795ca679", @@ -325,6 +325,32 @@ "column": 10 } }, + { + "id": "6054c2de485a042-eec0454c4331f2c", + "title": "translations serves a non-default locale file with the locale field intact", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic", + "@local-stateful-search", + "@cloud-stateful-search", + "@local-stateful-observability_complete", + "@cloud-stateful-observability_complete", + "@local-stateful-security_complete", + "@cloud-stateful-security_complete", + "@local-serverless-search", + "@cloud-serverless-search", + "@local-serverless-observability_complete", + "@cloud-serverless-observability_complete", + "@local-serverless-security_complete", + "@cloud-serverless-security_complete" + ], + "location": { + "file": "src/core/test/scout/api/tests/translations.spec.ts", + "line": 45, + "column": 10 + } + }, { "id": "6054c2de485a042-7c1b7d0f5a752d1", "title": "translations returns a 404 when not using the correct locale", @@ -347,7 +373,7 @@ ], "location": { "file": "src/core/test/scout/api/tests/translations.spec.ts", - "line": 45, + "line": 71, "column": 10 } }, diff --git a/src/platform/packages/shared/kbn-scout/src/servers/configs/config_sets/default/stateful/base.config.ts b/src/platform/packages/shared/kbn-scout/src/servers/configs/config_sets/default/stateful/base.config.ts index 3c147272d009f..cc3d724146353 100644 --- a/src/platform/packages/shared/kbn-scout/src/servers/configs/config_sets/default/stateful/base.config.ts +++ b/src/platform/packages/shared/kbn-scout/src/servers/configs/config_sets/default/stateful/base.config.ts @@ -178,6 +178,14 @@ export const defaultConfig: ScoutServerConfig = { '--xpack.security.encryptionKey="wuGNaIhoMpk5sO4UBxgr3NyW1sFcLgIf"', // server restarts should not invalidate active sessions '--xpack.encryptedSavedObjects.encryptionKey="DkdXazszSCYexXqz4YktBGHCRkV6hyNK"', '--xpack.discoverEnhanced.actions.exploreDataInContextMenu.enabled=true', + `--xpack.actions.preconfigured=${JSON.stringify({ + 'my-server-log': { actionTypeId: '.server-log', name: 'Serverlog' }, + 'my-email-connector': { + actionTypeId: '.email', + name: 'Email#test-preconfigured-email', + config: { from: 'me@example.com', host: 'localhost', port: '1025' }, + }, + })}`, '--savedObjects.maxImportPayloadBytes=10485760', // for OSS test management/_import_objects, '--savedObjects.allowHttpApiAccess=false', // override default to not allow hiddenFromHttpApis saved objects access to the http APIs see https://github.com/elastic/dev/issues/2200 // explicitly disable internal API restriction. See https://github.com/elastic/kibana/issues/163654 diff --git a/src/platform/plugins/shared/data_view_editor/test/scout/.meta/ui/standard.json b/src/platform/plugins/shared/data_view_editor/test/scout/.meta/ui/standard.json new file mode 100644 index 0000000000000..d3f68eea4c9b8 --- /dev/null +++ b/src/platform/plugins/shared/data_view_editor/test/scout/.meta/ui/standard.json @@ -0,0 +1,19 @@ +{ + "sha1": "f837afe9443012a45a6eb6ac3d5f4f0117c0aa1f", + "tests": [ + { + "id": "a86ab1ab968d807-0bb82867e148f1f", + "title": "Create Data View wizard data stream is accepted as an index pattern source and wizard auto-detects the timestamp field", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "src/platform/plugins/shared/data_view_editor/test/scout/ui/tests/create_data_view_wizard.spec.ts", + "line": 41, + "column": 7 + } + } + ] +} \ No newline at end of file diff --git a/src/platform/plugins/shared/data_view_management/test/scout/.meta/ui/standard.json b/src/platform/plugins/shared/data_view_management/test/scout/.meta/ui/standard.json index 39879a753c662..e02499c8bfab5 100644 --- a/src/platform/plugins/shared/data_view_management/test/scout/.meta/ui/standard.json +++ b/src/platform/plugins/shared/data_view_management/test/scout/.meta/ui/standard.json @@ -1,5 +1,5 @@ { - "sha1": "4d6b16666a495f40bc282f255d398cd3d0726717", + "sha1": "e62501d0bfed5ec7e2269cc6b3f211a9fa39dde2", "tests": [ { "id": "be66c17a1888746-11e36bad76c85ff", diff --git a/src/platform/plugins/shared/management/test/scout/.meta/ui/parallel.json b/src/platform/plugins/shared/management/test/scout/.meta/ui/parallel.json new file mode 100644 index 0000000000000..2c27a980ae499 --- /dev/null +++ b/src/platform/plugins/shared/management/test/scout/.meta/ui/parallel.json @@ -0,0 +1,131 @@ +{ + "sha1": "58e19537834d84b3c9527c8f60accc9b5cda7eba", + "tests": [ + { + "id": "a85e30db18dd980-231d31d916345e0", + "title": "Stack Management — data section transform_user sees only transform in the data section", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "src/platform/plugins/shared/management/test/scout/ui/parallel_tests/data_section.spec.ts", + "line": 17, + "column": 7 + } + }, + { + "id": "a85e30db18dd980-062ac9da8baab63", + "title": "Stack Management — data section manage_ilm sees index_lifecycle_management in the data section", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "src/platform/plugins/shared/management/test/scout/ui/parallel_tests/data_section.spec.ts", + "line": 42, + "column": 7 + } + }, + { + "id": "a85e30db18dd980-1b731d7876730e0", + "title": "Stack Management — data section ccr_user sees cross_cluster_replication and the full cluster:manage data section", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "src/platform/plugins/shared/management/test/scout/ui/parallel_tests/data_section.spec.ts", + "line": 67, + "column": 7 + } + }, + { + "id": "a85e30db18dd980-94855b8ec67dddd", + "title": "Stack Management — data section index_management_user sees index_management and transform in the data section", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "src/platform/plugins/shared/management/test/scout/ui/parallel_tests/data_section.spec.ts", + "line": 108, + "column": 7 + } + }, + { + "id": "d9da0a72c35da72-c5a20c77cc86c74", + "title": "Stack Management — nav link access kibana_admin sees the nav link and only Kibana-privilege-driven sections", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "src/platform/plugins/shared/management/test/scout/ui/parallel_tests/nav_access.spec.ts", + "line": 18, + "column": 7 + } + }, + { + "id": "d9da0a72c35da72-b8fa2a8c07ef16c", + "title": "Stack Management — nav link access no management privileges — Stack Management nav link is absent and app is inaccessible", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "src/platform/plugins/shared/management/test/scout/ui/parallel_tests/nav_access.spec.ts", + "line": 63, + "column": 7 + } + }, + { + "id": "bad08ef0cbf2e37-6fecfa373f1b9b3", + "title": "Stack Management — ingest, security, and stack sections logstash_read_user sees only the ingest section with pipelines", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "src/platform/plugins/shared/management/test/scout/ui/parallel_tests/other_sections.spec.ts", + "line": 20, + "column": 9 + } + }, + { + "id": "bad08ef0cbf2e37-dd7cc6062509486", + "title": "Stack Management — ingest, security, and stack sections manage_security sees only the security section with all four links", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "src/platform/plugins/shared/management/test/scout/ui/parallel_tests/other_sections.spec.ts", + "line": 46, + "column": 9 + } + }, + { + "id": "bad08ef0cbf2e37-d579dbac266af75", + "title": "Stack Management — ingest, security, and stack sections cluster:manage surfaces ingest, data (incl. remote_clusters) and stack (license_management) sections", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "src/platform/plugins/shared/management/test/scout/ui/parallel_tests/other_sections.spec.ts", + "line": 71, + "column": 9 + } + } + ] +} \ No newline at end of file diff --git a/src/platform/plugins/shared/management/test/scout/.meta/ui/standard.json b/src/platform/plugins/shared/management/test/scout/.meta/ui/standard.json new file mode 100644 index 0000000000000..7567c17b9b20a --- /dev/null +++ b/src/platform/plugins/shared/management/test/scout/.meta/ui/standard.json @@ -0,0 +1,4 @@ +{ + "sha1": "58e19537834d84b3c9527c8f60accc9b5cda7eba", + "tests": [] +} \ No newline at end of file diff --git a/x-pack/platform/plugins/private/cross_cluster_replication/test/scout/.meta/ui/standard.json b/x-pack/platform/plugins/private/cross_cluster_replication/test/scout/.meta/ui/standard.json new file mode 100644 index 0000000000000..6d8f022c13194 --- /dev/null +++ b/x-pack/platform/plugins/private/cross_cluster_replication/test/scout/.meta/ui/standard.json @@ -0,0 +1,19 @@ +{ + "sha1": "2df8d3c27effa34a2dcfeb34293edab933334979", + "tests": [ + { + "id": "70a0a35dd08286e-9bea428d7c47a33", + "title": "Cross-Cluster Replication shows both tabs and their primary action buttons for a user with CCR privileges", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/private/cross_cluster_replication/test/scout/ui/tests/cross_cluster_replication_home.spec.ts", + "line": 15, + "column": 7 + } + } + ] +} \ No newline at end of file diff --git a/x-pack/platform/plugins/private/index_lifecycle_management/test/scout/.meta/ui/standard.json b/x-pack/platform/plugins/private/index_lifecycle_management/test/scout/.meta/ui/standard.json new file mode 100644 index 0000000000000..70b029d4036c2 --- /dev/null +++ b/x-pack/platform/plugins/private/index_lifecycle_management/test/scout/.meta/ui/standard.json @@ -0,0 +1,61 @@ +{ + "sha1": "1b30e48fbdea3549ceb0db11b15adeeb9027a182", + "tests": [ + { + "id": "f87a8d4bdab7457-3168ea966d63c88", + "title": "Index Lifecycle Policies — duplicate managed policy cloning a managed policy does not propagate the managed flag", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/private/index_lifecycle_management/test/scout/ui/tests/ilm_duplicate_managed_policy.spec.ts", + "line": 37, + "column": 9 + } + }, + { + "id": "fb0e1ea51235d33-3c3b02969d65b50", + "title": "Index Lifecycle Policies shows the header and Create policy button for a user with manage_ilm", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/private/index_lifecycle_management/test/scout/ui/tests/ilm_home_page.spec.ts", + "line": 27, + "column": 7 + } + }, + { + "id": "fb0e1ea51235d33-49f92c6fa89a868", + "title": "Index Lifecycle Policies creates a multi-phase policy and shows it in the list", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/private/index_lifecycle_management/test/scout/ui/tests/ilm_home_page.spec.ts", + "line": 46, + "column": 7 + } + }, + { + "id": "68742dbc8178524-22674b0ddcf0325", + "title": "Index Lifecycle Policies — read-only view read_ilm user sees the policy list but cannot create policies and can open the flyout", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/private/index_lifecycle_management/test/scout/ui/tests/ilm_read_only_view.spec.ts", + "line": 27, + "column": 7 + } + } + ] +} \ No newline at end of file diff --git a/x-pack/platform/plugins/shared/agent_builder/test/scout_agent_builder/.meta/api/standard.json b/x-pack/platform/plugins/shared/agent_builder/test/scout_agent_builder/.meta/api/standard.json index 34513cbede2f9..bb3c25f75348c 100644 --- a/x-pack/platform/plugins/shared/agent_builder/test/scout_agent_builder/.meta/api/standard.json +++ b/x-pack/platform/plugins/shared/agent_builder/test/scout_agent_builder/.meta/api/standard.json @@ -1,5 +1,5 @@ { - "sha1": "71ba3fa688e7fbaaf8d43d40df826a2fc1807b2f", + "sha1": "5fd87a4964315c7d707ff5132e19a12eb6b4eb80", "tests": [ { "id": "23fa02f46a56f43-4512d1a251a937e", diff --git a/x-pack/platform/plugins/shared/agent_builder/test/scout_agent_builder/.meta/ui/standard.json b/x-pack/platform/plugins/shared/agent_builder/test/scout_agent_builder/.meta/ui/standard.json index 3d51bcda7c63c..79e82c51520d8 100644 --- a/x-pack/platform/plugins/shared/agent_builder/test/scout_agent_builder/.meta/ui/standard.json +++ b/x-pack/platform/plugins/shared/agent_builder/test/scout_agent_builder/.meta/ui/standard.json @@ -1,5 +1,5 @@ { - "sha1": "6d66784e2ee99af2ceb26068bf4cff68fcb24b60", + "sha1": "cd71e4fd5dbf06d8e063c8311f702f0db9596db3", "tests": [ { "id": "bc04b6d7b9795d6-a575d75181b677a", diff --git a/x-pack/platform/plugins/shared/index_management/test/scout/.meta/ui/standard.json b/x-pack/platform/plugins/shared/index_management/test/scout/.meta/ui/standard.json index 4d234fc4d1a68..7163aa544ba02 100644 --- a/x-pack/platform/plugins/shared/index_management/test/scout/.meta/ui/standard.json +++ b/x-pack/platform/plugins/shared/index_management/test/scout/.meta/ui/standard.json @@ -1,5 +1,5 @@ { - "sha1": "d9178629ffe494abb7bfc638dff00db4a4f6bf03", + "sha1": "1f64f92def0d9b9bad1301449ea6972489da50e1", "tests": [ { "id": "e7ca8c886a58426-d57f60fe1d6db3b", @@ -196,6 +196,20 @@ "line": 25, "column": 7 } + }, + { + "id": "334b2c159a85a53-5c9af8158963588", + "title": "Index Management — management sidebar smoke data section contains index_management and transform for index_management_user role", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/index_management/test/scout/ui/tests/management_sidebar_smoke.spec.ts", + "line": 32, + "column": 7 + } } ] } \ No newline at end of file diff --git a/x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/.meta/ui/standard.json b/x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/.meta/ui/standard.json index afee8faf570a3..33c1cdae18ee1 100644 --- a/x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/.meta/ui/standard.json +++ b/x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/.meta/ui/standard.json @@ -1,6 +1,272 @@ { - "sha1": "09149f5dafff317839f3b76f6b4edb982e766397", + "sha1": "c5e02f2db86b00d846aa8b50a9b3e65f335799b6", "tests": [ + { + "id": "7f4d24df5ef863e-6b9d865caafbc3b", + "title": "Alert create flyout should delete the right action when the same action has been added twice", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/alert_create_flyout.spec.ts", + "line": 156, + "column": 7 + } + }, + { + "id": "7f4d24df5ef863e-00f2bcd3cc24c5c", + "title": "Alert create flyout should create an alert", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/alert_create_flyout.spec.ts", + "line": 204, + "column": 7 + } + }, + { + "id": "7f4d24df5ef863e-af5965fcd8fdaf6", + "title": "Alert create flyout should create an alert with composite query in filter for conditional action", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/alert_create_flyout.spec.ts", + "line": 282, + "column": 7 + } + }, + { + "id": "7f4d24df5ef863e-793414ff4288a57", + "title": "Alert create flyout should create an alert with DSL filter for conditional action", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/alert_create_flyout.spec.ts", + "line": 360, + "column": 7 + } + }, + { + "id": "7f4d24df5ef863e-423c19d1919af7e", + "title": "Alert create flyout should create an alert with actions in multiple groups", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/alert_create_flyout.spec.ts", + "line": 430, + "column": 7 + } + }, + { + "id": "7f4d24df5ef863e-e8fe79b1100cedc", + "title": "Alert create flyout should show save confirmation before creating alert with no actions", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/alert_create_flyout.spec.ts", + "line": 472, + "column": 7 + } + }, + { + "id": "7f4d24df5ef863e-c380de83b3ea086", + "title": "Alert create flyout should show discard confirmation before closing flyout without saving", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/alert_create_flyout.spec.ts", + "line": 517, + "column": 7 + } + }, + { + "id": "7f4d24df5ef863e-a748b75b9283762", + "title": "Alert create flyout should show error when es_query is invalid", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/alert_create_flyout.spec.ts", + "line": 538, + "column": 7 + } + }, + { + "id": "7f4d24df5ef863e-fae722ecb1ca93c", + "title": "Alert create flyout should show KEEP command warning when creating a ES query rule with ESQL", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/alert_create_flyout.spec.ts", + "line": 556, + "column": 7 + } + }, + { + "id": "7f4d24df5ef863e-f4b407dc421763e", + "title": "Alert create flyout should not show KEEP command warning when editing a ES query rule with ESQL", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/alert_create_flyout.spec.ts", + "line": 583, + "column": 7 + } + }, + { + "id": "7f4d24df5ef863e-b5cd8064c58d131", + "title": "Alert create flyout should successfully show the APM error count rule flyout", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/alert_create_flyout.spec.ts", + "line": 603, + "column": 7 + } + }, + { + "id": "7f4d24df5ef863e-6147c0996b91ece", + "title": "Alert create flyout should successfully test valid es_query alert", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/alert_create_flyout.spec.ts", + "line": 615, + "column": 7 + } + }, + { + "id": "7f4d24df5ef863e-1a8e97a4c704f8b", + "title": "Alert create flyout should add filter", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/alert_create_flyout.spec.ts", + "line": 633, + "column": 7 + } + }, + { + "id": "e525ea47223c95a-f83dbbba7a68b4d", + "title": "Email connector should use the kibana config for aws ses defaults", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_email.spec.ts", + "line": 67, + "column": 7 + } + }, + { + "id": "e525ea47223c95a-307e31547871405", + "title": "Email connector disables Run and shows recipients-required error when To/Cc/Bcc are all empty", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_email.spec.ts", + "line": 93, + "column": 7 + } + }, + { + "id": "e525ea47223c95a-16f4113d4d2b31b", + "title": "Email connector disables Run when the only To entry is whitespace", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_email.spec.ts", + "line": 124, + "column": 7 + } + }, + { + "id": "e525ea47223c95a-3488fe026a89890", + "title": "Email connector shows invalid email error for address with leading hyphen in local part", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_email.spec.ts", + "line": 156, + "column": 7 + } + }, + { + "id": "e525ea47223c95a-def9a0ff234df23", + "title": "Email connector shows invalid email error for address with leading hyphen in domain", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_email.spec.ts", + "line": 185, + "column": 7 + } + }, + { + "id": "e525ea47223c95a-f9737f84035d346", + "title": "Email connector clears recipients-required error when only Cc has a valid recipient", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_email.spec.ts", + "line": 214, + "column": 7 + } + }, { "id": "8f6baf4aef167da-ea2a6253719774d", "title": "Create connector from connector spec creates a spec-defined AlienVault OTX connector", @@ -10,302 +276,1562 @@ "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_from_spec.spec.ts", - "line": 30, + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_from_spec.spec.ts", + "line": 30, + "column": 7 + } + }, + { + "id": "1a25d6294359785-ba247813d4d025a", + "title": "General connector functionality should create a connector", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_general.spec.ts", + "line": 93, + "column": 7 + } + }, + { + "id": "1a25d6294359785-4a684473d8e6e83", + "title": "General connector functionality should create a connector with a custom user-defined ID", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_general.spec.ts", + "line": 132, + "column": 7 + } + }, + { + "id": "1a25d6294359785-3d3860be78e25e4", + "title": "General connector functionality should auto-populate connector ID from name", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_general.spec.ts", + "line": 173, + "column": 7 + } + }, + { + "id": "1a25d6294359785-ae2cfda280adb1d", + "title": "General connector functionality should show connector ID as disabled when editing an existing connector", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_general.spec.ts", + "line": 187, + "column": 7 + } + }, + { + "id": "1a25d6294359785-b82ff9e67e460eb", + "title": "General connector functionality should edit a connector", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_general.spec.ts", + "line": 211, + "column": 7 + } + }, + { + "id": "1a25d6294359785-19370aeaf16260b", + "title": "General connector functionality should test a connector and display a successful result", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_general.spec.ts", + "line": 244, + "column": 7 + } + }, + { + "id": "1a25d6294359785-ff82272df110cff", + "title": "General connector functionality should test a connector and display a failure result", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_general.spec.ts", + "line": 278, + "column": 7 + } + }, + { + "id": "1a25d6294359785-48131f81e3df894", + "title": "General connector functionality should reset connector when canceling an edit", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_general.spec.ts", + "line": 312, + "column": 7 + } + }, + { + "id": "1a25d6294359785-89887db7070bed3", + "title": "General connector functionality should delete a connector", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_general.spec.ts", + "line": 343, + "column": 7 + } + }, + { + "id": "1a25d6294359785-a74eeb96d037180", + "title": "General connector functionality should bulk delete connectors", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_general.spec.ts", + "line": 373, + "column": 7 + } + }, + { + "id": "1a25d6294359785-0d8be81cd1254e2", + "title": "General connector functionality should not be able to delete a preconfigured connector", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_general.spec.ts", + "line": 404, + "column": 7 + } + }, + { + "id": "1a25d6294359785-d99b757aa9caed8", + "title": "General connector functionality should not be able to edit a preconfigured connector", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_general.spec.ts", + "line": 421, + "column": 7 + } + }, + { + "id": "1a25d6294359785-444be4c61cbf2d6", + "title": "General connector functionality Execution log - renders the event log list and can filter/sort", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_general.spec.ts", + "line": 441, + "column": 7 + } + }, + { + "id": "e0bf6344b976f93-5b78379599b5df5", + "title": "Jira connector shows the created connector in the list", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jira.spec.ts", + "line": 82, + "column": 7 + } + }, + { + "id": "e0bf6344b976f93-7d0878a2d799068", + "title": "Jira connector does not throw a type error for other fields when its valid json", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jira.spec.ts", + "line": 94, + "column": 7 + } + }, + { + "id": "e0bf6344b976f93-009f73e4800ec2a", + "title": "Jira connector disables the execute button when other fields is not valid json", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jira.spec.ts", + "line": 110, + "column": 7 + } + }, + { + "id": "9fbe060aea7b8b5-f299633aa3c44b2", + "title": "Jira Service Management connector connector page - should create the connector", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jsm.spec.ts", + "line": 148, + "column": 7 + } + }, + { + "id": "9fbe060aea7b8b5-619bc3ac6c14d07", + "title": "Jira Service Management connector connector page - should edit the connector", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jsm.spec.ts", + "line": 182, + "column": 7 + } + }, + { + "id": "9fbe060aea7b8b5-ee6fdae5919335d", + "title": "Jira Service Management connector connector page - should reset connector when canceling an edit", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jsm.spec.ts", + "line": 211, + "column": 7 + } + }, + { + "id": "9fbe060aea7b8b5-4d854df05b4cd14", + "title": "Jira Service Management connector connector page - should disable the run button when the message field is not filled", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jsm.spec.ts", + "line": 237, + "column": 7 + } + }, + { + "id": "9fbe060aea7b8b5-20398a5d7f343ae", + "title": "Jira Service Management connector page - should show the sub action selector when in test mode", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jsm.spec.ts", + "line": 260, + "column": 7 + } + }, + { + "id": "9fbe060aea7b8b5-27f05b6009c6c28", + "title": "Jira Service Management connector page - should preserve the alias when switching between create and close alert actions", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jsm.spec.ts", + "line": 266, + "column": 7 + } + }, + { + "id": "9fbe060aea7b8b5-a26307ae6e9e544", + "title": "Jira Service Management connector page - should not preserve the message when switching to close alert and back to create alert", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jsm.spec.ts", + "line": 280, + "column": 7 + } + }, + { + "id": "9fbe060aea7b8b5-4ce67fbce5d5bbb", + "title": "Jira Service Management connector page - createAlert - should show the additional options when clicking more options", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jsm.spec.ts", + "line": 296, + "column": 7 + } + }, + { + "id": "9fbe060aea7b8b5-7e49931e3f7029c", + "title": "Jira Service Management connector page - createAlert - should show and then hide the additional form options when clicking the button twice", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jsm.spec.ts", + "line": 311, + "column": 7 + } + }, + { + "id": "9fbe060aea7b8b5-2b224b4ba8dde7f", + "title": "Jira Service Management connector page - createAlert - should populate the json editor with message, description, and alias", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jsm.spec.ts", + "line": 325, + "column": 7 + } + }, + { + "id": "9fbe060aea7b8b5-c74afe453946815", + "title": "Jira Service Management connector page - createAlert - should populate the form with values from the json editor", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jsm.spec.ts", + "line": 352, + "column": 7 + } + }, + { + "id": "9fbe060aea7b8b5-16b219ceb1d8f63", + "title": "Jira Service Management connector page - createAlert - should disable the run button when the json editor validation fails", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jsm.spec.ts", + "line": 379, + "column": 7 + } + }, + { + "id": "9fbe060aea7b8b5-b4a9ff53fae5d5a", + "title": "Jira Service Management connector page - closeAlert - should show the additional options for closing an alert when clicking more options", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jsm.spec.ts", + "line": 392, + "column": 7 + } + }, + { + "id": "9fbe060aea7b8b5-f65e9f662c1e234", + "title": "Jira Service Management connector page - closeAlert - should show and then hide the additional options when clicking the button twice", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jsm.spec.ts", + "line": 406, + "column": 7 + } + }, + { + "id": "9fbe060aea7b8b5-ae486a0d4e59dd4", + "title": "Jira Service Management connector alerts page - should default to the create alert action", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jsm.spec.ts", + "line": 423, + "column": 7 + } + }, + { + "id": "9fbe060aea7b8b5-ef7ea664c63a7dd", + "title": "Jira Service Management connector alerts page - should default to the close alert action when setting the run when to recovered", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jsm.spec.ts", + "line": 442, + "column": 7 + } + }, + { + "id": "9fbe060aea7b8b5-471298764f223db", + "title": "Jira Service Management connector alerts page - should not preserve the alias when switching run when to recover", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jsm.spec.ts", + "line": 467, + "column": 7 + } + }, + { + "id": "9fbe060aea7b8b5-37324867ed1dbae", + "title": "Jira Service Management connector alerts page - should not preserve the alias when switching run when to threshold met", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jsm.spec.ts", + "line": 493, + "column": 7 + } + }, + { + "id": "9fbe060aea7b8b5-a05dc62dbceb08d", + "title": "Jira Service Management connector alerts page - should show the message is required error when clicking the save button", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jsm.spec.ts", + "line": 523, + "column": 7 + } + }, + { + "id": "603e60dadcde4f0-48e48752f8e14a8", + "title": "Opsgenie connector connector page - should create the connector", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts", + "line": 150, + "column": 7 + } + }, + { + "id": "603e60dadcde4f0-84596c9269827c4", + "title": "Opsgenie connector connector page - should edit the connector", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts", + "line": 182, + "column": 7 + } + }, + { + "id": "603e60dadcde4f0-95ba36184d5c339", + "title": "Opsgenie connector connector page - should reset connector when canceling an edit", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts", + "line": 212, + "column": 7 + } + }, + { + "id": "603e60dadcde4f0-4a393798ff6d00a", + "title": "Opsgenie connector connector page - should disable the run button when the message field is not filled", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts", + "line": 238, + "column": 7 + } + }, + { + "id": "603e60dadcde4f0-b5102b5354e29cc", + "title": "Opsgenie connector page - should show the sub action selector when in test mode", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts", + "line": 263, + "column": 7 + } + }, + { + "id": "603e60dadcde4f0-c919440d527cac0", + "title": "Opsgenie connector page - should preserve the alias when switching between create and close alert actions", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts", + "line": 269, + "column": 7 + } + }, + { + "id": "603e60dadcde4f0-ce3c3e7338f7489", + "title": "Opsgenie connector page - should not preserve the message when switching to close alert and back to create alert", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts", + "line": 283, + "column": 7 + } + }, + { + "id": "603e60dadcde4f0-9788f7864d78cf3", + "title": "Opsgenie connector page - createAlert - should show the additional options when clicking more options", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts", + "line": 299, + "column": 7 + } + }, + { + "id": "603e60dadcde4f0-5c1ab1adf50ea2f", + "title": "Opsgenie connector page - createAlert - should show and then hide the additional form options when clicking the button twice", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts", + "line": 314, + "column": 7 + } + }, + { + "id": "603e60dadcde4f0-84a7458e554e2d2", + "title": "Opsgenie connector page - createAlert - should populate the json editor with message, description, and alias", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts", + "line": 328, + "column": 7 + } + }, + { + "id": "603e60dadcde4f0-5ca956c9e96fd3f", + "title": "Opsgenie connector page - createAlert - should populate the form with values from the json editor", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts", + "line": 355, + "column": 7 + } + }, + { + "id": "603e60dadcde4f0-94f2f8adf3c2923", + "title": "Opsgenie connector page - createAlert - should disable the run button when the json editor validation fails", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts", + "line": 382, + "column": 7 + } + }, + { + "id": "603e60dadcde4f0-0593ab2032bad76", + "title": "Opsgenie connector page - closeAlert - should show the additional options for closing an alert when clicking more options", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts", + "line": 395, + "column": 7 + } + }, + { + "id": "603e60dadcde4f0-0c03b413eb244fd", + "title": "Opsgenie connector page - closeAlert - should show and then hide the additional options when clicking the button twice", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts", + "line": 409, + "column": 7 + } + }, + { + "id": "603e60dadcde4f0-b6adfc01d5c2be4", + "title": "Opsgenie connector alerts page - should default to the create alert action", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts", + "line": 426, + "column": 7 + } + }, + { + "id": "603e60dadcde4f0-99c8e58a5e38f47", + "title": "Opsgenie connector alerts page - should default to the close alert action when setting the run when to recovered", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts", + "line": 445, + "column": 7 + } + }, + { + "id": "603e60dadcde4f0-e768528adbb5d36", + "title": "Opsgenie connector alerts page - should not preserve the alias when switching run when to recover", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts", + "line": 470, + "column": 7 + } + }, + { + "id": "603e60dadcde4f0-3a1146ec453ad01", + "title": "Opsgenie connector alerts page - should not preserve the alias when switching run when to threshold met", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts", + "line": 496, + "column": 7 + } + }, + { + "id": "603e60dadcde4f0-9d42e0cb7574367", + "title": "Opsgenie connector alerts page - should show the message is required error when clicking the save button", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts", + "line": 526, + "column": 7 + } + }, + { + "id": "26a2ff6ed40159a-9064144ce2e83f0", + "title": "Webhook connector creates a connector with config and secret headers via the UI", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_webhook.spec.ts", + "line": 35, + "column": 7 + } + }, + { + "id": "26a2ff6ed40159a-07c5fed478fa7ad", + "title": "Webhook connector renders CR and PFX tabs for SSL auth", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_webhook.spec.ts", + "line": 86, + "column": 7 + } + }, + { + "id": "26a2ff6ed40159a-29643d8a9af7ad4", + "title": "Webhook connector displays headers as expected when the connector was created via API", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_webhook.spec.ts", + "line": 98, + "column": 7 + } + }, + { + "id": "4743bb59b7bc878-ff8cac6bb86c5ab", + "title": "Maintenance window create form creates a maintenance window with a custom recurring schedule", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/maintenance_window_create.spec.ts", + "line": 102, + "column": 7 + } + }, + { + "id": "4743bb59b7bc878-ce9f05d87274a3b", + "title": "Maintenance window create form shows a callout when filters toggle is on and scope query is set", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/maintenance_window_create.spec.ts", + "line": 138, + "column": 7 + } + }, + { + "id": "b6898f62f9fd022-21bd727162c6236", + "title": "Maintenance window update form updates a maintenance window", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/maintenance_window_update.spec.ts", + "line": 109, + "column": 7 + } + }, + { + "id": "b6898f62f9fd022-902f94c166361e6", + "title": "Maintenance window update form shows the multiple-solutions callout when editing a MW with legacy multi-category state", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/maintenance_window_update.spec.ts", + "line": 145, + "column": 7 + } + }, + { + "id": "b6898f62f9fd022-61a8583b57114af", + "title": "Maintenance window update form keeps the callout visible and submits when editing a MW that already has a scope query", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/maintenance_window_update.spec.ts", + "line": 177, + "column": 7 + } + }, + { + "id": "b4b539a64e36b08-cf340212ea83da6", + "title": "Rule details alerts tab filters alerts table with search bar query", + "expectedStatus": "skipped", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_details_alerts_tab.spec.ts", + "line": 80, + "column": 7 + } + }, + { + "id": "9390be6d28f2e22-6c7e872dd2560a7", + "title": "Rule Details - Legacy notify values should convert rule-level params to action-level params and save the rule successfully", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_details_edit_legacy_notify.spec.ts", + "line": 100, + "column": 7 + } + }, + { + "id": "1e5991e2e9c6383-69ac6df8bd331d6", + "title": "Rule Details - Edit rule button should open edit rule flyout", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_details_edit.spec.ts", + "line": 92, + "column": 7 + } + }, + { + "id": "1e5991e2e9c6383-4194151a53d2e67", + "title": "Rule Details - Edit rule button should reset rule when canceling an edit", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_details_edit.spec.ts", + "line": 109, + "column": 7 + } + }, + { + "id": "a45df9c720b9719-50365dfc8239ea2", + "title": "Rule Details - Header renders the rule details", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_details_header.spec.ts", + "line": 53, + "column": 7 + } + }, + { + "id": "a45df9c720b9719-a2b4added007d73", + "title": "Rule Details - Header renders toast when schedule is less than configured minimum", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_details_header.spec.ts", + "line": 59, + "column": 7 + } + }, + { + "id": "a45df9c720b9719-8069d0f59a1dc7d", + "title": "Rule Details - Header should disable the rule", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_details_header.spec.ts", + "line": 66, + "column": 7 + } + }, + { + "id": "a45df9c720b9719-1ca80e8c5c176fb", + "title": "Rule Details - Header should allow you to snooze a disabled rule", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_details_header.spec.ts", + "line": 78, + "column": 7 + } + }, + { + "id": "a45df9c720b9719-f41808004c25933", + "title": "Rule Details - Header should reenable a disabled rule", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_details_header.spec.ts", + "line": 95, + "column": 7 + } + }, + { + "id": "a45df9c720b9719-01f225a51c57330", + "title": "Rule Details - Header should snooze the rule", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_details_header.spec.ts", + "line": 106, + "column": 7 + } + }, + { + "id": "a45df9c720b9719-d8ff007a590dfdd", + "title": "Rule Details - Header should snooze the rule for a set duration", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_details_header.spec.ts", + "line": 119, + "column": 7 + } + }, + { + "id": "a45df9c720b9719-7cb2becb95a184f", + "title": "Rule Details - Header should add snooze schedule", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_details_header.spec.ts", + "line": 132, + "column": 7 + } + }, + { + "id": "54d204dd08bf2d1-a80dd60264f8ef6", + "title": "Rule Details - Saved Objects Management Navigation should navigate to rule details from saved objects management page in default space", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_details_so_navigation.spec.ts", + "line": 96, + "column": 9 + } + }, + { + "id": "54d204dd08bf2d1-c78ed3a6fb5dcee", + "title": "Rule Details - Saved Objects Management Navigation should navigate to rule details from saved objects management page in non-default space", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_details_so_navigation.spec.ts", + "line": 114, + "column": 9 + } + }, + { + "id": "b621efd3ec8d996-e8dfa7be3731465", + "title": "Rule logs \"show all spaces\" switch hides the switch when only the default space exists", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_logs_spaces_switch.spec.ts", + "line": 27, "column": 7 } }, { - "id": "e0bf6344b976f93-5b78379599b5df5", - "title": "Jira connector shows the created connector in the list", + "id": "b621efd3ec8d996-5a271ef4519f6c6", + "title": "Rule logs \"show all spaces\" switch shows the switch and toggles it when multiple spaces are accessible", "expectedStatus": "passed", "tags": [ "@local-stateful-classic", "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jira.spec.ts", - "line": 82, + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_logs_spaces_switch.spec.ts", + "line": 35, "column": 7 } }, { - "id": "e0bf6344b976f93-7d0878a2d799068", - "title": "Jira connector does not throw a type error for other fields when its valid json", + "id": "b621efd3ec8d996-bec0e1b69570809", + "title": "Rule logs \"show all spaces\" switch hides the switch when the user can only access one space", "expectedStatus": "passed", "tags": [ "@local-stateful-classic", "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jira.spec.ts", - "line": 94, + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_logs_spaces_switch.spec.ts", + "line": 55, "column": 7 } }, { - "id": "e0bf6344b976f93-009f73e4800ec2a", - "title": "Jira connector disables the execute button when other fields is not valid json", + "id": "e3c419a0049fd78-26ee1dab0262b36", + "title": "Rule snooze scheduler legacy theme independence keeps the scheduler stable without legacy theme CSS", "expectedStatus": "passed", "tags": [ "@local-stateful-classic", "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_jira.spec.ts", - "line": 110, + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_snooze_scheduler_legacy_theme.spec.ts", + "line": 59, + "column": 9 + } + }, + { + "id": "eda0390d2b96ae1-a76523058bbc608", + "title": "Rules home page loads the Rules page with alerts-and-actions role", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_home_page.spec.ts", + "line": 51, "column": 7 } }, { - "id": "26a2ff6ed40159a-9064144ce2e83f0", - "title": "Webhook connector creates a connector with config and secret headers via the UI", + "id": "eda0390d2b96ae1-a3844c4ca73888c", + "title": "Rules home page shows the no-permission prompt when the user has actions but no alerting privilege", "expectedStatus": "passed", "tags": [ "@local-stateful-classic", "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_webhook.spec.ts", - "line": 35, + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_home_page.spec.ts", + "line": 58, "column": 7 } }, { - "id": "26a2ff6ed40159a-07c5fed478fa7ad", - "title": "Webhook connector renders CR and PFX tabs for SSL auth", + "id": "eda0390d2b96ae1-324663b1eec2a0e", + "title": "Rules home page loads the Rules page as admin", "expectedStatus": "passed", "tags": [ "@local-stateful-classic", "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_webhook.spec.ts", - "line": 86, + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_home_page.spec.ts", + "line": 68, "column": 7 } }, { - "id": "26a2ff6ed40159a-29643d8a9af7ad4", - "title": "Webhook connector displays headers as expected when the connector was created via API", + "id": "eda0390d2b96ae1-352b2eaa6e31174", + "title": "Rules home page renders the rules list with a newly-created rule visible", "expectedStatus": "passed", "tags": [ "@local-stateful-classic", "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_webhook.spec.ts", - "line": 98, + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_home_page.spec.ts", + "line": 75, "column": 7 } }, { - "id": "4743bb59b7bc878-ff8cac6bb86c5ab", - "title": "Maintenance window create form creates a maintenance window with a custom recurring schedule", + "id": "eda0390d2b96ae1-cf41b97453bbbad", + "title": "Rules home page navigates to the rule details page when clicking a rule in the list", "expectedStatus": "passed", "tags": [ "@local-stateful-classic", "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/maintenance_window_create.spec.ts", - "line": 102, + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_home_page.spec.ts", + "line": 97, "column": 7 } }, { - "id": "4743bb59b7bc878-ce9f05d87274a3b", - "title": "Maintenance window create form shows a callout when filters toggle is on and scope query is set", + "id": "147307e33c87398-350e61a13c0575a", + "title": "Rules list should display alerts in alphabetical order", "expectedStatus": "passed", "tags": [ "@local-stateful-classic", "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/maintenance_window_create.spec.ts", - "line": 138, + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 210, "column": 7 } }, { - "id": "b6898f62f9fd022-21bd727162c6236", - "title": "Maintenance window update form updates a maintenance window", + "id": "147307e33c87398-48862b943a9b07b", + "title": "Rules list should search for alert", "expectedStatus": "passed", "tags": [ "@local-stateful-classic", "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/maintenance_window_update.spec.ts", - "line": 109, + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 232, "column": 7 } }, { - "id": "b6898f62f9fd022-902f94c166361e6", - "title": "Maintenance window update form shows the multiple-solutions callout when editing a MW with legacy multi-category state", + "id": "147307e33c87398-47ec35d63716050", + "title": "Rules list should update alert list on the search clear button click", "expectedStatus": "passed", "tags": [ "@local-stateful-classic", "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/maintenance_window_update.spec.ts", - "line": 145, + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 248, "column": 7 } }, { - "id": "b6898f62f9fd022-61a8583b57114af", - "title": "Maintenance window update form keeps the callout visible and submits when editing a MW that already has a scope query", + "id": "147307e33c87398-f2c6f0faa6babce", + "title": "Rules list should search for tags", "expectedStatus": "passed", "tags": [ "@local-stateful-classic", "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/maintenance_window_update.spec.ts", - "line": 177, + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 278, "column": 7 } }, { - "id": "b4b539a64e36b08-cf340212ea83da6", - "title": "Rule details alerts tab filters alerts table with search bar query", - "expectedStatus": "skipped", + "id": "147307e33c87398-32747e088fc269b", + "title": "Rules list should display an empty list when search did not return any alerts", + "expectedStatus": "passed", "tags": [ "@local-stateful-classic", "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_details_alerts_tab.spec.ts", - "line": 80, + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 295, "column": 7 } }, { - "id": "b621efd3ec8d996-e8dfa7be3731465", - "title": "Rule logs \"show all spaces\" switch hides the switch when only the default space exists", + "id": "147307e33c87398-f9b180d4de6bec0", + "title": "Rules list should disable single alert", "expectedStatus": "passed", "tags": [ "@local-stateful-classic", "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_logs_spaces_switch.spec.ts", - "line": 27, + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 309, "column": 7 } }, { - "id": "b621efd3ec8d996-5a271ef4519f6c6", - "title": "Rule logs \"show all spaces\" switch shows the switch and toggles it when multiple spaces are accessible", + "id": "147307e33c87398-9fbaab44b146fef", + "title": "Rules list should re-enable single alert", "expectedStatus": "passed", "tags": [ "@local-stateful-classic", "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_logs_spaces_switch.spec.ts", - "line": 35, + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 324, "column": 7 } }, { - "id": "b621efd3ec8d996-bec0e1b69570809", - "title": "Rule logs \"show all spaces\" switch hides the switch when the user can only access one space", + "id": "147307e33c87398-3cace3865ad8d87", + "title": "Rules list should delete single alert", "expectedStatus": "passed", "tags": [ "@local-stateful-classic", "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_logs_spaces_switch.spec.ts", - "line": 55, + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 346, "column": 7 } }, { - "id": "e3c419a0049fd78-26ee1dab0262b36", - "title": "Rule snooze scheduler legacy theme independence keeps the scheduler stable without legacy theme CSS", + "id": "147307e33c87398-427d3b50ef7ac2c", + "title": "Rules list should disable all selection", "expectedStatus": "passed", "tags": [ "@local-stateful-classic", "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rule_snooze_scheduler_legacy_theme.spec.ts", - "line": 59, - "column": 9 + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 369, + "column": 7 } }, { - "id": "eda0390d2b96ae1-a76523058bbc608", - "title": "Rules home page loads the Rules page with alerts-and-actions role", + "id": "147307e33c87398-6ff4e907b42fdd4", + "title": "Rules list should enable all selection", "expectedStatus": "passed", "tags": [ "@local-stateful-classic", "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_home_page.spec.ts", - "line": 51, + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 386, "column": 7 } }, { - "id": "eda0390d2b96ae1-a3844c4ca73888c", - "title": "Rules home page shows the no-permission prompt when the user has actions but no alerting privilege", + "id": "147307e33c87398-400dcea4242c3dd", + "title": "Rules list should render percentile column and cells correctly", "expectedStatus": "passed", "tags": [ "@local-stateful-classic", "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_home_page.spec.ts", - "line": 58, + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 401, "column": 7 } }, { - "id": "eda0390d2b96ae1-324663b1eec2a0e", - "title": "Rules home page loads the Rules page as admin", + "id": "147307e33c87398-2712d127ba7d738", + "title": "Rules list should render interval info icon when schedule interval is less than configured minimum", "expectedStatus": "passed", "tags": [ "@local-stateful-classic", "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_home_page.spec.ts", - "line": 68, + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 421, "column": 7 } }, { - "id": "eda0390d2b96ae1-352b2eaa6e31174", - "title": "Rules home page renders the rules list with a newly-created rule visible", + "id": "147307e33c87398-484f882613d26d8", + "title": "Rules list should delete all selection", "expectedStatus": "passed", "tags": [ "@local-stateful-classic", "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_home_page.spec.ts", - "line": 75, + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 452, "column": 7 } }, { - "id": "eda0390d2b96ae1-cf41b97453bbbad", - "title": "Rules home page navigates to the rule details page when clicking a rule in the list", + "id": "147307e33c87398-5a041634f786217", + "title": "Rules list should filter alerts by the status", "expectedStatus": "passed", "tags": [ "@local-stateful-classic", "@cloud-stateful-classic" ], "location": { - "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_home_page.spec.ts", - "line": 97, + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 475, + "column": 7 + } + }, + { + "id": "147307e33c87398-c04e54195ed37f5", + "title": "Rules list should display total alerts by status and error banner only when exists alerts with status error", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 507, + "column": 7 + } + }, + { + "id": "147307e33c87398-07e22d8c1efb1ab", + "title": "Rules list Expand error in rules table when there is rule with an error associated", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 567, + "column": 7 + } + }, + { + "id": "147307e33c87398-387f1cff60b9220", + "title": "Rules list should filter alerts by the alert type", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 607, + "column": 7 + } + }, + { + "id": "147307e33c87398-d950cd8b4977d73", + "title": "Rules list should filter alerts by the action type", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 649, + "column": 7 + } + }, + { + "id": "147307e33c87398-40436eb215ad4d8", + "title": "Rules list should filter alerts by the rule status", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 696, + "column": 7 + } + }, + { + "id": "147307e33c87398-344a686f1fbbfc4", + "title": "Rules list should filter alerts by the tag", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 771, + "column": 7 + } + }, + { + "id": "147307e33c87398-1e2eb4ac5b35f79", + "title": "Rules list should not prevent rules with action execution capabilities from being edited", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 824, + "column": 7 + } + }, + { + "id": "147307e33c87398-14494f15655aa7d", + "title": "Rules list should untrack disable rule if untrack switch is true", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 853, + "column": 7 + } + }, + { + "id": "147307e33c87398-78854574d5e4c82", + "title": "Rules list should not untrack disable rule if untrack switch if false", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 890, + "column": 7 + } + }, + { + "id": "147307e33c87398-ac0ab0053270d69", + "title": "Rules list should allow rules to be snoozed using the right side dropdown", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 929, + "column": 7 + } + }, + { + "id": "147307e33c87398-9d4187036a33902", + "title": "Rules list should allow rules to be snoozed indefinitely using the right side dropdown", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 948, + "column": 7 + } + }, + { + "id": "147307e33c87398-d1823f8102937a2", + "title": "Rules list should allow snoozed rules to be unsnoozed using the right side dropdown", + "expectedStatus": "passed", + "tags": [ + "@local-stateful-classic", + "@cloud-stateful-classic" + ], + "location": { + "file": "x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/rules_list.spec.ts", + "line": 969, "column": 7 } }, diff --git a/x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/alert_create_flyout.spec.ts b/x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/alert_create_flyout.spec.ts new file mode 100644 index 0000000000000..1b929f0930acd --- /dev/null +++ b/x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/alert_create_flyout.spec.ts @@ -0,0 +1,651 @@ +/* + * 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. + */ + +// Migrated from: +// x-pack/platform/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout.ts +// +// 13 of 13 tests migrated. +// +// Substitutions from original: +// - Slack#xyztest → Slack connector created via API in beforeAll +// - test.always-firing rule → .es-query rule (tests 5-6) +// - defineIndexThresholdAlert → Scout equivalent helper (tests 1-4) + +import type { KbnClient, ScoutPage } from '@kbn/scout'; +import { tags } from '@kbn/scout'; +import { expect } from '@kbn/scout/ui'; +import { test, makeEsQueryRule } from '../fixtures'; + +const searchRules = async (page: ScoutPage, query: string) => { + const field = page.testSubj.locator('ruleSearchField'); + await field.fill(query); + await field.press('Enter'); + await page + .locator('.euiBasicTable[data-test-subj="rulesList"]:not(.euiBasicTable-loading)') + .waitFor(); +}; + +const defineEsQueryAlert = async (page: ScoutPage, alertName: string) => { + await page.gotoApp('rules'); + await page.testSubj.click('createRuleButton'); + await page.testSubj.click('.es-query-SelectOption'); + await page.testSubj.locator('ruleDetailsNameInput').fill(alertName); + await page.testSubj.click('queryFormType_esQuery'); + await page.testSubj.click('selectIndexExpression'); + const indexInput = page.testSubj.locator('thresholdIndexesComboBox').locator('input'); + await indexInput.fill('.kibana'); + await page.locator('[role="listbox"]').waitFor(); + await page.locator('[role="listbox"] [role="option"]:first-child').click(); + const timeFieldSelect = page.testSubj.locator('thresholdAlertTimeFieldSelect'); + await timeFieldSelect.locator('option:nth-child(2)').waitFor(); + await timeFieldSelect.selectOption({ index: 1 }); + await page.testSubj.click('closePopover'); + await page.testSubj.locator('ruleDetailsNameInput').click(); +}; + +const setEditorValue = async (page: ScoutPage, testSubj: string, value: string) => { + const textarea = page.locator(`[data-test-subj="${testSubj}"] textarea`); + await textarea.waitFor({ state: 'attached' }); + await textarea.click({ force: true }); + await page.keyboard.press('Control+a'); + await page.keyboard.type(value); +}; + +const cancelRuleCreation = async (page: ScoutPage) => { + const cancelBtn = page.testSubj.locator('rulePageFooterCancelButton'); + if (await cancelBtn.isVisible({ timeout: 2_000 }).catch(() => false)) { + await cancelBtn.click(); + const confirmBtn = page.testSubj + .locator('confirmRuleCloseModal') + .locator('[data-test-subj="confirmModalConfirmButton"]'); + if (await confirmBtn.isVisible({ timeout: 1_000 }).catch(() => false)) { + await confirmBtn.click(); + } + } +}; + +// Equivalent of FTR rules.common.defineIndexThresholdAlert +const defineIndexThresholdAlert = async (page: ScoutPage, alertName: string) => { + await page.gotoApp('rules'); + await page.testSubj.click('createRuleButton'); + await page.testSubj.click('.index-threshold-SelectOption'); + await page.testSubj.locator('selectIndexExpression').scrollIntoViewIfNeeded(); + await page.testSubj.click('selectIndexExpression'); + const indexInput = page.testSubj.locator('thresholdIndexesComboBox').locator('input'); + await indexInput.fill('.kibana'); + await page.locator('[role="listbox"]').waitFor(); + await page.locator('[role="listbox"] [role="option"]:first-child').click(); + const timeFieldSelect = page.testSubj.locator('thresholdAlertTimeFieldSelect'); + await timeFieldSelect.locator('option:nth-child(2)').waitFor(); + await timeFieldSelect.selectOption({ index: 1 }); + await page.testSubj.click('closePopover'); + await page.testSubj.locator('ruleDetailsNameInput').scrollIntoViewIfNeeded(); + await page.testSubj.locator('ruleDetailsNameInput').fill(alertName); +}; + +// Find and delete a rule by name via API +const deleteRuleByName = async (kbnClient: KbnClient, name: string) => { + const resp = await kbnClient.request({ + method: 'GET', + path: '/api/alerting/rules/_find', + headers: {}, + query: { search: name, search_fields: 'name' }, + }); + for (const rule of (resp.data as any).data ?? []) { + if (rule.name === name) { + await kbnClient.request({ + method: 'DELETE', + path: `/internal/alerting/rule/${rule.id}`, + headers: { 'kbn-xsrf': 'scout' }, + }); + } + } +}; + +// Click the Slack connector card in the actions connector modal +const selectConnectorInModal = async (page: ScoutPage, connectorName: string) => { + await expect(page.testSubj.locator('ruleActionsConnectorsModal')).toBeVisible(); + await page + .locator('[data-test-subj="ruleActionsConnectorsModalCard"]') + .filter({ hasText: connectorName }) + .locator('button') + .click(); +}; + +test.describe('Alert create flyout', { tag: tags.stateful.classic }, () => { + let esQueryRuleId: string; + let esQueryRuleName: string; + let slackConnectorId: string; + let slackConnectorName: string; + + test.beforeAll(async ({ apiServices }) => { + const rule = makeEsQueryRule('scout-alert-flyout'); + const resp = await apiServices.alerting.rules.create(rule); + esQueryRuleId = resp.data.id; + esQueryRuleName = resp.data.name; + + slackConnectorName = `scout-slack-${Date.now()}`; + const connResp = await apiServices.alerting.connectors.create({ + name: slackConnectorName, + connectorTypeId: '.slack', + config: {}, + secrets: { + webhookUrl: 'https://example.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX', + }, + }); + slackConnectorId = connResp.id; + }); + + test.beforeEach(async ({ browserAuth }) => { + await browserAuth.loginAsAdmin(); + }); + + test.afterEach(async ({ page }) => { + await cancelRuleCreation(page); + }); + + test.afterAll(async ({ apiServices }) => { + if (esQueryRuleId) await apiServices.alerting.rules.delete(esQueryRuleId); + if (slackConnectorId) await apiServices.alerting.connectors.delete(slackConnectorId); + }); + + test('should delete the right action when the same action has been added twice', async ({ + page, + kbnClient, + }) => { + const ruleName = `scout-flyout-del-${Date.now()}`; + await defineEsQueryAlert(page, ruleName); + + // Add Slack action with unique body text + await page.testSubj.click('ruleActionsAddActionButton'); + await selectConnectorInModal(page, slackConnectorName); + await page.testSubj.locator('messageTextArea').fill('myUniqueKey'); + await page.testSubj.click('rulePageFooterSaveButton'); + await expect(page.testSubj.locator('euiToastHeader__title')).toContainText( + `Created rule "${ruleName}"`, + { timeout: 15_000 } + ); + + try { + // Navigate to rules list and open edit flyout + await page.gotoApp('rules'); + await page.testSubj.click('rulesTab'); + await searchRules(page, ruleName); + await page.testSubj.click('selectActionButton'); + await page.testSubj.click('editRule'); + + // Add a second Slack action + await page.testSubj.click('ruleActionsAddActionButton'); + await selectConnectorInModal(page, slackConnectorName); + + // Fill the second action's textarea (last of all messageTextArea elements) + const allTextAreas = await page.testSubj.locator('messageTextArea').all(); + await allTextAreas[allTextAreas.length - 1].fill('myUniqueKey1'); + + // Delete the FIRST action item + await page + .locator( + '[data-test-subj="ruleActionsItem"]:first-child [data-test-subj="ruleActionsItemDeleteButton"]' + ) + .click(); + + // Only one action remains; it should be 'myUniqueKey1' (the second action) + await expect(page.testSubj.locator('messageTextArea')).toHaveCount(1); + await expect(page.testSubj.locator('messageTextArea')).toHaveValue('myUniqueKey1'); + } finally { + await deleteRuleByName(kbnClient, ruleName); + } + }); + + test('should create an alert', async ({ page, kbnClient }) => { + const alertName = `scout-flyout-create-${Date.now()}`; + await defineIndexThresholdAlert(page, alertName); + + // filterKuery validation: invalid KQL should mark field as invalid + const filterKuery = page.testSubj.locator('filterKuery'); + await filterKuery.fill('group:'); + await filterKuery.blur(); + await expect(filterKuery).toHaveClass(/euiFieldSearch-isInvalid/, { timeout: 5_000 }); + await filterKuery.fill('group: group-0'); + await filterKuery.blur(); + await expect(filterKuery).not.toHaveClass(/euiFieldSearch-isInvalid/); + + // Add Slack action + await page.testSubj.click('ruleActionsAddActionButton'); + await selectConnectorInModal(page, slackConnectorName); + + // Default message template should be populated for Index Threshold rule + await expect(page.testSubj.locator('messageTextArea')).not.toBeEmpty({ timeout: 5_000 }); + + // Replace with test text then insert a variable + await page.testSubj.locator('messageTextArea').fill('test message '); + await page.testSubj.click('messageAddVariableButton'); + await page.testSubj.click('variableMenuButton-alert.actionGroup'); + await expect(page.testSubj.locator('messageTextArea')).toHaveValue( + 'test message {{alert.actionGroup}}' + ); + + // Append more text, then insert another variable via search + await page.testSubj.locator('messageTextArea').press('End'); + await page.keyboard.type(' some additional text '); + await page.testSubj.click('messageAddVariableButton'); + await page.testSubj.locator('messageVariablesSelectableSearch').fill('rule.id'); + await page.testSubj.click('variableMenuButton-rule.id'); + await expect(page.testSubj.locator('messageTextArea')).toHaveValue( + 'test message {{alert.actionGroup}} some additional text {{rule.id}}' + ); + + // Action settings: set throttle + await page.testSubj + .locator('ruleActionsItem') + .getByRole('button', { name: 'Settings' }) + .click(); + await page.testSubj.click('notifyWhenSelect'); + await page.testSubj.click('onThrottleInterval'); + await page.testSubj.locator('throttleInput').fill('10'); + + // Conditional action filter: toggle, add structured filter, add KQL query + await page.testSubj.click('alertsFilterQueryToggle'); + await page.testSubj.click('addFilter'); + await page.testSubj.locator('filterFieldSuggestionList').locator('input').fill('_id'); + await page.locator('[role="listbox"] [role="option"]:first-child').click(); + await page.testSubj.locator('filterOperatorList').locator('input').fill('is not'); + await page.locator('[role="listbox"] [role="option"]:first-child').click(); + await page.testSubj.locator('filterParams').fill('fake-rule-id'); + await page.testSubj.click('saveFilter'); + await page.testSubj.locator('queryInput').fill('_id: *'); + + try { + await page.testSubj.click('rulePageFooterSaveButton'); + await expect(page.testSubj.locator('euiToastHeader__title')).toContainText( + `Created rule "${alertName}"`, + { timeout: 15_000 } + ); + + // Verify rule appears in list + await page.gotoApp('rules'); + await page.testSubj.click('rulesTab'); + await searchRules(page, alertName); + const row = page.locator('[data-test-subj="rulesList"] tr').filter({ hasText: alertName }); + await expect(row).toBeVisible(); + await expect(row).toContainText('Index threshold'); + await expect(row).toContainText('1 min'); + } finally { + await deleteRuleByName(kbnClient, alertName); + } + }); + + test('should create an alert with composite query in filter for conditional action', async ({ + page, + kbnClient, + }) => { + const alertName = `scout-flyout-composite-${Date.now()}`; + await defineIndexThresholdAlert(page, alertName); + + // filterKuery validation + const filterKuery = page.testSubj.locator('filterKuery'); + await filterKuery.fill('group:'); + await filterKuery.blur(); + await expect(filterKuery).toHaveClass(/euiFieldSearch-isInvalid/, { timeout: 5_000 }); + await filterKuery.fill('group: group-0'); + await filterKuery.blur(); + await expect(filterKuery).not.toHaveClass(/euiFieldSearch-isInvalid/); + + // Add Slack action and configure message + await page.testSubj.click('ruleActionsAddActionButton'); + await selectConnectorInModal(page, slackConnectorName); + await page.testSubj.locator('messageTextArea').fill('test message '); + await page.testSubj.click('messageAddVariableButton'); + await page.testSubj.click('variableMenuButton-alert.actionGroup'); + await page.testSubj.locator('messageTextArea').press('End'); + await page.keyboard.type(' some additional text '); + await page.testSubj.click('messageAddVariableButton'); + await page.testSubj.locator('messageVariablesSelectableSearch').fill('rule.id'); + await page.testSubj.click('variableMenuButton-rule.id'); + + // Action settings: throttle + await page.testSubj + .locator('ruleActionsItem') + .getByRole('button', { name: 'Settings' }) + .click(); + await page.testSubj.click('notifyWhenSelect'); + await page.testSubj.click('onThrottleInterval'); + await page.testSubj.locator('throttleInput').fill('10'); + + // Conditional action filter: AND composite filter + await page.testSubj.click('alertsFilterQueryToggle'); + await page.testSubj.click('addFilter'); + // First condition: _id is not fake-rule-id + await page.testSubj.locator('filterFieldSuggestionList').locator('input').fill('_id'); + await page.locator('[role="listbox"] [role="option"]:first-child').click(); + await page.testSubj.locator('filterOperatorList').locator('input').fill('is not'); + await page.locator('[role="listbox"] [role="option"]:first-child').click(); + await page.testSubj.locator('filterParams').fill('fake-rule-id'); + // Add AND condition + await page.testSubj.click('add-and-filter'); + // Second condition: kibana.alert.action_group exists + const filter01 = page.testSubj.locator('filter-0.1'); + await filter01 + .locator('[data-test-subj="filterFieldSuggestionList"] input') + .fill('kibana.alert.action_group'); + await page.locator('[role="listbox"] [role="option"]:first-child').click(); + await filter01.locator('[data-test-subj="filterOperatorList"] input').fill('exists'); + await page.locator('[role="listbox"] [role="option"]:first-child').click(); + await page.testSubj.click('saveFilter'); + await page.testSubj.locator('queryInput').fill('_id: *'); + + try { + await page.testSubj.click('rulePageFooterSaveButton'); + await expect(page.testSubj.locator('euiToastHeader__title')).toContainText( + `Created rule "${alertName}"`, + { timeout: 15_000 } + ); + + await page.gotoApp('rules'); + await page.testSubj.click('rulesTab'); + await searchRules(page, alertName); + const row = page.locator('[data-test-subj="rulesList"] tr').filter({ hasText: alertName }); + await expect(row).toBeVisible(); + await expect(row).toContainText('Index threshold'); + await expect(row).toContainText('1 min'); + } finally { + await deleteRuleByName(kbnClient, alertName); + } + }); + + test('should create an alert with DSL filter for conditional action', async ({ + page, + kbnClient, + }) => { + const alertName = `scout-flyout-dsl-${Date.now()}`; + await defineIndexThresholdAlert(page, alertName); + + // filterKuery validation + const filterKuery = page.testSubj.locator('filterKuery'); + await filterKuery.fill('group:'); + await filterKuery.blur(); + await expect(filterKuery).toHaveClass(/euiFieldSearch-isInvalid/, { timeout: 5_000 }); + await filterKuery.fill('group: group-0'); + await filterKuery.blur(); + await expect(filterKuery).not.toHaveClass(/euiFieldSearch-isInvalid/); + + // Add Slack action + await page.testSubj.click('ruleActionsAddActionButton'); + await selectConnectorInModal(page, slackConnectorName); + + // Action settings: throttle + await page.testSubj + .locator('ruleActionsItem') + .getByRole('button', { name: 'Settings' }) + .click(); + await page.testSubj.click('notifyWhenSelect'); + await page.testSubj.click('onThrottleInterval'); + await page.testSubj.locator('throttleInput').fill('10'); + + // Conditional action filter: add a DSL (Query DSL) filter + await page.testSubj.click('alertsFilterQueryToggle'); + const dslFilter = JSON.stringify({ + bool: { filter: [{ term: { 'kibana.alert.rule.name': alertName } }] }, + }); + await page.testSubj.click('addFilter'); + await page.testSubj.click('editQueryDSL'); + const dslTextarea = page.testSubj.locator('addFilterPopover').locator('textarea'); + await dslTextarea.waitFor({ state: 'attached' }); + await dslTextarea.click({ force: true }); + await page.keyboard.press('Control+a'); + await page.keyboard.type(dslFilter); + await page.testSubj.click('saveFilter'); + // A filter badge should now be present + await expect(page.locator('[data-test-subj="filter"]')).toHaveCount(1, { timeout: 5_000 }); + + try { + await page.testSubj.click('rulePageFooterSaveButton'); + await expect(page.testSubj.locator('euiToastHeader__title')).toContainText( + `Created rule "${alertName}"`, + { timeout: 15_000 } + ); + + // Re-open rule for editing and verify the DSL filter persists + await page.gotoApp('rules'); + await page.testSubj.click('rulesTab'); + await searchRules(page, alertName); + await page.testSubj.click('selectActionButton'); + await page.testSubj.click('editRule'); + await page.testSubj + .locator('ruleActionsItem') + .getByRole('button', { name: 'Settings' }) + .click(); + await page.testSubj.locator('globalQueryBar').scrollIntoViewIfNeeded(); + // DSL filter badge should still be present + await expect(page.locator('[data-test-subj="filter"]')).toHaveCount(1, { timeout: 5_000 }); + } finally { + await deleteRuleByName(kbnClient, alertName); + } + }); + + test('should create an alert with actions in multiple groups', async ({ page, kbnClient }) => { + const alertName = `scout-flyout-multigroup-${Date.now()}`; + await defineEsQueryAlert(page, alertName); + + // Add Slack action for the default (active) group + await page.testSubj.click('ruleActionsAddActionButton'); + await selectConnectorInModal(page, slackConnectorName); + await page.testSubj.locator('messageTextArea').fill('test message'); + + // Switch to recovered group via settings + await page.testSubj + .locator('ruleActionsItem') + .getByRole('button', { name: 'Settings' }) + .click(); + await page.testSubj.click('ruleActionsSettingsSelectActionGroup'); + await page.testSubj.click('addNewActionConnectorActionGroup-recovered'); + + // Add a second Slack action for the recovered group + await page.testSubj.click('ruleActionsAddActionButton'); + await selectConnectorInModal(page, slackConnectorName); + const allTextAreas = await page.testSubj.locator('messageTextArea').all(); + await allTextAreas[allTextAreas.length - 1].fill('recovery message'); + + try { + await page.testSubj.click('rulePageFooterSaveButton'); + await expect(page.testSubj.locator('euiToastHeader__title')).toContainText( + `Created rule "${alertName}"`, + { timeout: 15_000 } + ); + + await page.gotoApp('rules'); + await page.testSubj.click('rulesTab'); + await searchRules(page, alertName); + const row = page.locator('[data-test-subj="rulesList"] tr').filter({ hasText: alertName }); + await expect(row).toBeVisible(); + await expect(row).toContainText('Elasticsearch query'); + await expect(row).toContainText('1 min'); + } finally { + await deleteRuleByName(kbnClient, alertName); + } + }); + + test('should show save confirmation before creating alert with no actions', async ({ + page, + kbnClient, + }) => { + const alertName = `scout-flyout-confirm-${Date.now()}`; + await defineEsQueryAlert(page, alertName); + + // Save with no actions → confirmation modal should appear + await page.testSubj.click('rulePageFooterSaveButton'); + await expect(page.testSubj.locator('confirmCreateRuleModal')).toBeVisible({ timeout: 5_000 }); + + // Cancel → modal closes, save button re-enabled + await page.testSubj + .locator('confirmCreateRuleModal') + .locator('[data-test-subj="confirmModalCancelButton"]') + .click(); + await expect(page.testSubj.locator('confirmCreateRuleModal')).toBeHidden(); + await expect(page.testSubj.locator('rulePageFooterSaveButton')).toBeEnabled(); + + // Confirm save → rule created + await page.testSubj.click('rulePageFooterSaveButton'); + await expect(page.testSubj.locator('confirmCreateRuleModal')).toBeVisible(); + await page.testSubj + .locator('confirmCreateRuleModal') + .locator('[data-test-subj="confirmModalConfirmButton"]') + .click(); + await expect(page.testSubj.locator('confirmCreateRuleModal')).toBeHidden(); + await expect(page.testSubj.locator('euiToastHeader__title')).toContainText( + `Created rule "${alertName}"`, + { timeout: 15_000 } + ); + + try { + await page.gotoApp('rules'); + await page.testSubj.click('rulesTab'); + await searchRules(page, alertName); + const row = page.locator('[data-test-subj="rulesList"] tr').filter({ hasText: alertName }); + await expect(row).toBeVisible(); + await expect(row).toContainText('Elasticsearch query'); + await expect(row).toContainText('1 min'); + } finally { + await deleteRuleByName(kbnClient, alertName); + } + }); + + test('should show discard confirmation before closing flyout without saving', async ({ + page, + }) => { + await page.gotoApp('rules'); + await page.testSubj.click('createRuleButton'); + await page.testSubj.click('.es-query-SelectOption'); + await page.testSubj.click('rulePageFooterCancelButton'); + await expect(page.testSubj.locator('confirmRuleCloseModal')).toBeHidden(); + + await page.testSubj.click('createRuleButton'); + await page.testSubj.click('.es-query-SelectOption'); + await page.testSubj.locator('ruleDetailsNameInput').fill('alertName'); + await page.testSubj.click('rulePageFooterCancelButton'); + await expect(page.testSubj.locator('confirmRuleCloseModal')).toBeVisible(); + await page.testSubj + .locator('confirmRuleCloseModal') + .locator('[data-test-subj="confirmModalCancelButton"]') + .click(); + await expect(page.testSubj.locator('confirmRuleCloseModal')).toBeHidden(); + }); + + test('should show error when es_query is invalid', async ({ page }) => { + const alertName = `scout-es-query-${Date.now()}`; + await defineEsQueryAlert(page, alertName); + + await setEditorValue(page, 'queryJsonEditor', '{"query":{"foo":""}}'); + await page.testSubj.click('testQuery'); + await expect(page.testSubj.locator('testQuerySuccess')).toBeHidden(); + await expect(page.testSubj.locator('testQueryError')).toBeVisible({ timeout: 15_000 }); + + await page.testSubj.click('rulePageFooterCancelButton'); + const confirmBtn = page.testSubj + .locator('confirmRuleCloseModal') + .locator('[data-test-subj="confirmModalConfirmButton"]'); + if (await confirmBtn.isVisible({ timeout: 2_000 }).catch(() => false)) { + await confirmBtn.click(); + } + }); + + test('should show KEEP command warning when creating a ES query rule with ESQL', async ({ + page, + }) => { + await page.gotoApp('rules'); + await page.testSubj.click('createRuleButton'); + await page.testSubj.click('.es-query-SelectOption'); + await page.testSubj.click('queryFormType_esqlQuery'); + + await setEditorValue(page, 'ESQLEditor', 'FROM *'); + await page.keyboard.press('Escape'); + + await expect(page.testSubj.locator('ESQLEditor-footerPopoverButton-warning')).toBeVisible({ + timeout: 15_000, + }); + await page.testSubj.click('ESQLEditor-footerPopoverButton-warning'); + await expect(page.testSubj.locator('ESQLEditor-errors-warnings-content')).toContainText( + 'KEEP processing command is recommended' + ); + + await setEditorValue(page, 'ESQLEditor', 'FROM * | KEEP @timestamp'); + await page.keyboard.press('Escape'); + + await expect(page.testSubj.locator('ESQLEditor-errors-warnings-content')).toBeHidden({ + timeout: 10_000, + }); + }); + + test('should not show KEEP command warning when editing a ES query rule with ESQL', async ({ + page, + }) => { + await page.gotoApp('rules'); + await page.testSubj.click('rulesTab'); + await searchRules(page, esQueryRuleName); + await page.testSubj.click('selectActionButton'); + await page.testSubj.click('editRule'); + + await page.testSubj.click('queryFormTypeChooserCancel'); + await page.testSubj.click('queryFormType_esqlQuery'); + + await setEditorValue(page, 'ESQLEditor', 'FROM *'); + await page.keyboard.press('Escape'); + + await page.waitForTimeout(2_000); + + await expect(page.testSubj.locator('ESQLEditor-errors-warnings-content')).toBeHidden(); + }); + + test('should successfully show the APM error count rule flyout', async ({ page }) => { + await page.gotoApp('rules'); + await page.testSubj.click('createRuleButton'); + await page.testSubj.click('apm.error_rate-SelectOption'); + await page.testSubj.locator('ruleDetailsNameInput').fill(`apm-error-${Date.now()}`); + + await expect(page.testSubj.locator('apmServiceField')).toBeVisible({ timeout: 10_000 }); + await expect(page.testSubj.locator('apmEnvironmentField')).toBeVisible(); + await expect(page.testSubj.locator('apmErrorGroupingKeyField')).toBeVisible(); + // afterEach cancelRuleCreation handles cleanup + }); + + test('should successfully test valid es_query alert', async ({ page }) => { + const alertName = `scout-es-query-${Date.now()}`; + await defineEsQueryAlert(page, alertName); + + await setEditorValue(page, 'queryJsonEditor', '{"query":{"match_all":{}}}'); + await page.testSubj.click('testQuery'); + await expect(page.testSubj.locator('testQuerySuccess')).toBeVisible({ timeout: 15_000 }); + await expect(page.testSubj.locator('testQueryError')).toBeHidden(); + + await page.testSubj.click('rulePageFooterCancelButton'); + const confirmBtn = page.testSubj + .locator('confirmRuleCloseModal') + .locator('[data-test-subj="confirmModalConfirmButton"]'); + if (await confirmBtn.isVisible({ timeout: 2_000 }).catch(() => false)) { + await confirmBtn.click(); + } + }); + + test('should add filter', async ({ page }) => { + await page.gotoApp('triggersActionsAlerts'); + + const filter = JSON.stringify({ + bool: { filter: [{ term: { 'kibana.alert.status': 'active' } }] }, + }); + + await page.testSubj.click('addFilter'); + await page.testSubj.click('editQueryDSL'); + const dslTextarea = page.testSubj.locator('addFilterPopover').locator('textarea'); + await dslTextarea.waitFor({ state: 'attached' }); + await dslTextarea.click({ force: true }); + await page.keyboard.press('Control+a'); + await page.keyboard.type(filter); + await page.testSubj.click('saveFilter'); + + await expect(page.locator('[data-test-subj="filter"]')).toHaveCount(1, { timeout: 5_000 }); + }); +}); diff --git a/x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_email.spec.ts b/x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_email.spec.ts new file mode 100644 index 0000000000000..38377642d68a4 --- /dev/null +++ b/x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_email.spec.ts @@ -0,0 +1,252 @@ +/* + * 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. + */ + +// Migrated from: x-pack/platform/test/functional_with_es_ssl/apps/triggers_actions_ui/email.ts +// +// Test 1 (ses defaults) uses EuiSelect (native elements. +// Monaco JSON editor is driven via MonacoEnvironment.monaco.editor API. + +import { v4 as uuidv4 } from 'uuid'; +import type { ScoutPage } from '@kbn/scout'; +import { tags } from '@kbn/scout'; +import { expect } from '@kbn/scout/ui'; +import { test, CONNECTORS_APP_PATH, CONNECTORS_LIST_SELECTORS } from '../fixtures'; + +interface MonacoBridge { + MonacoEnvironment?: { + monaco?: { + editor?: { + getModels: () => Array<{ getValue: () => string; setValue: (s: string) => void }>; + }; + }; + }; +} + +const setMonacoValue = async (page: ScoutPage, value: string) => { + await page.testSubj.locator('kibanaCodeEditor').waitFor({ state: 'visible' }); + await page.evaluate((v) => { + const editor = (window as unknown as MonacoBridge).MonacoEnvironment?.monaco?.editor; + if (!editor) throw new Error('MonacoEnvironment.monaco.editor not available'); + editor.getModels().forEach((m) => m.setValue(v)); + }, value); +}; + +const getMonacoValue = async (page: ScoutPage): Promise => { + await page.testSubj.locator('kibanaCodeEditor').waitFor({ state: 'visible' }); + return page.evaluate(() => { + const editor = (window as unknown as MonacoBridge).MonacoEnvironment?.monaco?.editor; + return editor?.getModels()?.[0]?.getValue() ?? ''; + }); +}; + +const navigateToConnectors = async (page: ScoutPage, kbnUrl: { get: (p: string) => string }) => { + await page.goto(kbnUrl.get(CONNECTORS_APP_PATH)); + await page.locator(CONNECTORS_LIST_SELECTORS.TABLE_LOADED).waitFor(); +}; + +const searchAndOpenConnector = async (page: ScoutPage, name: string) => { + const searchBox = page.locator(CONNECTORS_LIST_SELECTORS.SEARCH_INPUT); + await searchBox.fill(name); + await searchBox.press('Enter'); + await page.locator(CONNECTORS_LIST_SELECTORS.TABLE_LOADED).waitFor(); + await page.locator('[data-test-subj="connectorsTableCell-name"] button').click(); +}; + +const openJsmTestTab = async (page: ScoutPage, connectorId: string) => { + await page.testSubj.click(`edit${connectorId}`); + await page.testSubj.click('testConnectorTab'); + await page.testSubj.locator('jsm-subActionSelect').waitFor({ state: 'visible', timeout: 10_000 }); +}; + +const closeFlyoutIfOpen = async (page: ScoutPage) => { + const closeBtn = page.testSubj.locator('edit-connector-flyout-close-btn'); + if (await closeBtn.isVisible({ timeout: 1_000 }).catch(() => false)) { + await closeBtn.click(); + const confirmBtn = page.testSubj.locator('confirmModalConfirmButton'); + if (await confirmBtn.isVisible({ timeout: 1_000 }).catch(() => false)) { + await confirmBtn.click(); + } + } +}; + +const fillIndexThresholdForm = async (page: ScoutPage) => { + await page.testSubj.click('selectIndexExpression'); + const indexInput = page.testSubj.locator('thresholdIndexesComboBox').locator('input'); + await indexInput.fill('.kibana'); + await page.locator('[role="listbox"]').waitFor(); + await page.locator('[role="listbox"] [role="option"]:first-child').click(); + const timeFieldSelect = page.testSubj.locator('thresholdAlertTimeFieldSelect'); + await timeFieldSelect.locator('option:nth-child(2)').waitFor(); + await timeFieldSelect.selectOption({ index: 1 }); + await page.testSubj.click('closePopover'); +}; + +const cancelRuleCreation = async (page: ScoutPage) => { + const cancelBtn = page.testSubj.locator('rulePageFooterCancelButton'); + if (await cancelBtn.isVisible({ timeout: 2_000 }).catch(() => false)) { + await cancelBtn.click(); + const confirmBtn = page.testSubj + .locator('confirmRuleCloseModal') + .locator('[data-test-subj="confirmModalConfirmButton"]'); + if (await confirmBtn.isVisible({ timeout: 1_000 }).catch(() => false)) { + await confirmBtn.click(); + } + } +}; + +test.describe('Jira Service Management connector', { tag: tags.stateful.classic }, () => { + const createdConnectorIds: string[] = []; + let testPageConnectorId: string; + let alertsConnectorName: string; + + test.beforeAll(async ({ apiServices }) => { + // Connector for test-page tests + const testConnector = await apiServices.alerting.connectors.create({ + name: `jsm-test-page-${Date.now()}`, + connectorTypeId: '.jira-service-management', + config: { apiUrl: 'https://test.atlassian.net' }, + secrets: { apiKey: '1234' }, + }); + testPageConnectorId = testConnector.id; + createdConnectorIds.push(testPageConnectorId); + + // Connector for alerts-page tests + alertsConnectorName = `jsm-alerts-${Date.now()}`; + const alertsConnector = await apiServices.alerting.connectors.create({ + name: alertsConnectorName, + connectorTypeId: '.jira-service-management', + config: { apiUrl: 'https://test.atlassian.net' }, + secrets: { apiKey: '1234' }, + }); + createdConnectorIds.push(alertsConnector.id); + }); + + test.beforeEach(async ({ browserAuth }) => { + await browserAuth.loginAsAdmin(); + }); + + test.afterEach(async ({ page }) => { + await cancelRuleCreation(page); + await closeFlyoutIfOpen(page); + }); + + test.afterAll(async ({ apiServices }) => { + await Promise.allSettled( + createdConnectorIds.map((id) => apiServices.alerting.connectors.delete(id)) + ); + createdConnectorIds.length = 0; + }); + + // ── connector page ──────────────────────────────────────────────────────── + + test('connector page - should create the connector', async ({ page, kbnUrl, apiServices }) => { + await navigateToConnectors(page, kbnUrl); + const connectorName = `jsm-create-${uuidv4().slice(0, 8)}`; + + await page.testSubj.click('createConnectorButton'); + await page.testSubj.click('.jira-service-management-card'); + await page.testSubj.locator('nameInput').fill(connectorName); + await page.testSubj.locator('config\\.apiUrl-input').fill('https://test.atlassian.net'); + await page.testSubj.locator('secrets\\.apiKey-input').fill('apiKey'); + await page + .locator('[data-test-subj="create-connector-flyout-save-btn"]:not([disabled])') + .click(); + + await expect(page.testSubj.locator('euiToastHeader__title')).toContainText( + `Created '${connectorName}'` + ); + + await page.locator(CONNECTORS_LIST_SELECTORS.SEARCH_INPUT).fill(connectorName); + await page.locator(CONNECTORS_LIST_SELECTORS.SEARCH_INPUT).press('Enter'); + await page.locator(CONNECTORS_LIST_SELECTORS.TABLE_LOADED).waitFor(); + + const row = page.testSubj.locator('connectors-row'); + await expect(row.getByTestId('connectorsTableCell-actionType')).toContainText( + 'Jira Service Management' + ); + + // Find and track created connector for cleanup + const all = await apiServices.alerting.connectors.getAll(); + const created = (all as Array<{ id: string; name: string }>).find( + (c) => c.name === connectorName + ); + if (created) createdConnectorIds.push(created.id); + }); + + test('connector page - should edit the connector', async ({ page, kbnUrl, apiServices }) => { + await navigateToConnectors(page, kbnUrl); + const connectorName = `jsm-edit-${Date.now()}`; + const updatedName = `${connectorName}-updated`; + const created = await apiServices.alerting.connectors.create({ + name: connectorName, + connectorTypeId: '.jira-service-management', + config: { apiUrl: 'https://test.atlassian.net' }, + secrets: { apiKey: '1234' }, + }); + createdConnectorIds.push(created.id); + + await searchAndOpenConnector(page, connectorName); + await page.testSubj.locator('nameInput').fill(updatedName); + await page.testSubj.locator('secrets\\.apiKey-input').fill('apiKey'); + await page.locator('[data-test-subj="edit-connector-flyout-save-btn"]:not([disabled])').click(); + + await expect(page.testSubj.locator('euiToastHeader__title')).toContainText( + `Updated '${updatedName}'` + ); + + await page.testSubj.click('euiFlyoutCloseButton'); + + await page.locator(CONNECTORS_LIST_SELECTORS.SEARCH_INPUT).fill(updatedName); + await page.locator(CONNECTORS_LIST_SELECTORS.SEARCH_INPUT).press('Enter'); + await page.locator(CONNECTORS_LIST_SELECTORS.TABLE_LOADED).waitFor(); + await expect(page.testSubj.locator('connectors-row')).toHaveCount(1); + }); + + test('connector page - should reset connector when canceling an edit', async ({ + page, + kbnUrl, + apiServices, + }) => { + await navigateToConnectors(page, kbnUrl); + const connectorName = `jsm-cancel-${Date.now()}`; + const created = await apiServices.alerting.connectors.create({ + name: connectorName, + connectorTypeId: '.jira-service-management', + config: { apiUrl: 'https://test.atlassian.net' }, + secrets: { apiKey: '1234' }, + }); + createdConnectorIds.push(created.id); + + await searchAndOpenConnector(page, connectorName); + await page.testSubj.locator('nameInput').fill('some test name to cancel'); + await page.testSubj.click('edit-connector-flyout-close-btn'); + await page.testSubj.click('confirmModalConfirmButton'); + await expect(page.testSubj.locator('edit-connector-flyout-close-btn')).toBeHidden(); + + await searchAndOpenConnector(page, connectorName); + await expect(page.testSubj.locator('nameInput')).toHaveValue(connectorName); + await page.testSubj.click('euiFlyoutCloseButton'); + }); + + test('connector page - should disable the run button when the message field is not filled', async ({ + page, + kbnUrl, + apiServices, + }) => { + await navigateToConnectors(page, kbnUrl); + const connectorName = `jsm-disable-run-${Date.now()}`; + const created = await apiServices.alerting.connectors.create({ + name: connectorName, + connectorTypeId: '.jira-service-management', + config: { apiUrl: 'https://test.atlassian.net' }, + secrets: { apiKey: '1234' }, + }); + createdConnectorIds.push(created.id); + + await searchAndOpenConnector(page, connectorName); + await page.locator('[data-test-subj="testConnectorTab"]').click(); + + await expect(page.testSubj.locator('executeActionButton')).toBeDisabled(); + }); + + // ── test page ───────────────────────────────────────────────────────────── + + test('page - should show the sub action selector when in test mode', async ({ page, kbnUrl }) => { + await navigateToConnectors(page, kbnUrl); + await openJsmTestTab(page, testPageConnectorId); + await expect(page.testSubj.locator('jsm-subActionSelect')).toBeVisible(); + }); + + test('page - should preserve the alias when switching between create and close alert actions', async ({ + page, + kbnUrl, + }) => { + await navigateToConnectors(page, kbnUrl); + await openJsmTestTab(page, testPageConnectorId); + + await page.testSubj.locator('aliasInput').fill('new alias'); + await page.testSubj.locator('jsm-subActionSelect').selectOption('closeAlert'); + + await expect(page.testSubj.locator('jsm-subActionSelect')).toHaveValue('closeAlert'); + await expect(page.testSubj.locator('aliasInput')).toHaveValue('new alias'); + }); + + test('page - should not preserve the message when switching to close alert and back to create alert', async ({ + page, + kbnUrl, + }) => { + await navigateToConnectors(page, kbnUrl); + await openJsmTestTab(page, testPageConnectorId); + + await page.testSubj.locator('messageInput').fill('a message'); + await page.testSubj.locator('jsm-subActionSelect').selectOption('closeAlert'); + await expect(page.testSubj.locator('messageInput')).toBeHidden(); + + await page.testSubj.locator('jsm-subActionSelect').selectOption('createAlert'); + await expect(page.testSubj.locator('messageInput')).toBeVisible(); + await expect(page.testSubj.locator('messageInput')).toHaveValue(''); + }); + + test('page - createAlert - should show the additional options when clicking more options', async ({ + page, + kbnUrl, + }) => { + await navigateToConnectors(page, kbnUrl); + await openJsmTestTab(page, testPageConnectorId); + + await page.testSubj.click('jsm-display-more-options'); + + await expect(page.testSubj.locator('entityInput')).toBeVisible(); + await expect(page.testSubj.locator('sourceInput')).toBeVisible(); + await expect(page.testSubj.locator('userInput')).toBeVisible(); + await expect(page.testSubj.locator('noteTextArea')).toBeVisible(); + }); + + test('page - createAlert - should show and then hide the additional form options when clicking the button twice', async ({ + page, + kbnUrl, + }) => { + await navigateToConnectors(page, kbnUrl); + await openJsmTestTab(page, testPageConnectorId); + + await page.testSubj.click('jsm-display-more-options'); + await expect(page.testSubj.locator('entityInput')).toBeVisible(); + + await page.testSubj.click('jsm-display-more-options'); + await expect(page.testSubj.locator('entityInput')).toBeHidden(); + }); + + test('page - createAlert - should populate the json editor with message, description, and alias', async ({ + page, + kbnUrl, + }) => { + await navigateToConnectors(page, kbnUrl); + await openJsmTestTab(page, testPageConnectorId); + + await page.testSubj.locator('messageInput').fill('a message'); + await page.testSubj.locator('descriptionTextArea').fill('a description'); + await page.testSubj.locator('aliasInput').fill('an alias'); + await page.testSubj.locator('jsm-prioritySelect').selectOption('P5'); + await page.testSubj.locator('jsm-tags').locator('input').fill('a tag'); + await page.testSubj.locator('jsm-tags').locator('input').press('Enter'); + + await page.testSubj.click('jsm-show-json-editor-toggle'); + + const raw = await getMonacoValue(page); + const parsed = JSON.parse(raw); + expect(parsed).toStrictEqual({ + message: 'a message', + description: 'a description', + alias: 'an alias', + priority: 'P5', + tags: ['a tag'], + }); + }); + + test('page - createAlert - should populate the form with values from the json editor', async ({ + page, + kbnUrl, + }) => { + await navigateToConnectors(page, kbnUrl); + await openJsmTestTab(page, testPageConnectorId); + + await page.testSubj.click('jsm-show-json-editor-toggle'); + await setMonacoValue( + page, + JSON.stringify({ + message: 'a message', + description: 'a description', + alias: 'an alias', + priority: 'P3', + tags: ['tag1'], + }) + ); + await page.testSubj.click('jsm-show-json-editor-toggle'); + + await expect(page.testSubj.locator('messageInput')).toHaveValue('a message'); + await expect(page.testSubj.locator('descriptionTextArea')).toHaveValue('a description'); + await expect(page.testSubj.locator('aliasInput')).toHaveValue('an alias'); + await expect(page.testSubj.locator('jsm-prioritySelect')).toHaveValue('P3'); + await expect(page.testSubj.locator('jsm-tags')).toContainText('tag1'); + }); + + test('page - createAlert - should disable the run button when the json editor validation fails', async ({ + page, + kbnUrl, + }) => { + await navigateToConnectors(page, kbnUrl); + await openJsmTestTab(page, testPageConnectorId); + + await page.testSubj.click('jsm-show-json-editor-toggle'); + await setMonacoValue(page, JSON.stringify({ message: '' })); + + await expect(page.testSubj.locator('executeActionButton')).toBeDisabled(); + }); + + test('page - closeAlert - should show the additional options for closing an alert when clicking more options', async ({ + page, + kbnUrl, + }) => { + await navigateToConnectors(page, kbnUrl); + await openJsmTestTab(page, testPageConnectorId); + + await page.testSubj.locator('jsm-subActionSelect').selectOption('closeAlert'); + await page.testSubj.click('jsm-display-more-options'); + + await expect(page.testSubj.locator('sourceInput')).toBeVisible(); + await expect(page.testSubj.locator('userInput')).toBeVisible(); + }); + + test('page - closeAlert - should show and then hide the additional options when clicking the button twice', async ({ + page, + kbnUrl, + }) => { + await navigateToConnectors(page, kbnUrl); + await openJsmTestTab(page, testPageConnectorId); + + await page.testSubj.locator('jsm-subActionSelect').selectOption('closeAlert'); + await page.testSubj.click('jsm-display-more-options'); + await expect(page.testSubj.locator('sourceInput')).toBeVisible(); + + await page.testSubj.click('jsm-display-more-options'); + await expect(page.testSubj.locator('sourceInput')).toBeHidden(); + }); + + // ── alerts page ─────────────────────────────────────────────────────────── + + test('alerts page - should default to the create alert action', async ({ page }) => { + await page.gotoApp('rules'); + await page.testSubj.click('createRuleButton'); + await page.testSubj.click('.index-threshold-SelectOption'); + await page.testSubj.locator('ruleDetailsNameInput').fill(`jsm-alert-${Date.now()}`); + await fillIndexThresholdForm(page); + + await page.testSubj.click('ruleActionsAddActionButton'); + await page.testSubj.locator('ruleActionsConnectorsModal').waitFor({ state: 'visible' }); + await page.testSubj + .locator('ruleActionsConnectorsModalCard') + .filter({ hasText: alertsConnectorName }) + .locator('button') + .click(); + + await expect(page.testSubj.locator('messageInput')).toBeVisible(); + await expect(page.testSubj.locator('aliasInput')).toHaveValue('{{rule.id}}:{{alert.id}}'); + }); + + test('alerts page - should default to the close alert action when setting the run when to recovered', async ({ + page, + }) => { + await page.gotoApp('rules'); + await page.testSubj.click('createRuleButton'); + await page.testSubj.click('.index-threshold-SelectOption'); + await page.testSubj.locator('ruleDetailsNameInput').fill(`jsm-alert-${Date.now()}`); + await fillIndexThresholdForm(page); + + await page.testSubj.click('ruleActionsAddActionButton'); + await page.testSubj.locator('ruleActionsConnectorsModal').waitFor({ state: 'visible' }); + await page.testSubj + .locator('ruleActionsConnectorsModalCard') + .filter({ hasText: alertsConnectorName }) + .locator('button') + .click(); + + await page.testSubj.click('ruleActionsSettingsSelectActionGroup'); + await page.testSubj.click('addNewActionConnectorActionGroup-recovered'); + + await expect(page.testSubj.locator('aliasInput')).toHaveValue('{{rule.id}}:{{alert.id}}'); + await expect(page.testSubj.locator('noteTextArea')).toBeVisible(); + await expect(page.testSubj.locator('messageInput')).toBeHidden(); + }); + + test('alerts page - should not preserve the alias when switching run when to recover', async ({ + page, + }) => { + await page.gotoApp('rules'); + await page.testSubj.click('createRuleButton'); + await page.testSubj.click('.index-threshold-SelectOption'); + await page.testSubj.locator('ruleDetailsNameInput').fill(`jsm-alert-${Date.now()}`); + await fillIndexThresholdForm(page); + + await page.testSubj.click('ruleActionsAddActionButton'); + await page.testSubj.locator('ruleActionsConnectorsModal').waitFor({ state: 'visible' }); + await page.testSubj + .locator('ruleActionsConnectorsModalCard') + .filter({ hasText: alertsConnectorName }) + .locator('button') + .click(); + + await page.testSubj.locator('aliasInput').fill('an alias'); + + await page.testSubj.click('ruleActionsSettingsSelectActionGroup'); + await page.testSubj.click('addNewActionConnectorActionGroup-recovered'); + + await expect(page.testSubj.locator('messageInput')).toBeHidden(); + await expect(page.testSubj.locator('aliasInput')).toHaveValue('{{rule.id}}:{{alert.id}}'); + }); + + test('alerts page - should not preserve the alias when switching run when to threshold met', async ({ + page, + }) => { + await page.gotoApp('rules'); + await page.testSubj.click('createRuleButton'); + await page.testSubj.click('.index-threshold-SelectOption'); + await page.testSubj.locator('ruleDetailsNameInput').fill(`jsm-alert-${Date.now()}`); + await fillIndexThresholdForm(page); + + await page.testSubj.click('ruleActionsAddActionButton'); + await page.testSubj.locator('ruleActionsConnectorsModal').waitFor({ state: 'visible' }); + await page.testSubj + .locator('ruleActionsConnectorsModalCard') + .filter({ hasText: alertsConnectorName }) + .locator('button') + .click(); + + await page.testSubj.click('ruleActionsSettingsSelectActionGroup'); + await page.testSubj.click('addNewActionConnectorActionGroup-recovered'); + + await expect(page.testSubj.locator('messageInput')).toBeHidden(); + await page.testSubj.locator('aliasInput').fill('an alias'); + + await page.testSubj.click('ruleActionsSettingsSelectActionGroup'); + await page.testSubj.click('addNewActionConnectorActionGroup-threshold met'); + + await expect(page.testSubj.locator('messageInput')).toBeVisible(); + await expect(page.testSubj.locator('aliasInput')).toHaveValue('{{rule.id}}:{{alert.id}}'); + }); + + test('alerts page - should show the message is required error when clicking the save button', async ({ + page, + }) => { + await page.gotoApp('rules'); + await page.testSubj.click('createRuleButton'); + await page.testSubj.click('.index-threshold-SelectOption'); + await page.testSubj.locator('ruleDetailsNameInput').fill(`jsm-alert-${Date.now()}`); + await fillIndexThresholdForm(page); + + await page.testSubj.click('ruleActionsAddActionButton'); + await page.testSubj.locator('ruleActionsConnectorsModal').waitFor({ state: 'visible' }); + await page.testSubj + .locator('ruleActionsConnectorsModalCard') + .filter({ hasText: alertsConnectorName }) + .locator('button') + .click(); + + await expect(page.testSubj.locator('rulePageFooterSaveButton')).toBeDisabled(); + }); +}); diff --git a/x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts b/x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts new file mode 100644 index 0000000000000..17bfbb52c8557 --- /dev/null +++ b/x-pack/platform/plugins/shared/triggers_actions_ui/test/scout/ui/tests/connector_opsgenie.spec.ts @@ -0,0 +1,545 @@ +/* + * 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. + */ + +// Migrated from: +// x-pack/platform/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors/opsgenie.ts +// +// All 19 tests migrated. Nested describes are flattened (max describe depth = 1). +// `opsgenie-subActionSelect` and `opsgenie-prioritySelect` are native