Skip to content

Commit

Permalink
Use and the data test subj for ui triggersAction UI
Browse files Browse the repository at this point in the history
  • Loading branch information
fkanout committed May 11, 2022
1 parent c4db139 commit 94992f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,13 @@ const RuleStatusMenu: React.FunctionComponent<RuleStatusMenuProps> = ({
name: ENABLED,
icon: isEnabled && !isSnoozed ? 'check' : 'empty',
onClick: enableRule,
'data-test-subj': 'statusDropdownEnabledItem',
},
{
name: DISABLED,
icon: !isEnabled ? 'check' : 'empty',
onClick: disableRule,
'data-test-subj': 'statusDropdownDisabledItem',
},
{
name: snoozeButtonTitle,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ export function ObservabilityAlertsRulesProvider({ getService }: FtrProviderCont
return createRuleButton.click();
};

const clickRuleStatusDropDownMenu = async () => testSubjects.click('statusContextButton');
const clickRuleStatusDropDownMenu = async () => testSubjects.click('statusDropdown');

const clickDisableFromDropDownMenu = async () =>
find.clickByCssSelector('div.euiContextMenuPanel > div > div > button:nth-child(2)');
const clickDisableFromDropDownMenu = async () => testSubjects.click('statusDropdownDisabledItem');

return {
getManageRulesPageHref,
Expand Down

0 comments on commit 94992f5

Please sign in to comment.