From ee3a555cf92db297e480022b215076f1a1c10c24 Mon Sep 17 00:00:00 2001 From: Julia Guskova Date: Thu, 10 Aug 2023 14:23:49 +0200 Subject: [PATCH] fix unit tests --- .../rules_list/components/rules_list_bulk_delete.test.tsx | 2 ++ .../rules_list/components/rules_list_bulk_disable.test.tsx | 1 + .../rules_list/components/rules_list_bulk_edit.test.tsx | 1 + .../rules_list/components/rules_list_bulk_enable.test.tsx | 1 + 4 files changed, 5 insertions(+) diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_delete.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_delete.test.tsx index 6debb7fe561c1..f5cf07b7d0dac 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_delete.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_delete.test.tsx @@ -92,6 +92,8 @@ jest.mock('../../../lib/capabilities', () => ({ jest.mock('../../../../common/get_experimental_features', () => ({ getIsExperimentalFeatureEnabled: jest.fn(), })); +jest.mock('@kbn/alerts-ui-shared', () => ({ MaintenanceWindowCallout: jest.fn(() => <>) })); + const { loadRuleAggregationsWithKueryFilter } = jest.requireMock( '../../../lib/rule_api/aggregate_kuery_filter' ); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_disable.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_disable.test.tsx index 0e6773ddd3092..1312c4a2b063b 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_disable.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_disable.test.tsx @@ -91,6 +91,7 @@ jest.mock('../../../../common/get_experimental_features', () => ({ jest.mock('../../../lib/rule_api/aggregate_kuery_filter', () => ({ loadRuleAggregationsWithKueryFilter: jest.fn(), })); +jest.mock('@kbn/alerts-ui-shared', () => ({ MaintenanceWindowCallout: jest.fn(() => <>) })); const { loadRuleAggregationsWithKueryFilter } = jest.requireMock( '../../../lib/rule_api/aggregate_kuery_filter' diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_edit.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_edit.test.tsx index 3e4f3cbbca0c6..80f74e02acc69 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_edit.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_edit.test.tsx @@ -90,6 +90,7 @@ jest.mock('../../../../common/get_experimental_features', () => ({ jest.mock('../../../lib/rule_api/aggregate_kuery_filter', () => ({ loadRuleAggregationsWithKueryFilter: jest.fn(), })); +jest.mock('@kbn/alerts-ui-shared', () => ({ MaintenanceWindowCallout: jest.fn(() => <>) })); const { loadRuleAggregationsWithKueryFilter } = jest.requireMock( '../../../lib/rule_api/aggregate_kuery_filter' diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_enable.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_enable.test.tsx index 9ca4d2b5a277d..51227392ea216 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_enable.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_enable.test.tsx @@ -91,6 +91,7 @@ jest.mock('../../../../common/get_experimental_features', () => ({ jest.mock('../../../lib/rule_api/aggregate_kuery_filter', () => ({ loadRuleAggregationsWithKueryFilter: jest.fn(), })); +jest.mock('@kbn/alerts-ui-shared', () => ({ MaintenanceWindowCallout: jest.fn(() => <>) })); const { loadRuleAggregationsWithKueryFilter } = jest.requireMock( '../../../lib/rule_api/aggregate_kuery_filter'