[Security Solution] Fixes the Alerts timeline failing test on master (#109644)

* fixes 'Alerts timeline' tests

* adds data test subj for the loading spinner
This commit is contained in:
Gloria Hornero 2021-08-23 20:13:38 +02:00 committed by GitHub
parent 098a797636
commit fe6e97f0f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View file

@ -41,6 +41,8 @@ export const ACKNOWLEDGED_ALERTS_FILTER_BTN = '[data-test-subj="acknowledgedAler
export const LOADING_ALERTS_PANEL = '[data-test-subj="loading-alerts-panel"]';
export const LOADING_SPINNER = '[data-test-subj="LoadingPanelTimeline"]';
export const MANAGE_ALERT_DETECTION_RULES_BTN = '[data-test-subj="manage-alert-detection-rules"]';
export const MARK_ALERT_ACKNOWLEDGED_BTN = '[data-test-subj="acknowledged-alert-status"]';

View file

@ -14,6 +14,7 @@ import {
ThreatIndicatorRule,
ThresholdRule,
} from '../objects/rule';
import { LOADING_SPINNER } from '../screens/alerts';
import {
ABOUT_CONTINUE_BTN,
ABOUT_EDIT_TAB,
@ -531,6 +532,7 @@ export const waitForAlertsToPopulate = async (alertCountThreshold = 1) => {
cy.waitUntil(
() => {
refreshPage();
cy.get(LOADING_SPINNER).should('not.exist');
return cy
.get(SERVER_SIDE_EVENT_COUNT)
.invoke('text')

View file

@ -287,7 +287,7 @@ export const FooterComponent = ({
return (
<LoadingPanelContainer>
<LoadingPanel
data-test-subj="LoadingPanelTimeline"
dataTestSubj="LoadingPanelTimeline"
height="35px"
showBorder={false}
text={loadingText}