diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/flow_target_select_connected/index.test.tsx b/x-pack/legacy/plugins/siem/public/components/page/network/flow_target_select_connected/index.test.tsx
index 006587d8fc294..e71be5a51e505 100644
--- a/x-pack/legacy/plugins/siem/public/components/page/network/flow_target_select_connected/index.test.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/page/network/flow_target_select_connected/index.test.tsx
@@ -6,27 +6,37 @@
import { mount } from 'enzyme';
import React from 'react';
+import { MemoryRouter } from 'react-router-dom';
import { TestProviders } from '../../../../mock';
-import { FlowTargetSelectConnected } from './index';
+import { FlowTargetSelectConnectedComponent } from './index';
import { FlowTarget } from '../../../../graphql/types';
-describe.skip('Flow Target Select Connected', () => {
+describe('Flow Target Select Connected', () => {
test('renders correctly against snapshot flowTarget source', () => {
const wrapper = mount(
-
+
+
+
);
- expect(wrapper.find('FlowTargetSelectConnected')).toMatchSnapshot();
+ expect(wrapper.find('Memo(FlowTargetSelectComponent)').prop('selectedTarget')).toEqual(
+ FlowTarget.source
+ );
});
test('renders correctly against snapshot flowTarget destination', () => {
const wrapper = mount(
-
+
+
+
);
- expect(wrapper.find('FlowTargetSelectConnected')).toMatchSnapshot();
+
+ expect(wrapper.find('Memo(FlowTargetSelectComponent)').prop('selectedTarget')).toEqual(
+ FlowTarget.destination
+ );
});
});
diff --git a/x-pack/legacy/plugins/siem/public/components/page/network/flow_target_select_connected/index.tsx b/x-pack/legacy/plugins/siem/public/components/page/network/flow_target_select_connected/index.tsx
index 1b87c36902159..2651c31e0a2c9 100644
--- a/x-pack/legacy/plugins/siem/public/components/page/network/flow_target_select_connected/index.tsx
+++ b/x-pack/legacy/plugins/siem/public/components/page/network/flow_target_select_connected/index.tsx
@@ -36,7 +36,7 @@ const getUpdatedFlowTargetPath = (
return `${newPathame}${location.search}`;
};
-const FlowTargetSelectConnectedComponent: React.FC = ({ flowTarget }) => {
+export const FlowTargetSelectConnectedComponent: React.FC = ({ flowTarget }) => {
const history = useHistory();
const location = useLocation();