Skip to content

Commit

Permalink
few more fix
Browse files Browse the repository at this point in the history
  • Loading branch information
stephmilovic committed Sep 25, 2020
1 parent 663c374 commit 6937bec
Show file tree
Hide file tree
Showing 41 changed files with 127 additions and 144 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import { usePostComment } from '../../containers/use_post_comment';
import { useForm } from '../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form';
import { useFormData } from '../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form_data';

// we don't have the types for waitFor just yet, so using "as waitFor" until when we do
import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';

jest.mock(
'../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import React from 'react';
import { mount } from 'enzyme';
import moment from 'moment-timezone';
import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';
import '../../../common/mock/match_media';
import { AllCases } from '.';
import { TestProviders } from '../../../common/mock';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
import { mount } from 'enzyme';
import React from 'react';
import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';
import '../../../common/mock/match_media';
import { AllCasesModal } from '.';
import { TestProviders } from '../../../common/mock';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ import { TestProviders } from '../../../common/mock';
import { useUpdateCase } from '../../containers/use_update_case';
import { useGetCase } from '../../containers/use_get_case';
import { useGetCaseUserActions } from '../../containers/use_get_case_user_actions';
// we don't have the types for waitFor just yet, so using "as waitFor" until when we do
import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';

import { useConnectors } from '../../containers/configure/use_connectors';
import { connectorsMock } from '../../containers/configure/mock';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ import { useGetTags } from '../../containers/use_get_tags';
import { useForm } from '../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form';
import { useFormData } from '../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form_data';

// we don't have the types for waitFor just yet, so using "as waitFor" until when we do
import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';

jest.mock('@elastic/eui', () => {
const original = jest.requireActual('@elastic/eui');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import { EditConnector } from './index';
import { getFormMock, useFormMock } from '../__mock__/form';
import { TestProviders } from '../../../common/mock';
import { connectorsMock } from '../../containers/configure/mock';
// we don't have the types for waitFor just yet, so using "as waitFor" until when we do
import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';

jest.mock(
'../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import { mount } from 'enzyme';
import { TagList } from '.';
import { getFormMock } from '../__mock__/form';
import { TestProviders } from '../../../common/mock';
// we don't have the types for waitFor just yet, so using "as waitFor" until when we do
import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';
import { useForm } from '../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_form';
import { useGetTags } from '../../containers/use_get_tags';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import React from 'react';
import { mount } from 'enzyme';
import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';

import { Router, routeData, mockHistory, mockLocation } from '../__mock__/router';
import { getFormMock, useFormMock, useFormDataMock } from '../__mock__/form';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { mount, shallow } from 'enzyme';
import React from 'react';
import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';
import {
apolloClientObservable,
mockGlobalState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import { ThemeProvider } from 'styled-components';
import { mount } from 'enzyme';
import euiLightVars from '@elastic/eui/dist/eui_theme_light.json';
import { EuiComboBox, EuiComboBoxOptionOption } from '@elastic/eui';
// we don't have the types for waitFor just yet, so using "as waitFor" until when we do
import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';

import { getField } from '../../../../../../../src/plugins/data/common/index_patterns/fields/fields.mocks';
import { ListSchema } from '../../../lists_plugin_deps';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { shallow } from 'enzyme';
import React from 'react';
import { DraggableStateSnapshot, DraggingStyle } from 'react-beautiful-dnd';
import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';
import '../../mock/match_media';
import { mockBrowserFields } from '../../containers/source/mock';
import { TestProviders } from '../../mock';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import React from 'react';
import useResizeObserver from 'use-resize-observer/polyfilled';

import '../../mock/match_media';
// we don't have the types for waitFor just yet, so using "as waitFor" until when we do
import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';
import { TestProviders } from '../../mock';
import { useMountAppended } from '../../utils/use_mount_appended';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import React from 'react';
import { ThemeProvider } from 'styled-components';
import { mount, ReactWrapper } from 'enzyme';
import euiLightVars from '@elastic/eui/dist/eui_theme_light.json';
import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';

import { AddExceptionModal } from './';
import { useCurrentUser } from '../../../../common/lib/kibana';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import React from 'react';
import { ThemeProvider } from 'styled-components';
import { mount } from 'enzyme';
import euiLightVars from '@elastic/eui/dist/eui_theme_light.json';
import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';

import {
fields,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import React from 'react';
import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';
import { ThemeProvider } from 'styled-components';
import { mount, ReactWrapper } from 'enzyme';
import euiLightVars from '@elastic/eui/dist/eui_theme_light.json';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { shallow, mount } from 'enzyme';
import React from 'react';

import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';
import { JobSwitchComponent } from './job_switch';
import { cloneDeep } from 'lodash/fp';
import { mockSecurityJobs } from '../api.mock';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { shallow, mount } from 'enzyme';
import React from 'react';
import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';
import { JobsTableComponent } from './jobs_table';
import { mockSecurityJobs } from '../api.mock';
import { cloneDeep } from 'lodash/fp';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { mount } from 'enzyme';
import React from 'react';
import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';
import { coreMock } from '../../../../../../../src/core/public/mocks';
import { DEFAULT_FROM, DEFAULT_TO } from '../../../../common/constants';
import { TestProviders, mockIndexPattern } from '../../mock';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
} from '../../mock';
import { createStore, State } from '../../store';
import { EuiComboBox, EuiComboBoxOptionOption } from '@elastic/eui';
import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';

const mockDispatch = jest.fn();
jest.mock('react-redux', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { mount, ReactWrapper } from 'enzyme';
import React from 'react';
import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';
import '../../mock/match_media';
import { mockBrowserFields } from '../../containers/source/mock';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { mount, ReactWrapper } from 'enzyme';
import React from 'react';
import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';
import '../../mock/match_media';
import { TestProviders, mockIndexPattern } from '../../mock';
import { setAbsoluteRangeDatePicker } from '../../store/inputs/actions';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ import {
} from './test_dependencies';
import { UrlStateContainerPropTypes } from './types';
import { useUrlStateHooks } from './use_url_state';
// we don't have the types for waitFor just yet, so using "as waitFor" until when we do
import { wait as waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';

let mockProps: UrlStateContainerPropTypes;

Expand Down
Loading

0 comments on commit 6937bec

Please sign in to comment.