Skip to content

Commit

Permalink
[Security Solution] Fixes the Alerts timeline failing test on master (
Browse files Browse the repository at this point in the history
#109644) (#109716)

* fixes 'Alerts timeline' tests

* adds data test subj for the loading spinner

Co-authored-by: Gloria Hornero <snootchie.boochies@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
3 people authored Aug 24, 2021
1 parent ecd0e43 commit 64a79a1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions x-pack/plugins/security_solution/cypress/screens/alerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"]';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
ThreatIndicatorRule,
ThresholdRule,
} from '../objects/rule';
import { LOADING_SPINNER } from '../screens/alerts';
import {
ABOUT_CONTINUE_BTN,
ABOUT_EDIT_TAB,
Expand Down Expand Up @@ -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')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export const FooterComponent = ({
return (
<LoadingPanelContainer>
<LoadingPanel
data-test-subj="LoadingPanelTimeline"
dataTestSubj="LoadingPanelTimeline"
height="35px"
showBorder={false}
text={loadingText}
Expand Down

0 comments on commit 64a79a1

Please sign in to comment.