Skip to content

Commit

Permalink
Wait for the actoin menu to appear in functional test
Browse files Browse the repository at this point in the history
  • Loading branch information
maryam-saeidi committed Aug 7, 2023
1 parent 56f5c88 commit 3d59d88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,11 @@ export function AlertActions({
isOpen={isPopoverOpen}
panelPaddingSize="none"
>
<EuiContextMenuPanel size="s" items={actionsMenuItems} />
<EuiContextMenuPanel
size="s"
items={actionsMenuItems}
data-test-subj="alertsTableActionsMenu"
/>
</EuiPopover>
</EuiFlexItem>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const DATE_WITH_DATA = {
const ALERTS_FLYOUT_SELECTOR = 'alertsFlyout';
const FILTER_FOR_VALUE_BUTTON_SELECTOR = 'filterForValue';
const ALERTS_TABLE_CONTAINER_SELECTOR = 'alertsTable';
const ALERTS_TABLE_ACTIONS_MENU_SELECTOR = 'alertsTableActionsMenu';
const VIEW_RULE_DETAILS_SELECTOR = 'viewRuleDetails';
const VIEW_RULE_DETAILS_FLYOUT_SELECTOR = 'viewRuleDetailsFlyout';

Expand Down Expand Up @@ -209,6 +210,7 @@ export function ObservabilityAlertsCommonProvider({
const openActionsMenuForRow = retryOnStale.wrap(async (rowIndex: number) => {
const actionsOverflowButton = await getActionsButtonByIndex(rowIndex);
await actionsOverflowButton.click();
await testSubjects.existOrFail(ALERTS_TABLE_ACTIONS_MENU_SELECTOR);
});

const viewRuleDetailsButtonClick = async () => {
Expand Down

0 comments on commit 3d59d88

Please sign in to comment.