kibana
kibana copied to clipboard
[Entity Analytics] Remove before and after hooks from Cypress tests
Relates to:
https://github.com/elastic/kibana/issues/173327 https://github.com/elastic/kibana/issues/174247
Get rid of the before
and after
hooks in favor of the beforeEach
and afterEach
hooks. Or at least make sure that the code executed in the before and after hook is not prone to fail (i.e. es_archiver).
Pinging @elastic/security-solution (Team: SecuritySolution)
Pinging @elastic/security-entity-analytics (Team:Entity Analytics)
👋 Hey there @MadameSheema! Is there a list of test cases that need to have this change made? If not, I'll get with the team to assess how many instances of this we have within Entity Analytics tests.
Additionally, do we have a timeline for when we want this completed for the second quality gate?
Edit: missed that this is only relevant for cypress tests 🤦 so no need for tasks
currently these are the files I found based on our code ownership, going to split into 2 subtasks, one for cypress and one for integration
## integration
x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/asset_criticality_privileges.ts
x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_engine_privileges.ts
x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_score_calculation.ts
x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_score_preview.ts
x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_scoring_task/task_execution.ts
x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_scoring_task/task_execution_nondefault_spaces.ts
x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/telemetry_usage.ts
## cypress
x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/entity_analytics.cy.ts
x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/upgrade_risk_score.cy.ts
x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/enrichments.cy.ts
x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts
x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_flyout.cy.ts
x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/host_details/risk_tab.cy.ts
x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/host_risk_tab.cy.ts
x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/hosts_risk_column.cy.ts
@MadameSheema could you confirm if we should do the same for FTR tests, or only for Cypress? (regarding @hop-dev 's comment above)
@MadameSheema could you confirm if we should do the same for FTR tests, or only for Cypress? (regarding @hop-dev 's https://github.com/elastic/kibana/issues/175023#issuecomment-1943494281)
Cypress :)
PR ready just runnning flaky test runner https://github.com/elastic/kibana/pull/177175
Only very small changes were needed, we primarily used only the archiver in our before and after calls.