-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[SecuritySolution] Move manual test cases to Cypress #100730
Conversation
@elasticmachine merge upstream |
@elasticmachine merge upstream |
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
@elasticmachine merge upstream |
x-pack/plugins/security_solution/cypress/integration/overview/overview.spec.ts
Show resolved
Hide resolved
x-pack/plugins/security_solution/cypress/integration/overview/overview.spec.ts
Show resolved
Hide resolved
cy.get(TIMELINE_COLLAPSED_ITEMS_BTN).first().click(); | ||
cy.get(TIMELINE_CREATE_TEMPLATE_FROM_TIMELINE_BTN).click({ force: true }); | ||
|
||
cy.wait('@timeline').then(({ request }) => { |
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.
Is there any reason why we are asserting the BE responses instead of checking on the UI that the template is there?
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.
As this involves opening up a modal on client side, I'm not sure if this would cause flakiness.
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.
But ok, I've added an additional check to see if timeline modal shows up.
|
||
it('should update timeline after adding eql', () => { | ||
cy.wait('@timeline').then(({ response }) => { | ||
expect(response!.body.data.persistTimeline.timeline.eqlOptions).to.haveOwnProperty( |
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.
Is there any reason why we are asserting the BE responses instead of checking on the UI?
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.
As on UI it just updates the timeline and refetches events, but I couldn't guarantee that matching events always exist, so I just check it updates timeline.
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.
I'll check the total events count appears under the table as well.
x-pack/plugins/security_solution/cypress/integration/timelines/correlation.spec.ts
Outdated
Show resolved
Hide resolved
|
||
cy.wait('@timeline').then(({ request }) => { | ||
expect(request.body.timeline).to.haveOwnProperty('description', timeline.description); | ||
expect(request.body.timeline.kqlQuery.filterQuery.kuery).to.haveOwnProperty( |
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.
Is there any reason why we are asserting the BE responses instead of checking on the UI?
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.
I'll check the UI and make sure timeline's modal appears.
x-pack/plugins/security_solution/cypress/integration/timelines/creation.spec.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/security_solution/cypress/integration/timeline_templates/creation.spec.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/security_solution/cypress/integration/timelines/full_screen.spec.ts
Show resolved
Hide resolved
x-pack/plugins/security_solution/cypress/integration/timelines/full_screen.spec.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/security_solution/cypress/integration/timeline_templates/creation.spec.ts
Outdated
Show resolved
Hide resolved
8333144
to
e0ce263
Compare
@elasticmachine merge upstream |
5d574c9
to
2047147
Compare
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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.
There are some pieces of code that probably can be refactored. But right now it makes more sense to have this merged to have more coverage on our automation side.
Lots of thanks for the work done here :)
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
* add scenarios 1-3 * add tests for toggle full screen * add tests for timeline pagination * add tests for timeline correlation tab * fix cypress tests * add data-test-subj for timeline tabs content * fix up * fix flaky tests * fix mark as favorite scenario * fix flaky test * fix flaky test * fix flaky test * refactors 'can be marked as favourite' test * fixes test * fixes typecheck issue * refactors the pipe * little fix * mark as favourite refactor * removes code that causes the flakiness * apply the fix for 7.13 branch * fix timeline api call * fix timeline api call * fix timeline api call * fix syntax Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Gloria Hornero <[email protected]>
* add scenarios 1-3 * add tests for toggle full screen * add tests for timeline pagination * add tests for timeline correlation tab * fix cypress tests * add data-test-subj for timeline tabs content * fix up * fix flaky tests * fix mark as favorite scenario * fix flaky test * fix flaky test * fix flaky test * refactors 'can be marked as favourite' test * fixes test * fixes typecheck issue * refactors the pipe * little fix * mark as favourite refactor * removes code that causes the flakiness * apply the fix for 7.13 branch * fix timeline api call * fix timeline api call * fix timeline api call * fix syntax Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Gloria Hornero <[email protected]> Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Gloria Hornero <[email protected]>
Summary
#100539
This PR is to move the manual tests scenarios to Cypress test.