From f98b781f8b014ee9f37a0abeb1a33b973f3cd74b Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 16 Oct 2024 21:46:53 +1100 Subject: [PATCH] [8.x] [Security Solution] Clean up external link text in a general way (#196309) (#196502) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution] Clean up external link text in a general way (#196309)](https://github.com/elastic/kibana/pull/196309) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Maxim Palenov --- .../security_solution_cypress/cypress/screens/rule_details.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/test/security_solution_cypress/cypress/screens/rule_details.ts b/x-pack/test/security_solution_cypress/cypress/screens/rule_details.ts index e5d6711b7d16e..f6436249a53c8 100644 --- a/x-pack/test/security_solution_cypress/cypress/screens/rule_details.ts +++ b/x-pack/test/security_solution_cypress/cypress/screens/rule_details.ts @@ -138,7 +138,8 @@ export const TIMELINE_FIELD = (field: string) => { return `[data-test-subj="formatted-field-${field}"]`; }; -export const removeExternalLinkText = (str: string) => str.replace(/\(external[^)]*\)/g, ''); +export const removeExternalLinkText = (str: string) => + str.replace(/\([^)]*(opens in a new tab or window)[^)]*\)/g, ''); export const DEFINE_RULE_PANEL_PROGRESS = '[data-test-subj="defineRule"] [data-test-subj="stepPanelProgress"]';