Skip to content

Commit

Permalink
Add ML rules to Basic/Essentials workflow tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rylnd committed Jun 28, 2024
1 parent 98ac972 commit d152289
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ import { login } from '../../../../tasks/login';
import { visit } from '../../../../tasks/navigation';
import {
ALERT_SUPPRESSION_FIELDS_INPUT,
MACHINE_LEARNING_TYPE,
THRESHOLD_ENABLE_SUPPRESSION_CHECKBOX,
} from '../../../../screens/create_new_rule';
import { CREATE_RULE_URL } from '../../../../urls/navigation';

describe(
'Detection rules, Alert Suppression for Essentials tier',
{
// skipped in MKI as it depends on feature flag alertSuppressionForEsqlRuleEnabled
// skipped in MKI as it depends on feature flag alertSuppressionForEsqlRuleEnabled, alertSuppressionForMachineLearningRuleEnabled
tags: ['@serverless', '@skipInServerlessMKI'],
env: {
ftrConfig: {
Expand All @@ -35,6 +36,7 @@ describe(
kbnServerArgs: [
`--xpack.securitySolution.enableExperimental=${JSON.stringify([
'alertSuppressionForEsqlRuleEnabled',
'alertSuppressionForMachineLearningRuleEnabled',
])}`,
],
},
Expand All @@ -60,6 +62,9 @@ describe(

selectEsqlRuleType();
cy.get(ALERT_SUPPRESSION_FIELDS_INPUT).should('be.enabled');

// ML Rules require Complete tier
cy.get(MACHINE_LEARNING_TYPE).get('button').should('be.disabled');
});
}
);
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import {
THRESHOLD_ENABLE_SUPPRESSION_CHECKBOX,
ALERT_SUPPRESSION_DURATION_INPUT,
MACHINE_LEARNING_TYPE,
} from '../../../../screens/create_new_rule';

import {
Expand All @@ -16,6 +17,7 @@ import {
selectThresholdRuleType,
selectEsqlRuleType,
openSuppressionFieldsTooltipAndCheckLicense,
selectMachineLearningRuleType,
} from '../../../../tasks/create_new_rule';
import { startBasicLicense } from '../../../../tasks/api_calls/licensing';
import { login } from '../../../../tasks/login';
Expand Down Expand Up @@ -52,6 +54,9 @@ describe(
selectEsqlRuleType();
openSuppressionFieldsTooltipAndCheckLicense();

// ML Rules require Platinum license
cy.get(MACHINE_LEARNING_TYPE).get('button').should('be.disabled');

selectThresholdRuleType();
cy.get(THRESHOLD_ENABLE_SUPPRESSION_CHECKBOX).should('be.disabled');
cy.get(THRESHOLD_ENABLE_SUPPRESSION_CHECKBOX).parent().trigger('mouseover');
Expand Down

0 comments on commit d152289

Please sign in to comment.