Skip to content

Commit

Permalink
[8.11] [Security Solution] Unskip prebuilt rules Cypress tests (#168165
Browse files Browse the repository at this point in the history
…) (#168292)

# Backport

This will backport the following commits from `main` to `8.11`:
- [[Security Solution] Unskip prebuilt rules Cypress tests
(#168165)](#168165)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Maxim
Palenov","email":"maxim.palenov@elastic.co"},"sourceCommit":{"committedDate":"2023-10-06T20:05:43Z","message":"[Security
Solution] Unskip prebuilt rules Cypress tests
(#168165)\n\n**Addresses:**
https://github.com/elastic/kibana/issues/161540\r\n\r\n##
Summary\r\n\r\nThis PR unskips preuilt rules Cypress tests (besides
`prebuilt_rules_install_update_authorization.cy.ts` as it uses non
default role).\r\n\r\n## Flaky test runner\r\n\r\n[prebuilt_rules folder
150
runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3384)
🟢","sha":"6c5603c95223f5ae9883195c7a5ed126513932c1","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","release_note:skip","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","v8.11.0","v8.12.0"],"number":168165,"url":"https://github.com/elastic/kibana/pull/168165","mergeCommit":{"message":"[Security
Solution] Unskip prebuilt rules Cypress tests
(#168165)\n\n**Addresses:**
https://github.com/elastic/kibana/issues/161540\r\n\r\n##
Summary\r\n\r\nThis PR unskips preuilt rules Cypress tests (besides
`prebuilt_rules_install_update_authorization.cy.ts` as it uses non
default role).\r\n\r\n## Flaky test runner\r\n\r\n[prebuilt_rules folder
150
runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3384)
🟢","sha":"6c5603c95223f5ae9883195c7a5ed126513932c1"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/168165","number":168165,"mergeCommit":{"message":"[Security
Solution] Unskip prebuilt rules Cypress tests
(#168165)\n\n**Addresses:**
https://github.com/elastic/kibana/issues/161540\r\n\r\n##
Summary\r\n\r\nThis PR unskips preuilt rules Cypress tests (besides
`prebuilt_rules_install_update_authorization.cy.ts` as it uses non
default role).\r\n\r\n## Flaky test runner\r\n\r\n[prebuilt_rules folder
150
runs](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3384)
🟢","sha":"6c5603c95223f5ae9883195c7a5ed126513932c1"}}]}] BACKPORT-->

Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
  • Loading branch information
kibanamachine and maximpn authored Oct 6, 2023
1 parent 702a93f commit b8dc9b4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { createRuleAssetSavedObject } from '../../../helpers/rules';
import { createAndInstallMockedPrebuiltRules } from '../../../tasks/api_calls/prebuilt_rules';
import { resetRulesTableState, deleteAlertsAndRules, reload } from '../../../tasks/common';
import { resetRulesTableState, deleteAlertsAndRules } from '../../../tasks/common';
import { login } from '../../../tasks/login';
import {
addElasticRulesButtonClick,
Expand All @@ -23,10 +23,9 @@ import {
} from '../../../tasks/prebuilt_rules';
import { visitRulesManagementTable } from '../../../tasks/rules_management';

// TODO: https://github.com/elastic/kibana/issues/161540
describe(
'Detection rules, Prebuilt Rules Installation and Update - Error handling',
{ tags: ['@ess', '@serverless', '@skipInServerless'] },
{ tags: ['@ess', '@serverless'] },
() => {
beforeEach(() => {
login();
Expand Down Expand Up @@ -111,7 +110,7 @@ describe(
rules: [UPDATED_RULE_1, UPDATED_RULE_2],
installToKibana: false,
});
reload();
cy.reload();
});

it('upgrading prebuilt rules one by one', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
getRuleAssets,
createAndInstallMockedPrebuiltRules,
} from '../../../tasks/api_calls/prebuilt_rules';
import { resetRulesTableState, deleteAlertsAndRules, reload } from '../../../tasks/common';
import { resetRulesTableState, deleteAlertsAndRules } from '../../../tasks/common';
import { login } from '../../../tasks/login';
import {
addElasticRulesButtonClick,
Expand All @@ -40,10 +40,9 @@ import {
} from '../../../tasks/prebuilt_rules';
import { visitRulesManagementTable } from '../../../tasks/rules_management';

// TODO: https://github.com/elastic/kibana/issues/161540
describe(
'Detection rules, Prebuilt Rules Installation and Update workflow',
{ tags: ['@ess', '@serverless', '@brokenInServerless'] },
{ tags: ['@ess', '@serverless'] },
() => {
beforeEach(() => {
login();
Expand Down Expand Up @@ -230,7 +229,7 @@ describe(
rules: [UPDATED_RULE_1, UPDATED_RULE_2],
installToKibana: false,
});
reload();
cy.reload();
});

it('should upgrade prebuilt rules one by one', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ const rules = Array.from(Array(5)).map((_, i) => {
});
});

// TODO: https://github.com/elastic/kibana/issues/161540
describe('Prebuilt rules', { tags: ['@ess', '@serverless', '@skipInServerless'] }, () => {
describe('Prebuilt rules', { tags: ['@ess', '@serverless'] }, () => {
before(() => {
cleanKibana();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
import {
resetRulesTableState,
deleteAlertsAndRules,
reload,
deletePrebuiltRulesAssets,
} from '../../../tasks/common';
import { login } from '../../../tasks/login';
Expand All @@ -30,10 +29,9 @@ const RULE_1 = createRuleAssetSavedObject({
rule_id: 'rule_1',
});

// TODO: https://github.com/elastic/kibana/issues/161540
describe(
'Detection rules, Prebuilt Rules Installation and Update Notifications',
{ tags: ['@ess', '@serverless', '@brokenInServerless'] },
{ tags: ['@ess', '@serverless'] },
() => {
beforeEach(() => {
login();
Expand Down Expand Up @@ -120,7 +118,7 @@ describe(
/* Install available rules, assert that the notification is gone */
/* then delete one rule and assert that the notification is back */
installAllPrebuiltRulesRequest().then(() => {
reload();
cy.reload();
deleteFirstRule();
cy.get(ADD_ELASTIC_RULES_BTN).should('be.visible');
cy.get(ADD_ELASTIC_RULES_BTN).should('have.text', `Add Elastic rules${1}`);
Expand All @@ -140,7 +138,7 @@ describe(
});
createAndInstallMockedPrebuiltRules({ rules: [UPDATED_RULE], installToKibana: false });
visitRulesManagementTable();
reload();
cy.reload();
});
});

Expand Down

0 comments on commit b8dc9b4

Please sign in to comment.