mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
do not assume a popover is closed before attempting to open it again
This commit is contained in:
parent
3976bc42d1
commit
1b231657cb
2 changed files with 8 additions and 0 deletions
|
@ -17,6 +17,7 @@ import {
|
|||
waitForRulesTableToBeLoaded,
|
||||
selectAllRules,
|
||||
openRefreshSettingsPopover,
|
||||
closeRefreshSettingsPopover,
|
||||
clearAllRuleSelection,
|
||||
selectNumberOfRules,
|
||||
mockGlobalClock,
|
||||
|
@ -96,6 +97,7 @@ describe('Alerts detection rules table auto-refresh', () => {
|
|||
REFRESH_SETTINGS_SELECTION_NOTE,
|
||||
'Note: Refresh is disabled while there is an active selection.'
|
||||
);
|
||||
closeRefreshSettingsPopover();
|
||||
|
||||
clearAllRuleSelection();
|
||||
|
||||
|
@ -116,6 +118,7 @@ describe('Alerts detection rules table auto-refresh', () => {
|
|||
|
||||
openRefreshSettingsPopover();
|
||||
checkAutoRefreshIsDisabled();
|
||||
closeRefreshSettingsPopover();
|
||||
|
||||
clearAllRuleSelection();
|
||||
|
||||
|
|
|
@ -315,6 +315,11 @@ export const openRefreshSettingsPopover = () => {
|
|||
cy.get(REFRESH_SETTINGS_SWITCH).should('be.visible');
|
||||
};
|
||||
|
||||
export const closeRefreshSettingsPopover = () => {
|
||||
cy.get(REFRESH_SETTINGS_POPOVER).click();
|
||||
cy.get(REFRESH_SETTINGS_SWITCH).should('not.be.visible');
|
||||
};
|
||||
|
||||
export const checkAutoRefreshIsDisabled = () => {
|
||||
cy.get(REFRESH_SETTINGS_SWITCH).should('have.attr', 'aria-checked', 'false');
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue