Skip to content

Commit f98b781

Browse files
[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)](#196309) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Maxim Palenov","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-16T09:00:18Z","message":"[Security Solution] Clean up external link text in a general way (#196309)\n\n## Summary\r\n\r\nThis PR generalizes external link text cleanup in `removeExternalLinkText`. \r\n\r\n## Details\r\n\r\nRecent Rule Management [periodic pipeline failure](https://buildkite.com/elastic/security-serverless-quality-gate-kibana-periodic/builds/1209#job-01928e56-28f3-4b45-8f9f-7158b324c115) was caused by merging back #195525. Despite EUI changes were [addressed](https://github.com/elastic/kibana/pull/195525/files#diff-8d47b006a91beb2c5074560dbcd42eecef96173e03ffeec7c726dd322425f760) in our test utility it wasn't properly picked up. The problem is fixed in a more general way.","sha":"daf4aae6aa202fd1148beea269939090137b659a","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","release_note:skip","v9.0.0","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","backport:prev-minor","v8.17.0"],"title":"[Security Solution] Clean up external link text in a general way","number":196309,"url":"https://github.com/elastic/kibana/pull/196309","mergeCommit":{"message":"[Security Solution] Clean up external link text in a general way (#196309)\n\n## Summary\r\n\r\nThis PR generalizes external link text cleanup in `removeExternalLinkText`. \r\n\r\n## Details\r\n\r\nRecent Rule Management [periodic pipeline failure](https://buildkite.com/elastic/security-serverless-quality-gate-kibana-periodic/builds/1209#job-01928e56-28f3-4b45-8f9f-7158b324c115) was caused by merging back #195525. Despite EUI changes were [addressed](https://github.com/elastic/kibana/pull/195525/files#diff-8d47b006a91beb2c5074560dbcd42eecef96173e03ffeec7c726dd322425f760) in our test utility it wasn't properly picked up. The problem is fixed in a more general way.","sha":"daf4aae6aa202fd1148beea269939090137b659a"}},"sourceBranch":"main","suggestedTargetBranches":["8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196309","number":196309,"mergeCommit":{"message":"[Security Solution] Clean up external link text in a general way (#196309)\n\n## Summary\r\n\r\nThis PR generalizes external link text cleanup in `removeExternalLinkText`. \r\n\r\n## Details\r\n\r\nRecent Rule Management [periodic pipeline failure](https://buildkite.com/elastic/security-serverless-quality-gate-kibana-periodic/builds/1209#job-01928e56-28f3-4b45-8f9f-7158b324c115) was caused by merging back #195525. Despite EUI changes were [addressed](https://github.com/elastic/kibana/pull/195525/files#diff-8d47b006a91beb2c5074560dbcd42eecef96173e03ffeec7c726dd322425f760) in our test utility it wasn't properly picked up. The problem is fixed in a more general way.","sha":"daf4aae6aa202fd1148beea269939090137b659a"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Maxim Palenov <[email protected]>
1 parent c986220 commit f98b781

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

x-pack/test/security_solution_cypress/cypress/screens/rule_details.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ export const TIMELINE_FIELD = (field: string) => {
138138
return `[data-test-subj="formatted-field-${field}"]`;
139139
};
140140

141-
export const removeExternalLinkText = (str: string) => str.replace(/\(external[^)]*\)/g, '');
141+
export const removeExternalLinkText = (str: string) =>
142+
str.replace(/\([^)]*(opens in a new tab or window)[^)]*\)/g, '');
142143

143144
export const DEFINE_RULE_PANEL_PROGRESS =
144145
'[data-test-subj="defineRule"] [data-test-subj="stepPanelProgress"]';

0 commit comments

Comments
 (0)