mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
chore(NA): splits types from code on @kbn/test (#124469)
* chore(NA): splits types from code on @kbn/test * chore(NA): create new @kbn/test-jest-helpers * chore(NA): move wrong files into @kbn/test * chore(NA): remove @kbn/test/jest references Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
cc0380a461
commit
a5b4b822ce
680 changed files with 971 additions and 687 deletions
|
@ -475,6 +475,7 @@
|
|||
"@kbn/storybook": "link:bazel-bin/packages/kbn-storybook",
|
||||
"@kbn/telemetry-tools": "link:bazel-bin/packages/kbn-telemetry-tools",
|
||||
"@kbn/test": "link:bazel-bin/packages/kbn-test",
|
||||
"@kbn/test-jest-helpers": "link:bazel-bin/packages/kbn-test-jest-helpers",
|
||||
"@kbn/test-subj-selector": "link:bazel-bin/packages/kbn-test-subj-selector",
|
||||
"@loaders.gl/polyfills": "^2.3.5",
|
||||
"@mapbox/vector-tile": "1.3.1",
|
||||
|
@ -611,6 +612,8 @@
|
|||
"@types/kbn__std": "link:bazel-bin/packages/kbn-std/npm_module_types",
|
||||
"@types/kbn__storybook": "link:bazel-bin/packages/kbn-storybook/npm_module_types",
|
||||
"@types/kbn__telemetry-tools": "link:bazel-bin/packages/kbn-telemetry-tools/npm_module_types",
|
||||
"@types/kbn__test": "link:bazel-bin/packages/kbn-test/npm_module_types",
|
||||
"@types/kbn__test-jest-helpers": "link:bazel-bin/packages/kbn-test-jest-helpers/npm_module_types",
|
||||
"@types/kbn__ui-shared-deps-npm": "link:bazel-bin/packages/kbn-ui-shared-deps-npm/npm_module_types",
|
||||
"@types/kbn__ui-shared-deps-src": "link:bazel-bin/packages/kbn-ui-shared-deps-src/npm_module_types",
|
||||
"@types/kbn__ui-theme": "link:bazel-bin/packages/kbn-ui-theme/npm_module_types",
|
||||
|
|
|
@ -61,6 +61,7 @@ filegroup(
|
|||
"//packages/kbn-storybook:build",
|
||||
"//packages/kbn-telemetry-tools:build",
|
||||
"//packages/kbn-test:build",
|
||||
"//packages/kbn-test-jest-helpers:build",
|
||||
"//packages/kbn-test-subj-selector:build",
|
||||
"//packages/kbn-timelion-grammar:build",
|
||||
"//packages/kbn-tinymath:build",
|
||||
|
@ -126,6 +127,8 @@ filegroup(
|
|||
"//packages/kbn-std:build_types",
|
||||
"//packages/kbn-storybook:build_types",
|
||||
"//packages/kbn-telemetry-tools:build_types",
|
||||
"//packages/kbn-test:build_types",
|
||||
"//packages/kbn-test-jest-helpers:build_types",
|
||||
"//packages/kbn-ui-shared-deps-npm:build_types",
|
||||
"//packages/kbn-ui-shared-deps-src:build_types",
|
||||
"//packages/kbn-ui-theme:build_types",
|
||||
|
|
|
@ -96,6 +96,11 @@ module.exports = {
|
|||
to: false,
|
||||
disallowedMessage: `Use "@kbn/ui-theme" to access theme vars.`
|
||||
})),
|
||||
{
|
||||
from: '@kbn/test/jest',
|
||||
to: '@kbn/test-jest-helpers',
|
||||
disallowedMessage: `import from @kbn/test-jest-helpers instead`
|
||||
},
|
||||
],
|
||||
],
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ RUNTIME_DEPS = [
|
|||
|
||||
TYPES_DEPS = [
|
||||
"//packages/kbn-dev-utils:npm_module_types",
|
||||
"//packages/kbn-test",
|
||||
"//packages/kbn-test:npm_module_types",
|
||||
"//packages/kbn-utils:npm_module_types",
|
||||
"@npm//@elastic/elasticsearch",
|
||||
"@npm//aggregate-error",
|
||||
|
|
|
@ -506,7 +506,7 @@ Testing React component that uses the `injectI18n` higher-order component is mor
|
|||
|
||||
With shallow rendering only top level component is rendered, that is a wrapper itself, not the original component. Since we want to test the rendering of the original component, we need to access it via the wrapper's `WrappedComponent` property. Its value will be the component we passed into `injectI18n()`.
|
||||
|
||||
When testing such component, use the `shallowWithIntl` helper function defined in `@kbn/test/jest` and pass the component's `WrappedComponent` property to render the wrapped component. This will shallow render the component with Enzyme and inject the necessary context and props to use the `intl` mock defined in `test_utils/mocks/intl`.
|
||||
When testing such component, use the `shallowWithIntl` helper function defined in `@kbn/test-jest-helpers` and pass the component's `WrappedComponent` property to render the wrapped component. This will shallow render the component with Enzyme and inject the necessary context and props to use the `intl` mock defined in `test_utils/mocks/intl`.
|
||||
|
||||
Use the `mountWithIntl` helper function to mount render the component.
|
||||
|
||||
|
|
182
packages/kbn-test-jest-helpers/BUILD.bazel
Normal file
182
packages/kbn-test-jest-helpers/BUILD.bazel
Normal file
|
@ -0,0 +1,182 @@
|
|||
load("@npm//@bazel/typescript:index.bzl", "ts_config")
|
||||
load("@npm//@babel/cli:index.bzl", "babel")
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
|
||||
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project")
|
||||
|
||||
PKG_BASE_NAME = "kbn-test-jest-helpers"
|
||||
PKG_REQUIRE_NAME = "@kbn/test-jest-helpers"
|
||||
TYPES_PKG_REQUIRE_NAME = "@types/kbn__test-jest-helpers"
|
||||
|
||||
SOURCE_FILES = glob(
|
||||
[
|
||||
"src/**/*"
|
||||
],
|
||||
exclude = [
|
||||
"**/*.test.*",
|
||||
"**/*.snap",
|
||||
"**/__fixture__/**",
|
||||
"**/__fixtures__/**",
|
||||
"**/__snapshots__/**",
|
||||
]
|
||||
)
|
||||
|
||||
SRCS = SOURCE_FILES
|
||||
|
||||
filegroup(
|
||||
name = "srcs",
|
||||
srcs = SRCS,
|
||||
)
|
||||
|
||||
NPM_MODULE_EXTRA_FILES = [
|
||||
"jest.config.js",
|
||||
"package.json",
|
||||
]
|
||||
|
||||
RUNTIME_DEPS = [
|
||||
"//packages/kbn-dev-utils",
|
||||
"//packages/kbn-i18n-react",
|
||||
"//packages/kbn-std",
|
||||
"//packages/kbn-utils",
|
||||
"@npm//@elastic/elasticsearch",
|
||||
"@npm//axios",
|
||||
"@npm//@babel/traverse",
|
||||
"@npm//chance",
|
||||
"@npm//dedent",
|
||||
"@npm//del",
|
||||
"@npm//enzyme",
|
||||
"@npm//execa",
|
||||
"@npm//exit-hook",
|
||||
"@npm//form-data",
|
||||
"@npm//getopts",
|
||||
"@npm//globby",
|
||||
"@npm//he",
|
||||
"@npm//history",
|
||||
"@npm//jest",
|
||||
"@npm//jest-cli",
|
||||
"@npm//jest-snapshot",
|
||||
"@npm//jest-styled-components",
|
||||
"@npm//@jest/reporters",
|
||||
"@npm//joi",
|
||||
"@npm//mustache",
|
||||
"@npm//normalize-path",
|
||||
"@npm//parse-link-header",
|
||||
"@npm//prettier",
|
||||
"@npm//react",
|
||||
"@npm//react-dom",
|
||||
"@npm//react-redux",
|
||||
"@npm//react-router-dom",
|
||||
"@npm//redux",
|
||||
"@npm//rxjs",
|
||||
"@npm//semver",
|
||||
"@npm//strip-ansi",
|
||||
"@npm//xmlbuilder",
|
||||
"@npm//xml2js",
|
||||
]
|
||||
|
||||
TYPES_DEPS = [
|
||||
"//packages/kbn-dev-utils:npm_module_types",
|
||||
"//packages/kbn-i18n-react:npm_module_types",
|
||||
"//packages/kbn-std:npm_module_types",
|
||||
"//packages/kbn-utils:npm_module_types",
|
||||
"@npm//@elastic/elasticsearch",
|
||||
"@npm//axios",
|
||||
"@npm//elastic-apm-node",
|
||||
"@npm//del",
|
||||
"@npm//exit-hook",
|
||||
"@npm//form-data",
|
||||
"@npm//getopts",
|
||||
"@npm//jest",
|
||||
"@npm//jest-cli",
|
||||
"@npm//jest-snapshot",
|
||||
"@npm//redux",
|
||||
"@npm//rxjs",
|
||||
"@npm//xmlbuilder",
|
||||
"@npm//@types/chance",
|
||||
"@npm//@types/dedent",
|
||||
"@npm//@types/enzyme",
|
||||
"@npm//@types/he",
|
||||
"@npm//@types/history",
|
||||
"@npm//@types/jest",
|
||||
"@npm//@types/joi",
|
||||
"@npm//@types/lodash",
|
||||
"@npm//@types/mustache",
|
||||
"@npm//@types/normalize-path",
|
||||
"@npm//@types/node",
|
||||
"@npm//@types/parse-link-header",
|
||||
"@npm//@types/prettier",
|
||||
"@npm//@types/react",
|
||||
"@npm//@types/react-dom",
|
||||
"@npm//@types/react-redux",
|
||||
"@npm//@types/react-router-dom",
|
||||
"@npm//@types/semver",
|
||||
"@npm//@types/xml2js",
|
||||
]
|
||||
|
||||
jsts_transpiler(
|
||||
name = "target_node",
|
||||
srcs = SRCS,
|
||||
build_pkg_name = package_name(),
|
||||
)
|
||||
|
||||
ts_config(
|
||||
name = "tsconfig",
|
||||
src = "tsconfig.json",
|
||||
deps = [
|
||||
"//:tsconfig.base.json",
|
||||
"//:tsconfig.bazel.json",
|
||||
],
|
||||
)
|
||||
|
||||
ts_project(
|
||||
name = "tsc_types",
|
||||
args = ['--pretty'],
|
||||
srcs = SRCS,
|
||||
deps = TYPES_DEPS,
|
||||
declaration = True,
|
||||
declaration_map = True,
|
||||
emit_declaration_only = True,
|
||||
out_dir = "target_types",
|
||||
source_map = True,
|
||||
root_dir = "src",
|
||||
tsconfig = ":tsconfig",
|
||||
)
|
||||
|
||||
js_library(
|
||||
name = PKG_BASE_NAME,
|
||||
srcs = NPM_MODULE_EXTRA_FILES,
|
||||
deps = RUNTIME_DEPS + [":target_node"],
|
||||
package_name = PKG_REQUIRE_NAME,
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
pkg_npm(
|
||||
name = "npm_module",
|
||||
deps = [
|
||||
":%s" % PKG_BASE_NAME,
|
||||
]
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "build",
|
||||
srcs = [
|
||||
":npm_module",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
pkg_npm_types(
|
||||
name = "npm_module_types",
|
||||
srcs = SRCS,
|
||||
deps = [":tsc_types"],
|
||||
package_name = TYPES_PKG_REQUIRE_NAME,
|
||||
tsconfig = ":tsconfig",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "build_types",
|
||||
srcs = [
|
||||
":npm_module_types",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
|
@ -6,4 +6,8 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
export * from './utils';
|
||||
module.exports = {
|
||||
preset: '@kbn/test',
|
||||
rootDir: '../..',
|
||||
roots: ['<rootDir>/packages/kbn-test-jest-helpers'],
|
||||
};
|
10
packages/kbn-test-jest-helpers/package.json
Normal file
10
packages/kbn-test-jest-helpers/package.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"name": "@kbn/test-jest-helpers",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"license": "SSPL-1.0 OR Elastic License 2.0",
|
||||
"main": "./target_node",
|
||||
"kibana": {
|
||||
"devOnly": true
|
||||
}
|
||||
}
|
|
@ -14,6 +14,7 @@
|
|||
*/
|
||||
|
||||
import { I18nProvider, InjectedIntl, intlShape, __IntlProvider } from '@kbn/i18n-react';
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { mount, ReactWrapper, render, shallow } from 'enzyme';
|
||||
import React, { ReactElement, ValidationMap } from 'react';
|
||||
import { act as reactAct } from 'react-dom/test-utils';
|
||||
|
@ -118,7 +119,7 @@ export function renderWithIntl<T>(
|
|||
context?: any;
|
||||
childContextTypes?: ValidationMap<any>;
|
||||
} = {}
|
||||
) {
|
||||
): any {
|
||||
const options = getOptions(context, childContextTypes, props);
|
||||
|
||||
return render(nodeWithIntlProp(node), options);
|
|
@ -6,6 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { ReactWrapper } from 'enzyme';
|
||||
|
||||
type Matcher = '=' | '~=' | '|=' | '^=' | '$=' | '*=';
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
export * from './enzyme_helpers';
|
||||
|
||||
export * from './get_url';
|
||||
|
||||
export * from './find_test_subject';
|
||||
|
||||
export * from './jsdom_svg_mocks';
|
|
@ -6,6 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import Chance from 'chance';
|
||||
|
||||
const chance = new Chance();
|
|
@ -14,4 +14,5 @@ export type {
|
|||
SetupFunc,
|
||||
SyncSetupFunc,
|
||||
AsyncSetupFunc,
|
||||
EuiTableMetaData,
|
||||
} from './types';
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
import React, { ComponentType } from 'react';
|
||||
import { Store } from 'redux';
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { ReactWrapper } from 'enzyme';
|
||||
import { act } from 'react-dom/test-utils';
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
import { Component as ReactComponent } from 'react';
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { ComponentType, HTMLAttributes, ReactWrapper } from 'enzyme';
|
||||
|
||||
import { findTestSubject } from '../find_test_subject';
|
||||
|
@ -41,7 +42,7 @@ const defaultConfig: TestBedConfig = {
|
|||
*
|
||||
* @example
|
||||
```typescript
|
||||
import { registerTestBed } from '@kbn/test/jest';
|
||||
import { registerTestBed } from '@kbn/test-jest-helpers';
|
||||
import { RemoteClusterList } from '../../app/sections/remote_cluster_list';
|
||||
import { remoteClustersStore } from '../../app/store';
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
import { Store } from 'redux';
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { ReactWrapper as GenericReactWrapper } from 'enzyme';
|
||||
import { LocationDescriptor } from 'history';
|
||||
|
16
packages/kbn-test-jest-helpers/tsconfig.json
Normal file
16
packages/kbn-test-jest-helpers/tsconfig.json
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"extends": "../../tsconfig.bazel.json",
|
||||
"compilerOptions": {
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"emitDeclarationOnly": true,
|
||||
"outDir": "./target_types",
|
||||
"stripInternal": true,
|
||||
"rootDir": "src",
|
||||
"sourceMap": true,
|
||||
"sourceRoot": "../../../../../../packages/kbn-test-jest-helpers/src",
|
||||
"types": ["jest", "node"]
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["**/__fixtures__/**/*"]
|
||||
}
|
|
@ -1,10 +1,11 @@
|
|||
load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
|
||||
load("@npm//@bazel/typescript:index.bzl", "ts_config")
|
||||
load("@npm//@babel/cli:index.bzl", "babel")
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
|
||||
load("//src/dev/bazel:index.bzl", "jsts_transpiler")
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
|
||||
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project")
|
||||
|
||||
PKG_BASE_NAME = "kbn-test"
|
||||
PKG_REQUIRE_NAME = "@kbn/test"
|
||||
TYPES_PKG_REQUIRE_NAME = "@types/kbn__test"
|
||||
|
||||
SOURCE_FILES = glob(
|
||||
[
|
||||
|
@ -27,7 +28,6 @@ filegroup(
|
|||
)
|
||||
|
||||
NPM_MODULE_EXTRA_FILES = [
|
||||
"jest/package.json",
|
||||
"jest-preset.js",
|
||||
"jest_integration/jest-preset.js",
|
||||
"jest.config.js",
|
||||
|
@ -80,7 +80,7 @@ TYPES_DEPS = [
|
|||
"//packages/kbn-dev-utils:npm_module_types",
|
||||
"//packages/kbn-i18n-react:npm_module_types",
|
||||
"//packages/kbn-std:npm_module_types",
|
||||
"//packages/kbn-utils",
|
||||
"//packages/kbn-utils:npm_module_types",
|
||||
"@npm//@elastic/elasticsearch",
|
||||
"@npm//@jest/console",
|
||||
"@npm//@jest/reporters",
|
||||
|
@ -148,7 +148,7 @@ ts_project(
|
|||
js_library(
|
||||
name = PKG_BASE_NAME,
|
||||
srcs = NPM_MODULE_EXTRA_FILES,
|
||||
deps = RUNTIME_DEPS + [":target_node", ":tsc_types"],
|
||||
deps = RUNTIME_DEPS + [":target_node"],
|
||||
package_name = PKG_REQUIRE_NAME,
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
@ -167,3 +167,20 @@ filegroup(
|
|||
],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
pkg_npm_types(
|
||||
name = "npm_module_types",
|
||||
srcs = SRCS,
|
||||
deps = [":tsc_types"],
|
||||
package_name = TYPES_PKG_REQUIRE_NAME,
|
||||
tsconfig = ":tsconfig",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "build_types",
|
||||
srcs = [
|
||||
":npm_module_types",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"main": "../target_node/jest",
|
||||
"types": "../target_types/jest/index.d.ts"
|
||||
}
|
|
@ -5,7 +5,6 @@
|
|||
"private": true,
|
||||
"license": "SSPL-1.0 OR Elastic License 2.0",
|
||||
"main": "./target_node",
|
||||
"types": "./target_types",
|
||||
"kibana": {
|
||||
"devOnly": true
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ export { CI_PARALLEL_PROCESS_PREFIX } from './ci_parallel_process_prefix';
|
|||
|
||||
export * from './functional_test_runner';
|
||||
|
||||
export { getUrl } from './jest/utils/get_url';
|
||||
export { getUrl } from './jest/get_url';
|
||||
|
||||
export { runCheckJestConfigsCli } from './jest/run_check_jest_configs_cli';
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { act } from 'react-dom/test-utils';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
|
||||
import { themeServiceMock } from '../../theme/theme_service.mock';
|
||||
import { AppContainer } from './app_container';
|
||||
|
|
|
@ -10,7 +10,7 @@ import { mount, ReactWrapper } from 'enzyme';
|
|||
import React from 'react';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import sinon from 'sinon';
|
||||
import { StubBrowserStorage } from '@kbn/test/jest';
|
||||
import { StubBrowserStorage } from '@kbn/test-jest-helpers';
|
||||
import { ChromeNavLink, DEFAULT_APP_CATEGORIES } from '../../..';
|
||||
import { httpServiceMock } from '../../../http/http_service.mock';
|
||||
import { ChromeRecentlyAccessedHistoryItem } from '../../recently_accessed';
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
import React from 'react';
|
||||
import { act } from 'react-dom/test-utils';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { StubBrowserStorage, mountWithIntl } from '@kbn/test/jest';
|
||||
import { StubBrowserStorage, mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { httpServiceMock } from '../../../http/http_service.mock';
|
||||
import { applicationServiceMock } from '../../../mocks';
|
||||
import { Header } from './header';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import { shallowWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { StatusBadge, StatusWithoutMessage } from './status_badge';
|
||||
|
||||
const getStatus = (parts: Partial<StatusWithoutMessage> = {}): StatusWithoutMessage => ({
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { mountWithIntl, findTestSubject } from '@kbn/test/jest';
|
||||
import { mountWithIntl, findTestSubject } from '@kbn/test-jest-helpers';
|
||||
import type { ServerVersion } from '../../../../types/status';
|
||||
import { VersionHeader } from './version_header';
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import { EuiCallOut } from '@elastic/eui';
|
|||
import testSubjSelector from '@kbn/test-subj-selector';
|
||||
import React from 'react';
|
||||
import * as Rx from 'rxjs';
|
||||
import { mountWithIntl, shallowWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl, shallowWithIntl } from '@kbn/test-jest-helpers';
|
||||
|
||||
import { FatalErrorsScreen } from './fatal_errors_screen';
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import { shallow } from 'enzyme';
|
||||
import React from 'react';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
|
||||
import { ErrorToast } from './error_toast';
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import type { ReactWrapper } from 'enzyme';
|
|||
import { of, BehaviorSubject } from 'rxjs';
|
||||
import { useEuiTheme } from '@elastic/eui';
|
||||
import type { UseEuiTheme } from '@elastic/eui';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { CoreThemeProvider } from './core_theme_provider';
|
||||
import type { CoreTheme } from './types';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { nextTick } from '@kbn/test/jest';
|
||||
import { nextTick } from '@kbn/test-jest-helpers';
|
||||
import { REPO_ROOT } from '@kbn/utils';
|
||||
import { LoggerFactory } from '@kbn/logging';
|
||||
import { Env } from '@kbn/config';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { shallowWithI18nProvider } from '@kbn/test/jest';
|
||||
import { shallowWithI18nProvider } from '@kbn/test-jest-helpers';
|
||||
|
||||
import { PageFooter } from './page_footer';
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { shallowWithI18nProvider } from '@kbn/test/jest';
|
||||
import { shallowWithI18nProvider } from '@kbn/test-jest-helpers';
|
||||
|
||||
import { PageSubtitle } from './page_subtitle';
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { shallowWithI18nProvider } from '@kbn/test/jest';
|
||||
import { shallowWithI18nProvider } from '@kbn/test-jest-helpers';
|
||||
|
||||
import { PageTitle } from './page_title';
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
import React from 'react';
|
||||
import { Observable } from 'rxjs';
|
||||
import { ReactWrapper } from 'enzyme';
|
||||
import { mountWithI18nProvider, shallowWithI18nProvider } from '@kbn/test/jest';
|
||||
import { mountWithI18nProvider, shallowWithI18nProvider } from '@kbn/test-jest-helpers';
|
||||
import dedent from 'dedent';
|
||||
import {
|
||||
PublicUiSettingsParams,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { I18nProvider } from '@kbn/i18n-react';
|
||||
import { shallowWithI18nProvider, mountWithI18nProvider } from '@kbn/test/jest';
|
||||
import { shallowWithI18nProvider, mountWithI18nProvider } from '@kbn/test-jest-helpers';
|
||||
import { mount, ReactWrapper } from 'enzyme';
|
||||
import { FieldSetting } from '../../types';
|
||||
import { UiSettingsType } from '../../../../../../core/public';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { shallowWithI18nProvider, mountWithI18nProvider } from '@kbn/test/jest';
|
||||
import { shallowWithI18nProvider, mountWithI18nProvider } from '@kbn/test-jest-helpers';
|
||||
import { UiSettingsType } from '../../../../../../core/public';
|
||||
import { themeServiceMock } from '../../../../../../core/public/mocks';
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { shallowWithI18nProvider, mountWithI18nProvider } from '@kbn/test/jest';
|
||||
import { shallowWithI18nProvider, mountWithI18nProvider } from '@kbn/test-jest-helpers';
|
||||
|
||||
import { findTestSubject } from '@elastic/eui/lib/test';
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import { chartPluginMock } from '../../../../charts/public/mocks';
|
|||
import { fieldFormatsServiceMock } from '../../../../field_formats/public/mocks';
|
||||
import type { Datatable } from '../../../../expressions/public';
|
||||
import { DatatableColumn, DatatableRow } from 'src/plugins/expressions/common';
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import { shallowWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { GaugeRenderProps, GaugeArguments, GaugeLabelMajorMode, ColorStop } from '../../common';
|
||||
import GaugeComponent from './gauge_component';
|
||||
import { Chart, Goal } from '@elastic/charts';
|
||||
|
|
|
@ -12,7 +12,7 @@ import { chartPluginMock } from '../../../../charts/public/mocks';
|
|||
import { EmptyPlaceholder } from '../../../../charts/public';
|
||||
import { fieldFormatsServiceMock } from '../../../../field_formats/public/mocks';
|
||||
import type { Datatable } from '../../../../expressions/public';
|
||||
import { mountWithIntl, shallowWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl, shallowWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { findTestSubject } from '@elastic/eui/lib/test';
|
||||
import { act } from 'react-dom/test-utils';
|
||||
import { HeatmapRenderProps, HeatmapArguments } from '../../common';
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
import React from 'react';
|
||||
import { LegendColorPickerProps } from '@elastic/charts';
|
||||
import { EuiPopover } from '@elastic/eui';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { ReactWrapper } from 'enzyme';
|
||||
import {
|
||||
LegendColorPickerWrapper,
|
||||
|
|
|
@ -16,7 +16,7 @@ import * as sinon from 'sinon';
|
|||
|
||||
import { serviceContextMock } from '../../../../contexts/services_context.mock';
|
||||
|
||||
import { nextTick } from '@kbn/test/jest';
|
||||
import { nextTick } from '@kbn/test-jest-helpers';
|
||||
import {
|
||||
ServicesContextProvider,
|
||||
EditorContextProvider,
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
|
||||
import { DashboardContainer } from '../embeddable/dashboard_container';
|
||||
import { embeddablePluginMock } from '../../../../embeddable/public/mocks';
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
|
||||
import { findTestSubject, nextTick } from '@kbn/test/jest';
|
||||
import { findTestSubject, nextTick } from '@kbn/test-jest-helpers';
|
||||
import { DashboardContainer, DashboardContainerServices } from './dashboard_container';
|
||||
import { getSampleDashboardInput, getSampleDashboardPanel } from '../test_helpers';
|
||||
import { I18nProvider } from '@kbn/i18n-react';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { findTestSubject } from '@elastic/eui/lib/test';
|
||||
import { DashboardEmptyScreen, DashboardEmptyScreenProps } from './dashboard_empty_screen';
|
||||
import { coreMock } from '../../../../../../core/public/mocks';
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
import sizeMe from 'react-sizeme';
|
||||
|
||||
import React from 'react';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { skip } from 'rxjs/operators';
|
||||
import { DashboardGrid, DashboardGridProps } from './dashboard_grid';
|
||||
import { DashboardContainer, DashboardContainerServices } from '../dashboard_container';
|
||||
|
|
|
@ -11,7 +11,7 @@ import React from 'react';
|
|||
import { skip } from 'rxjs/operators';
|
||||
import { mount } from 'enzyme';
|
||||
import { I18nProvider } from '@kbn/i18n-react';
|
||||
import { nextTick } from '@kbn/test/jest';
|
||||
import { nextTick } from '@kbn/test-jest-helpers';
|
||||
import { DashboardViewport, DashboardViewportProps } from './dashboard_viewport';
|
||||
import { DashboardContainer, DashboardContainerServices } from '../dashboard_container';
|
||||
import { getSampleDashboardInput } from '../../test_helpers';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import sinon from 'sinon';
|
||||
import { shallowWithI18nProvider, mountWithI18nProvider } from '@kbn/test/jest';
|
||||
import { shallowWithI18nProvider, mountWithI18nProvider } from '@kbn/test-jest-helpers';
|
||||
import { findTestSubject } from '@elastic/eui/lib/test';
|
||||
|
||||
import { DashboardCloneModal } from './clone_modal';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { shallowWithI18nProvider } from '@kbn/test/jest';
|
||||
import { shallowWithI18nProvider } from '@kbn/test-jest-helpers';
|
||||
|
||||
jest.mock('../../../../saved_objects/public', () => ({
|
||||
SavedObjectSaveModal: () => null,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import { QueryStringManager } from './query_string_manager';
|
||||
import { Storage } from '../../../../kibana_utils/public/storage';
|
||||
import { StubBrowserStorage } from '@kbn/test/jest';
|
||||
import { StubBrowserStorage } from '@kbn/test-jest-helpers';
|
||||
import { coreMock } from '../../../../../core/public/mocks';
|
||||
import { Query } from '../../../common/query';
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import { Filter, FilterStateStore, UI_SETTINGS } from '../../../common';
|
|||
import { coreMock } from '../../../../../core/public/mocks';
|
||||
import { BaseStateContainer, createStateContainer, Storage } from '../../../../kibana_utils/public';
|
||||
import { QueryService, QueryStart } from '../query_service';
|
||||
import { StubBrowserStorage } from '@kbn/test/jest';
|
||||
import { StubBrowserStorage } from '@kbn/test-jest-helpers';
|
||||
import { connectToQueryState } from './connect_to_query_state';
|
||||
import { TimefilterContract } from '../timefilter';
|
||||
import { QueryState } from './types';
|
||||
|
|
|
@ -18,7 +18,7 @@ import {
|
|||
Storage,
|
||||
} from '../../../../kibana_utils/public';
|
||||
import { QueryService, QueryStart } from '../query_service';
|
||||
import { StubBrowserStorage } from '@kbn/test/jest';
|
||||
import { StubBrowserStorage } from '@kbn/test-jest-helpers';
|
||||
import { TimefilterContract } from '../timefilter';
|
||||
import { syncQueryStateWithUrl } from './sync_state_with_url';
|
||||
import { QueryState } from './types';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { registerTestBed, TestBed } from '@kbn/test/jest';
|
||||
import { registerTestBed, TestBed } from '@kbn/test-jest-helpers';
|
||||
import { FilterEditor, Props } from '.';
|
||||
import React from 'react';
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import React from 'react';
|
|||
import { QueryLanguageSwitcher, QueryLanguageSwitcherProps } from './language_switcher';
|
||||
import { KibanaContextProvider } from 'src/plugins/kibana_react/public';
|
||||
import { coreMock } from '../../../../../core/public/mocks';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { EuiButtonEmpty, EuiIcon, EuiPopover } from '@elastic/eui';
|
||||
const startMock = coreMock.createStart();
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { mountWithIntl as mount } from '@kbn/test/jest';
|
||||
import { mountWithIntl as mount } from '@kbn/test-jest-helpers';
|
||||
import { NoDataPopover } from './no_data_popover';
|
||||
import { EuiTourStep } from '@elastic/eui';
|
||||
import { act } from 'react-dom/test-utils';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import { shallowWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { ShardFailureDescription } from './shard_failure_description';
|
||||
import { shardFailureResponse } from './__mocks__/shard_failure_response';
|
||||
import { ShardFailure } from './shard_failure_types';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import { shallowWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { ShardFailureModal } from './shard_failure_modal';
|
||||
import { shardFailureRequest } from './__mocks__/shard_failure_request';
|
||||
import { shardFailureResponse } from './__mocks__/shard_failure_response';
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
import { openModal } from './shard_failure_open_modal_button.test.mocks';
|
||||
import React from 'react';
|
||||
import { themeServiceMock } from 'src/core/public/mocks';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import ShardFailureOpenModalButton from './shard_failure_open_modal_button';
|
||||
import { shardFailureRequest } from './__mocks__/shard_failure_request';
|
||||
import { shardFailureResponse } from './__mocks__/shard_failure_response';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import { shallowWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { ShardFailureTable } from './shard_failure_table';
|
||||
import { shardFailureResponse } from './__mocks__/shard_failure_response';
|
||||
import { ShardFailure } from './shard_failure_types';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import React, { Suspense } from 'react';
|
||||
import { getTableViewDescription } from '../index';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { TablesAdapter } from '../../../../../expressions/common';
|
||||
|
||||
jest.mock('../../../../../share/public', () => ({
|
||||
|
|
|
@ -11,7 +11,7 @@ import { EmptyIndexListPrompt } from './empty_index_list_prompt';
|
|||
import { shallow } from 'enzyme';
|
||||
import sinon from 'sinon';
|
||||
import { findTestSubject } from '@elastic/eui/lib/test';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
|
||||
jest.mock('react-router-dom', () => ({
|
||||
useHistory: () => ({
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { EmptyIndexPatternPrompt } from '../empty_index_pattern_prompt';
|
||||
import { shallowWithI18nProvider } from '@kbn/test/jest';
|
||||
import { shallowWithI18nProvider } from '@kbn/test-jest-helpers';
|
||||
|
||||
describe('EmptyIndexPatternPrompt', () => {
|
||||
it('should render normally', () => {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
export { getRandomString } from '@kbn/test/jest';
|
||||
export { getRandomString } from '@kbn/test-jest-helpers';
|
||||
|
||||
export type { TestBed } from '@kbn/test/jest';
|
||||
export { registerTestBed } from '@kbn/test/jest';
|
||||
export type { TestBed } from '@kbn/test-jest-helpers';
|
||||
export { registerTestBed } from '@kbn/test-jest-helpers';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
import { act } from 'react-dom/test-utils';
|
||||
import { registerTestBed, TestBed } from '@kbn/test/jest';
|
||||
import { registerTestBed, TestBed } from '@kbn/test-jest-helpers';
|
||||
|
||||
import { Context } from '../../public/components/field_editor_context';
|
||||
import { FieldEditor, Props } from '../../public/components/field_editor/field_editor';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
import { act } from 'react-dom/test-utils';
|
||||
import { registerTestBed, TestBed } from '@kbn/test/jest';
|
||||
import { registerTestBed, TestBed } from '@kbn/test-jest-helpers';
|
||||
|
||||
import { Context } from '../../public/components/field_editor_context';
|
||||
import {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
import { act } from 'react-dom/test-utils';
|
||||
import { ReactWrapper } from 'enzyme';
|
||||
import { registerTestBed, TestBed } from '@kbn/test/jest';
|
||||
import { registerTestBed, TestBed } from '@kbn/test-jest-helpers';
|
||||
|
||||
import { API_BASE_PATH } from '../../common/constants';
|
||||
import { Context } from '../../public/components/field_editor_context';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
import { act } from 'react-dom/test-utils';
|
||||
import { TestBed } from '@kbn/test/jest';
|
||||
import { TestBed } from '@kbn/test-jest-helpers';
|
||||
|
||||
/**
|
||||
* We often need to wait for both the documents & the preview to be fetched.
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
export type { TestBed } from '@kbn/test/jest';
|
||||
export { findTestSubject } from '@kbn/test/jest';
|
||||
export type { TestBed } from '@kbn/test-jest-helpers';
|
||||
export { findTestSubject } from '@kbn/test-jest-helpers';
|
||||
|
||||
export {
|
||||
setupEnvironment,
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { shallowWithI18nProvider } from '@kbn/test/jest';
|
||||
import { shallowWithI18nProvider } from '@kbn/test-jest-helpers';
|
||||
|
||||
import { ColorFormatEditor } from './color';
|
||||
import { FieldFormat, DEFAULT_CONVERTER_COLOR } from '../../../../../../field_formats/common';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { shallowWithI18nProvider } from '@kbn/test/jest';
|
||||
import { shallowWithI18nProvider } from '@kbn/test-jest-helpers';
|
||||
import { StaticLookupFormatEditorFormatParams } from './static_lookup';
|
||||
import { FieldFormat } from 'src/plugins/field_formats/common';
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { shallowWithI18nProvider } from '@kbn/test/jest';
|
||||
import { shallowWithI18nProvider } from '@kbn/test-jest-helpers';
|
||||
|
||||
import { FormatEditorSamples } from './samples';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { registerTestBed } from '@kbn/test/jest';
|
||||
import { registerTestBed } from '@kbn/test-jest-helpers';
|
||||
|
||||
jest.mock('../../kibana_react/public', () => {
|
||||
const original = jest.requireActual('../../kibana_react/public');
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { ActionBar, ActionBarProps } from './action_bar';
|
||||
import { findTestSubject } from '@elastic/eui/lib/test';
|
||||
import { MAX_CONTEXT_SIZE, MIN_CONTEXT_SIZE } from '../../services/constants';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { ReactWrapper } from 'enzyme';
|
||||
import { ContextErrorMessage } from './context_error_message';
|
||||
import { FailureReason, LoadingStatus } from '../../services/context_query_state';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { waitFor } from '@testing-library/react';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { createFilterManagerMock } from '../../../../data/public/query/filter_manager/filter_manager.mock';
|
||||
import { mockTopNavMenu } from './__mocks__/top_nav_menu';
|
||||
import { ContextAppContent } from './context_app_content';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { findTestSubject } from '@elastic/eui/lib/test';
|
||||
import { ActionBar } from './components/action_bar/action_bar';
|
||||
import { GetStateReturn } from './services/context_state';
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
import { throwError, of } from 'rxjs';
|
||||
import React from 'react';
|
||||
import { act } from 'react-dom/test-utils';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { ReactWrapper } from 'enzyme';
|
||||
import { findTestSubject } from '@elastic/eui/lib/test';
|
||||
import { Doc, DocProps } from './doc';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { Subject, BehaviorSubject } from 'rxjs';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { setHeaderActionMenuMounter } from '../../../../kibana_services';
|
||||
import { esHits } from '../../../../__mocks__/es_hits';
|
||||
import { savedSearchMock } from '../../../../__mocks__/saved_search';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { FetchStatus } from '../../../types';
|
||||
import { DataCharts$ } from '../../utils/use_saved_search';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { KibanaContextProvider } from '../../../../../../kibana_react/public';
|
||||
import { CALLOUT_STATE_KEY, DocumentExplorerCallout } from './document_explorer_callout';
|
||||
import { LocalStorageMock } from '../../../../__mocks__/local_storage_mock';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { ReactWrapper } from 'enzyme';
|
||||
import { HitsCounter, HitsCounterProps } from './hits_counter';
|
||||
import { findTestSubject } from '@elastic/eui/lib/test';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { setHeaderActionMenuMounter } from '../../../../kibana_services';
|
||||
import { esHits } from '../../../../__mocks__/es_hits';
|
||||
import { savedSearchMock } from '../../../../__mocks__/saved_search';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { Subject, BehaviorSubject } from 'rxjs';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { setHeaderActionMenuMounter } from '../../../../kibana_services';
|
||||
import { DiscoverLayout, SIDEBAR_CLOSED_KEY } from './discover_layout';
|
||||
import { esHits } from '../../../../__mocks__/es_hits';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { ReactWrapper } from 'enzyme';
|
||||
import { LoadingSpinner } from './loading_spinner';
|
||||
import { findTestSubject } from '@elastic/eui/lib/test';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { findTestSubject } from '@elastic/eui/lib/test';
|
||||
|
||||
import { DiscoverNoResults, DiscoverNoResultsProps } from './no_results';
|
||||
|
|
|
@ -9,7 +9,7 @@ import React from 'react';
|
|||
import { EuiSelectable } from '@elastic/eui';
|
||||
import { ShallowWrapper } from 'enzyme';
|
||||
import { act } from 'react-dom/test-utils';
|
||||
import { shallowWithIntl } from '@kbn/test/jest';
|
||||
import { shallowWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { ChangeIndexPattern } from './change_indexpattern';
|
||||
import { indexPatternMock } from '../../../../__mocks__/index_pattern';
|
||||
import { indexPatternWithTimefieldMock } from '../../../../__mocks__/index_pattern_with_timefield';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { findTestSubject } from '@elastic/eui/lib/test';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
|
||||
import { DiscoverField } from './discover_field';
|
||||
import { DataViewField } from '../../../../../../data/common';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { findTestSubject } from '@elastic/eui/lib/test';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
|
||||
import { DiscoverFieldDetails } from './discover_field_details';
|
||||
import { DataViewField } from '../../../../../../data/common';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { act } from 'react-dom/test-utils';
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { findTestSubject } from '@elastic/eui/lib/test';
|
||||
import { DiscoverFieldSearch, Props } from './discover_field_search';
|
||||
import { EuiButtonGroupProps, EuiPopover } from '@elastic/eui';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { act } from 'react-dom/test-utils';
|
||||
import { shallowWithIntl as shallow } from '@kbn/test/jest';
|
||||
import { shallowWithIntl as shallow } from '@kbn/test-jest-helpers';
|
||||
import { ShallowWrapper } from 'enzyme';
|
||||
import { ChangeIndexPattern } from './change_indexpattern';
|
||||
import { SavedObject } from 'kibana/server';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { mountWithIntl, findTestSubject } from '@kbn/test/jest';
|
||||
import { mountWithIntl, findTestSubject } from '@kbn/test-jest-helpers';
|
||||
import { EuiContextMenuPanel, EuiPopover, EuiContextMenuItem } from '@elastic/eui';
|
||||
import { DiscoverServices } from '../../../../build_services';
|
||||
import { DiscoverIndexPatternManagement } from './discover_index_pattern_management';
|
||||
|
|
|
@ -12,7 +12,7 @@ import { findTestSubject } from '@elastic/eui/lib/test';
|
|||
// @ts-expect-error
|
||||
import realHits from '../../../../__fixtures__/real_hits.js';
|
||||
|
||||
import { mountWithIntl } from '@kbn/test/jest';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import React from 'react';
|
||||
import { DiscoverSidebarProps } from './discover_sidebar';
|
||||
import { flattenHit, IndexPatternAttributes } from '../../../../../../data/common';
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue