Skip to content

Commit

Permalink
[Security Solution] Clean up external link text in a general way (#19…
Browse files Browse the repository at this point in the history
…6309)

## Summary

This PR generalizes external link text cleanup in `removeExternalLinkText`. 

## Details

Recent 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.
  • Loading branch information
maximpn authored Oct 16, 2024
1 parent f049dc0 commit daf4aae
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"]';
Expand Down

0 comments on commit daf4aae

Please sign in to comment.