Skip to content
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

Failing test: Security Solution Cypress.x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/entity_analytics·cy·ts - Entity Analytics Dashboard legacy risk score With user risk data filters by risk level filters by risk level #173846

Closed
kibanamachine opened this issue Dec 21, 2023 · 4 comments · Fixed by #173970
Assignees
Labels
blocker failed-test A test failure on a tracked branch, potentially flaky-test skipped-test Team:Entity Analytics Security Entity Analytics Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. triage_needed v8.13.0

Comments

@kibanamachine
Copy link
Contributor

kibanamachine commented Dec 21, 2023

A test failed on a tracked branch

AssertionError: Timed out retrying after 150000ms: Expected to find element: `[data-test-subj="risk-filter-item-Low"]`, but never found it.
    at openRiskTableFilterAndSelectTheLowOption (webpack:///./tasks/host_risk.ts:30:5)
    at Context.eval (webpack:///./e2e/entity_analytics/dashboards/entity_analytics.cy.ts:256:49)

First failure: CI Build - main

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Dec 21, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Dec 21, 2023
@MadameSheema MadameSheema added the Team:Entity Analytics Security Entity Analytics Team label Dec 21, 2023
@botelastic botelastic bot removed the needs-team Issues missing a team label label Dec 21, 2023
@MadameSheema MadameSheema added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label Dec 21, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@jaredburgettelastic
Copy link
Contributor

👀

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@mistic
Copy link
Member

mistic commented Dec 22, 2023

Skipped.

main: 5f7a79e

jaredburgettelastic added a commit that referenced this issue Dec 27, 2023
## Summary

This PR fixes two flaky tests within the Entity Analytics dashboard
pages.

Resolves #173871 
Resolves #173846.

I was able to reproduce this issue locally by running the tests 10 times
in succession, and found that they fail even locally ~10% of the time.
After implementing this fix, I have been unable to reproduce the issue
locally again.

**Flaky test runner, with x200 iterations, all passing:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4676#_**

## The Fix

Previously, the dashboard tests in question would attempt to click the
"User/Host Risk Level" filter button immediately upon opening the page.
In some circumstances, that click would fire before that respective
user/host panel was fully loaded, even though the component was
available. This would prevent the popover from showing up (see
screenshot below for what the popover is **supposed** to look like).

Therefore, the fix was to simply ensure that the user/host panel has
been fully loaded beforehand. We already do this in other tests by
checking if the inner table has been loaded, and I followed suit in this
case as well. This is also a very appropriate prerequisite for these
tests, because the purpose of the test is to check whether we can filter
data in that table.

<img width="891" alt="Screenshot 2023-12-26 at 4 05 53 PM"
src="https://github.com/elastic/kibana/assets/147995946/e776dc76-22be-443d-8a4e-41740ea6e7c6">


### Checklist

- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker failed-test A test failure on a tracked branch, potentially flaky-test skipped-test Team:Entity Analytics Security Entity Analytics Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. triage_needed v8.13.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants