[Security Solution] Fixes flaky Cypres test rules_table_selection·cy·ts by disabling auto refresh (#171414)

Fixes: https://github.com/elastic/kibana/issues/164279

## Summary

- Fixes flake reported in `x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_selection·cy·ts`.
- `selectNumberOfRules` helper is known to fail when the focus on a checkbox is lost due to reordering of the rules table due to an autorefresh taking place.
- This PRs disables autorefresh to prevent that.

## Flaky test runner

- https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4015

## For maintainers

- [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
This commit is contained in:
Juan Pablo Djeredjian 2023-11-17 10:27:06 +01:00 committed by GitHub
parent 1287676876
commit d727eae163
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,6 +12,7 @@ import {
SELECT_ALL_RULES_ON_PAGE_CHECKBOX,
} from '../../../../screens/alerts_detection_rules';
import {
disableAutoRefresh,
selectRulesByName,
unselectRulesByName,
waitForPrebuiltDetectionRulesToBeLoaded,
@ -43,6 +44,7 @@ describe(
createAndInstallMockedPrebuiltRules([RULE_1, RULE_2]);
visit(RULES_MANAGEMENT_URL);
waitForPrebuiltDetectionRulesToBeLoaded();
disableAutoRefresh();
});
it('should correctly update the selection label when rules are individually selected and unselected', () => {