Skip to content

Commit

Permalink
fix types mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
maximpn committed Oct 11, 2022
1 parent b77479d commit d35d0d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import { buildEsQuery } from '@kbn/es-query';
import { BulkActionEditType } from '@kbn/security-solution-plugin/common/detection_engine/schemas/request';
import { BulkActionEditType } from '../../../../../common/detection_engine/schemas/request';
import { KibanaServices } from '../../../../common/lib/kibana';
import { getRulesSchemaMock } from '../../../../../common/detection_engine/schemas/response/rules_schema.mocks';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import { performBulkAction } from '../../../../containers/detection_engine/rules';
import { METRIC_TYPE, TELEMETRY_EVENT, track } from '../../../../../common/lib/telemetry';
import { BulkAction } from '../../../../../../common/detection_engine/schemas/request';

import { performTrackableBulkAction } from './actions';

Expand Down Expand Up @@ -59,13 +60,13 @@ describe('Rule Actions', () => {
});

test('sends enable action telemetry', async () => {
await performTrackableBulkAction('enable', 'some query');
await performTrackableBulkAction(BulkAction.enable, 'some query');

expect(track).toHaveBeenCalledWith(METRIC_TYPE.COUNT, TELEMETRY_EVENT.CUSTOM_RULE_ENABLED);
});

test('sends disable action telemetry', async () => {
await performTrackableBulkAction('disable', 'some query');
await performTrackableBulkAction(BulkAction.disable, 'some query');

expect(track).toHaveBeenCalledWith(METRIC_TYPE.COUNT, TELEMETRY_EVENT.CUSTOM_RULE_DISABLED);
});
Expand Down

0 comments on commit d35d0d3

Please sign in to comment.