-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Security Solution] Cypress back to live #86093
Changes from 11 commits
3d7a451
b5a0e25
daf466d
aea2a41
2ef701a
a553eeb
7b519e1
6153412
58b0cd3
295bc61
a886917
f255c50
328a2a5
b8f1890
38b05b0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ import { | |
goToInProgressAlerts, | ||
} from '../tasks/alerts'; | ||
import { removeSignalsIndex } from '../tasks/api_calls/rules'; | ||
import { cleanKibana } from '../tasks/common'; | ||
import { esArchiverLoad, esArchiverUnload } from '../tasks/es_archiver'; | ||
import { loginAndWaitForPage } from '../tasks/login'; | ||
|
||
|
@@ -34,16 +35,13 @@ import { DETECTIONS_URL } from '../urls/navigation'; | |
describe('Alerts', () => { | ||
context('Closing alerts', () => { | ||
beforeEach(() => { | ||
cleanKibana(); | ||
removeSignalsIndex(); | ||
esArchiverLoad('alerts'); | ||
loginAndWaitForPage(DETECTIONS_URL); | ||
}); | ||
|
||
afterEach(() => { | ||
esArchiverUnload('alerts'); | ||
removeSignalsIndex(); | ||
}); | ||
|
||
it.skip('Closes and opens alerts', () => { | ||
it('Closes and opens alerts', () => { | ||
waitForAlertsPanelToBeLoaded(); | ||
waitForAlertsToBeLoaded(); | ||
|
||
|
@@ -117,13 +115,15 @@ describe('Alerts', () => { | |
`Showing ${expectedNumberOfOpenedAlerts.toString()} alerts` | ||
); | ||
|
||
cy.get( | ||
'[data-test-subj="events-viewer-panel"] [data-test-subj="server-side-event-count"]' | ||
).should('have.text', expectedNumberOfOpenedAlerts.toString()); | ||
cy.get('[data-test-subj="server-side-event-count"]').should( | ||
'have.text', | ||
expectedNumberOfOpenedAlerts.toString() | ||
); | ||
esArchiverUnload('alerts'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think these should go back into the |
||
}); | ||
}); | ||
|
||
it.skip('Closes one alert when more than one opened alerts are selected', () => { | ||
it('Closes one alert when more than one opened alerts are selected', () => { | ||
waitForAlertsToBeLoaded(); | ||
|
||
cy.get(ALERTS_COUNT) | ||
|
@@ -157,22 +157,20 @@ describe('Alerts', () => { | |
`Showing ${numberOfAlertsToBeClosed.toString()} alert` | ||
); | ||
cy.get(ALERTS).should('have.length', numberOfAlertsToBeClosed); | ||
esArchiverUnload('alerts'); | ||
}); | ||
}); | ||
}); | ||
|
||
context('Opening alerts', () => { | ||
beforeEach(() => { | ||
cleanKibana(); | ||
removeSignalsIndex(); | ||
esArchiverLoad('closed_alerts'); | ||
loginAndWaitForPage(DETECTIONS_URL); | ||
}); | ||
|
||
afterEach(() => { | ||
esArchiverUnload('closed_alerts'); | ||
removeSignalsIndex(); | ||
}); | ||
|
||
it.skip('Open one alert when more than one closed alerts are selected', () => { | ||
it('Open one alert when more than one closed alerts are selected', () => { | ||
waitForAlerts(); | ||
goToClosedAlerts(); | ||
waitForAlertsToBeLoaded(); | ||
|
@@ -209,12 +207,16 @@ describe('Alerts', () => { | |
`Showing ${numberOfAlertsToBeOpened.toString()} alert` | ||
); | ||
cy.get(ALERTS).should('have.length', numberOfAlertsToBeOpened); | ||
|
||
esArchiverUnload('closed_alerts'); | ||
}); | ||
}); | ||
}); | ||
|
||
context('Marking alerts as in-progress', () => { | ||
beforeEach(() => { | ||
cleanKibana(); | ||
removeSignalsIndex(); | ||
esArchiverLoad('alerts'); | ||
loginAndWaitForPage(DETECTIONS_URL); | ||
}); | ||
|
@@ -224,7 +226,7 @@ describe('Alerts', () => { | |
removeSignalsIndex(); | ||
}); | ||
|
||
it.skip('Mark one alert in progress when more than one open alerts are selected', () => { | ||
it('Mark one alert in progress when more than one open alerts are selected', () => { | ||
waitForAlerts(); | ||
waitForAlertsToBeLoaded(); | ||
|
||
|
@@ -259,6 +261,8 @@ describe('Alerts', () => { | |
`Showing ${numberOfAlertsToBeMarkedInProgress.toString()} alert` | ||
); | ||
cy.get(ALERTS).should('have.length', numberOfAlertsToBeMarkedInProgress); | ||
|
||
esArchiverUnload('closed_alerts'); | ||
}); | ||
}); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit of a tangent, but I just had a couple thoughts: