[Defend Workflows] Enable Endpoint Automated Actions feature flag (#159733)

This commit is contained in:
Tomasz Ciecierski 2023-06-15 14:51:02 +02:00 committed by GitHub
parent 31c51e3f84
commit c37be07479
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View file

@ -59,7 +59,7 @@ export const allowedExperimentalValues = Object.freeze({
/**
* Enables the automated endpoint response action in rule + alerts
*/
endpointResponseActionsEnabled: false,
endpointResponseActionsEnabled: true,
/**
* Enables the alert details page currently only accessible via the alert details flyout and alert table context menu

View file

@ -28,7 +28,9 @@ import { TimelineTabs } from '../../../../common/types/timeline';
import { useInvestigationTimeEnrichment } from '../../containers/cti/event_enrichment';
import { useGetUserCasesPermissions, useKibana } from '../../lib/kibana';
import { defaultRowRenderers } from '../../../timelines/components/timeline/body/renderers';
import { useIsExperimentalFeatureEnabled } from '../../hooks/use_experimental_features';
jest.mock('../../hooks/use_experimental_features');
jest.mock('../../../timelines/components/timeline/body/renderers', () => {
return {
defaultRowRenderers: [
@ -198,6 +200,18 @@ describe('EventDetails', () => {
});
describe('osquery tab', () => {
let featureFlags: { endpointResponseActionsEnabled: boolean; responseActionsEnabled: boolean };
beforeEach(() => {
featureFlags = { endpointResponseActionsEnabled: false, responseActionsEnabled: true };
const useIsExperimentalFeatureEnabledMock = (feature: keyof typeof featureFlags) =>
featureFlags[feature];
(useIsExperimentalFeatureEnabled as jest.Mock).mockImplementation(
useIsExperimentalFeatureEnabledMock
);
});
it('should not be rendered if not provided with specific raw data', () => {
expect(alertsWrapper.find('[data-test-subj="osqueryViewTab"]').exists()).toEqual(false);
});