mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
[8.10] [Security Solution] Fix flakiness in: prebuilt_rules_management.cy.ts
- Deletes and recovers more than one rule (#164694) (#164961)
# Backport This will backport the following commits from `main` to `8.10`: - [[Security Solution] Fix flakiness in: `prebuilt_rules_management.cy.ts` - Deletes and recovers more than one rule (#164694)](https://github.com/elastic/kibana/pull/164694) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Juan Pablo Djeredjian","email":"jpdjeredjian@gmail.com"},"sourceCommit":{"committedDate":"2023-08-28T11:02:22Z","message":"[Security Solution] Fix flakiness in: `prebuilt_rules_management.cy.ts` - Deletes and recovers more than one rule (#164694)\n\nRelates to: https://github.com/elastic/kibana/issues/161507\r\n\r\n## Summary\r\n\r\n- Solves flakiness in following test:\r\n- Filename:\r\n`x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules/prebuilt_rules_management.cy.ts`\r\n- Test name: **Prebuilt rules Actions with prebuilt rules Rules table\r\nDeletes and recovers more than one rule**\r\n\r\n- Test was failing because of already observed issue of `autoRefresh`\r\ntaking place while the rule selection is happening, causing Cypress to\r\nlose focus and preventing the checkbox from being checked. This PR\r\ndisables autorefresh from the table to prevent that from happening.\r\n\r\n## Flaky test runner\r\n\r\n350 iters:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2976\r\n🟢","sha":"e22f9b860e6d62ddcaacae6a1b2f57178afa8e54","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","release_note:skip","Team:Detections and Resp","Team: SecuritySolution","Feature:Rule Management","Team:Detection Rule Management","v8.10.0","v8.11.0"],"number":164694,"url":"https://github.com/elastic/kibana/pull/164694","mergeCommit":{"message":"[Security Solution] Fix flakiness in: `prebuilt_rules_management.cy.ts` - Deletes and recovers more than one rule (#164694)\n\nRelates to: https://github.com/elastic/kibana/issues/161507\r\n\r\n## Summary\r\n\r\n- Solves flakiness in following test:\r\n- Filename:\r\n`x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules/prebuilt_rules_management.cy.ts`\r\n- Test name: **Prebuilt rules Actions with prebuilt rules Rules table\r\nDeletes and recovers more than one rule**\r\n\r\n- Test was failing because of already observed issue of `autoRefresh`\r\ntaking place while the rule selection is happening, causing Cypress to\r\nlose focus and preventing the checkbox from being checked. This PR\r\ndisables autorefresh from the table to prevent that from happening.\r\n\r\n## Flaky test runner\r\n\r\n350 iters:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2976\r\n🟢","sha":"e22f9b860e6d62ddcaacae6a1b2f57178afa8e54"}},"sourceBranch":"main","suggestedTargetBranches":["8.10"],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/164694","number":164694,"mergeCommit":{"message":"[Security Solution] Fix flakiness in: `prebuilt_rules_management.cy.ts` - Deletes and recovers more than one rule (#164694)\n\nRelates to: https://github.com/elastic/kibana/issues/161507\r\n\r\n## Summary\r\n\r\n- Solves flakiness in following test:\r\n- Filename:\r\n`x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules/prebuilt_rules_management.cy.ts`\r\n- Test name: **Prebuilt rules Actions with prebuilt rules Rules table\r\nDeletes and recovers more than one rule**\r\n\r\n- Test was failing because of already observed issue of `autoRefresh`\r\ntaking place while the rule selection is happening, causing Cypress to\r\nlose focus and preventing the checkbox from being checked. This PR\r\ndisables autorefresh from the table to prevent that from happening.\r\n\r\n## Flaky test runner\r\n\r\n350 iters:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2976\r\n🟢","sha":"e22f9b860e6d62ddcaacae6a1b2f57178afa8e54"}}]}] BACKPORT--> Co-authored-by: Juan Pablo Djeredjian <jpdjeredjian@gmail.com>
This commit is contained in:
parent
f463db36ae
commit
41f48a6a2f
1 changed files with 4 additions and 0 deletions
|
@ -20,6 +20,7 @@ import {
|
|||
} from '../../../screens/alerts_detection_rules';
|
||||
import {
|
||||
deleteFirstRule,
|
||||
disableAutoRefresh,
|
||||
getRulesManagementTableRows,
|
||||
selectAllRules,
|
||||
selectRulesByName,
|
||||
|
@ -34,6 +35,7 @@ import {
|
|||
import {
|
||||
createAndInstallMockedPrebuiltRules,
|
||||
getAvailablePrebuiltRulesCount,
|
||||
preventPrebuiltRulesPackageInstallation,
|
||||
} from '../../../tasks/api_calls/prebuilt_rules';
|
||||
import {
|
||||
cleanKibana,
|
||||
|
@ -59,10 +61,12 @@ describe('Prebuilt rules', { tags: [tag.ESS, tag.SERVERLESS] }, () => {
|
|||
login();
|
||||
deleteAlertsAndRules();
|
||||
deletePrebuiltRulesAssets();
|
||||
preventPrebuiltRulesPackageInstallation();
|
||||
visitWithoutDateRange(DETECTIONS_RULE_MANAGEMENT_URL);
|
||||
createAndInstallMockedPrebuiltRules({ rules });
|
||||
cy.reload();
|
||||
waitForPrebuiltDetectionRulesToBeLoaded();
|
||||
disableAutoRefresh();
|
||||
});
|
||||
|
||||
describe('Alerts rules, prebuilt rules', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue