Skip to content

Commit

Permalink
fix functional test
Browse files Browse the repository at this point in the history
  • Loading branch information
angorayc committed Oct 14, 2020
1 parent 34572c9 commit 772c6bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const PrePackagedRulesPromptComponent: React.FC<PrePackagedRulesPromptProps> = (
isDisabled: userHasNoPermissions,
onClick: handlePreBuiltCreation,
fill: true,
testSubj: 'load-prebuilt-rules',
});

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ type GetLoadPrebuiltRulesAndTemplatesButton = ({
isDisabled,
onClick,
fill,
testSubj,
}: {
isDisabled: boolean;
onClick: () => void;
fill?: boolean;
testSubj?: string;
}) => React.ReactNode | null;

type GetReloadPrebuiltRulesAndTemplatesButton = ({
Expand Down Expand Up @@ -279,7 +281,7 @@ export const usePrePackagedRules = ({
]
);
const getLoadPrebuiltRulesAndTemplatesButton = useCallback(
({ isDisabled, onClick, fill }) => {
({ isDisabled, onClick, fill, testSubj = 'loadPrebuiltRulesBtn' }) => {
return prePackagedRuleStatus === 'ruleNotInstalled' ||
prePackagedTimelineStatus === 'timelinesNotInstalled' ? (
<EuiButton
Expand All @@ -288,7 +290,7 @@ export const usePrePackagedRules = ({
isLoading={loadingCreatePrePackagedRules}
isDisabled={isDisabled}
onClick={onClick}
data-test-subj="loadPrebuiltRulesBtn"
data-test-subj={testSubj}
>
{prePackagedRuleStatus === 'ruleNotInstalled' &&
prePackagedTimelineStatus === 'timelinesNotInstalled' &&
Expand Down

0 comments on commit 772c6bb

Please sign in to comment.