mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Cases] Fix failing test: useCreateCaseModal
(#181386)
Fixes #174205 ## Summary The failing test was rendering the opened modal and not doing anything with it. I removed that block and the execution time locally went from 200+ ms to around 4.
This commit is contained in:
parent
910e7f7252
commit
e2c39c93ac
1 changed files with 1 additions and 11 deletions
|
@ -7,7 +7,6 @@
|
|||
|
||||
import React from 'react';
|
||||
import { renderHook, act } from '@testing-library/react-hooks';
|
||||
import { render, act as reactAct } from '@testing-library/react';
|
||||
|
||||
import { useKibana } from '../../common/lib/kibana';
|
||||
import type { UseCreateCaseModalProps, UseCreateCaseModalReturnedValues } from '.';
|
||||
|
@ -19,8 +18,7 @@ jest.mock('../../common/lib/kibana');
|
|||
const useKibanaMock = useKibana as jest.Mocked<typeof useKibana>;
|
||||
const onCaseCreated = jest.fn();
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/174205
|
||||
describe.skip('useCreateCaseModal', () => {
|
||||
describe('useCreateCaseModal', () => {
|
||||
let navigateToApp: jest.Mock;
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -95,14 +93,6 @@ describe.skip('useCreateCaseModal', () => {
|
|||
|
||||
act(() => {
|
||||
result.current.openModal();
|
||||
});
|
||||
|
||||
await reactAct(async () => {
|
||||
const modal = result.current.modal;
|
||||
render(<TestProviders>{modal}</TestProviders>);
|
||||
});
|
||||
|
||||
act(() => {
|
||||
result.current.modal.props.onSuccess({ id: 'case-id' });
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue