diff --git a/x-pack/plugins/cases/public/components/create/custom_fields.test.tsx b/x-pack/plugins/cases/public/components/create/custom_fields.test.tsx
index 45fe037371b64..864ba68ff690a 100644
--- a/x-pack/plugins/cases/public/components/create/custom_fields.test.tsx
+++ b/x-pack/plugins/cases/public/components/create/custom_fields.test.tsx
@@ -16,8 +16,7 @@ import { customFieldsConfigurationMock } from '../../containers/mock';
import { CustomFields } from './custom_fields';
import * as i18n from './translations';
-// FLAKY: https://github.com/elastic/kibana/issues/176805
-describe.skip('CustomFields', () => {
+describe('CustomFields', () => {
let appMockRender: AppMockRenderer;
const onSubmit = jest.fn();
diff --git a/x-pack/plugins/cases/public/components/create/flyout/create_case_flyout.test.tsx b/x-pack/plugins/cases/public/components/create/flyout/create_case_flyout.test.tsx
index 2d0b86b142a14..ae41ae9ac2648 100644
--- a/x-pack/plugins/cases/public/components/create/flyout/create_case_flyout.test.tsx
+++ b/x-pack/plugins/cases/public/components/create/flyout/create_case_flyout.test.tsx
@@ -6,14 +6,30 @@
*/
import React from 'react';
-import { act } from '@testing-library/react';
+import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { CreateCaseFlyout } from './create_case_flyout';
import type { AppMockRenderer } from '../../../common/mock';
import { createAppMockRenderer } from '../../../common/mock';
+import { useGetTags } from '../../../containers/use_get_tags';
+import { useGetCaseConfiguration } from '../../../containers/configure/use_get_case_configuration';
+import { useGetSupportedActionConnectors } from '../../../containers/configure/use_get_supported_action_connectors';
+import { useAvailableCasesOwners } from '../../app/use_available_owners';
+import { connectorsMock } from '../../../containers/mock';
+import { useCaseConfigureResponse } from '../../configure_cases/__mock__';
+import { waitForComponentToUpdate } from '../../../common/test_utils';
-jest.mock('../../../common/lib/kibana');
+jest.mock('../../../containers/use_get_tags');
+jest.mock('../../../containers/configure/use_get_supported_action_connectors');
+jest.mock('../../../containers/configure/use_get_case_configuration');
+jest.mock('../../markdown_editor/plugins/lens/use_lens_draft_comment');
+jest.mock('../../app/use_available_owners');
+
+const useGetTagsMock = useGetTags as jest.Mock;
+const useGetConnectorsMock = useGetSupportedActionConnectors as jest.Mock;
+const useGetCaseConfigurationMock = useGetCaseConfiguration as jest.Mock;
+const useAvailableOwnersMock = useAvailableCasesOwners as jest.Mock;
const onClose = jest.fn();
const onSuccess = jest.fn();
@@ -23,49 +39,49 @@ const defaultProps = {
owner: 'securitySolution',
};
-// FLAKY: https://github.com/elastic/kibana/issues/174525
-// FLAKY: https://github.com/elastic/kibana/issues/174526
-// FLAKY: https://github.com/elastic/kibana/issues/174527
-// FLAKY: https://github.com/elastic/kibana/issues/174528
-describe.skip('CreateCaseFlyout', () => {
- let mockedContext: AppMockRenderer;
+describe('CreateCaseFlyout', () => {
+ let appMockRenderer: AppMockRenderer;
+
beforeEach(() => {
- mockedContext = createAppMockRenderer();
jest.clearAllMocks();
+ appMockRenderer = createAppMockRenderer();
+ useAvailableOwnersMock.mockReturnValue(['securitySolution', 'observability']);
+ useGetTagsMock.mockReturnValue({ data: ['test'] });
+ useGetConnectorsMock.mockReturnValue({ isLoading: false, data: connectorsMock });
+ useGetCaseConfigurationMock.mockImplementation(() => useCaseConfigureResponse);
});
it('renders', async () => {
- const { getByTestId } = mockedContext.render(