diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_empty_prompt.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_empty_prompt.tsx index d12cc2a5be2ba..1912f4589eb5a 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_empty_prompt.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_empty_prompt.tsx @@ -64,6 +64,7 @@ const PrePackagedRulesPromptComponent: React.FC = ( isDisabled: userHasNoPermissions, onClick: handlePreBuiltCreation, fill: true, + testSubj: 'load-prebuilt-rules', }); return ( diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_pre_packaged_rules.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_pre_packaged_rules.tsx index a84eb7088b2f4..52ae974f9e4a4 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_pre_packaged_rules.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_pre_packaged_rules.tsx @@ -33,10 +33,12 @@ type GetLoadPrebuiltRulesAndTemplatesButton = ({ isDisabled, onClick, fill, + testSubj, }: { isDisabled: boolean; onClick: () => void; fill?: boolean; + testSubj?: string; }) => React.ReactNode | null; type GetReloadPrebuiltRulesAndTemplatesButton = ({ @@ -279,7 +281,7 @@ export const usePrePackagedRules = ({ ] ); const getLoadPrebuiltRulesAndTemplatesButton = useCallback( - ({ isDisabled, onClick, fill }) => { + ({ isDisabled, onClick, fill, testSubj = 'loadPrebuiltRulesBtn' }) => { return prePackagedRuleStatus === 'ruleNotInstalled' || prePackagedTimelineStatus === 'timelinesNotInstalled' ? ( {prePackagedRuleStatus === 'ruleNotInstalled' && prePackagedTimelineStatus === 'timelinesNotInstalled' &&