diff --git a/packages/kbn-eslint-config/.eslintrc.js b/packages/kbn-eslint-config/.eslintrc.js index e7ae18281748a..3b60aeb0303dc 100644 --- a/packages/kbn-eslint-config/.eslintrc.js +++ b/packages/kbn-eslint-config/.eslintrc.js @@ -141,9 +141,9 @@ module.exports = { /** * ESLint rule to aid with breaking up packages: * - * `fromPacakge` the package name which was broken up - * `toPackage` the package where the removed exports were placed - * `exportNames` the list of exports which used to be found in `fromPacakge` and are now found in `toPackage` + * `from` the package/request where the exports used to be + * `to` the package/request where the exports are now + * `exportNames` the list of exports which used to be found in `from` and are now found in `to` * * TODO(@spalger): once packages have types we should be able to filter this rule based on the package type * of the file being linted so that we could re-route imports from `plugin-client` types to a different package @@ -151,8 +151,8 @@ module.exports = { */ '@kbn/imports/exports_moved_packages': ['error', [ { - fromPackage: '@kbn/dev-utils', - toPackage: '@kbn/tooling-log', + from: '@kbn/dev-utils', + to: '@kbn/tooling-log', exportNames: [ 'DEFAULT_LOG_LEVEL', 'getLogLevelFlagsHelp', @@ -171,8 +171,8 @@ module.exports = { ] }, { - fromPackage: '@kbn/dev-utils', - toPackage: '@kbn/ci-stats-reporter', + from: '@kbn/dev-utils', + to: '@kbn/ci-stats-reporter', exportNames: [ 'CiStatsMetric', 'CiStatsReporter', @@ -188,15 +188,15 @@ module.exports = { ] }, { - fromPackage: '@kbn/dev-utils', - toPackage: '@kbn/ci-stats-core', + from: '@kbn/dev-utils', + to: '@kbn/ci-stats-core', exportNames: [ 'Config', ] }, { - fromPackage: '@kbn/dev-utils', - toPackage: '@kbn/jest-serializers', + from: '@kbn/dev-utils', + to: '@kbn/jest-serializers', exportNames: [ 'createAbsolutePathSerializer', 'createStripAnsiSerializer', @@ -206,23 +206,23 @@ module.exports = { ] }, { - fromPackage: '@kbn/dev-utils', - toPackage: '@kbn/stdio-dev-helpers', + from: '@kbn/dev-utils', + to: '@kbn/stdio-dev-helpers', exportNames: [ 'observeReadable', 'observeLines', ] }, { - fromPackage: '@kbn/dev-utils', - toPackage: '@kbn/sort-package-json', + from: '@kbn/dev-utils', + to: '@kbn/sort-package-json', exportNames: [ 'sortPackageJson', ] }, { - fromPackage: '@kbn/dev-utils', - toPackage: '@kbn/dev-cli-runner', + from: '@kbn/dev-utils', + to: '@kbn/dev-cli-runner', exportNames: [ 'run', 'Command', @@ -242,8 +242,8 @@ module.exports = { ] }, { - fromPackage: '@kbn/dev-utils', - toPackage: '@kbn/dev-cli-errors', + from: '@kbn/dev-utils', + to: '@kbn/dev-cli-errors', exportNames: [ 'createFailError', 'createFlagError', @@ -251,16 +251,16 @@ module.exports = { ] }, { - fromPackage: '@kbn/dev-utils', - toPackage: '@kbn/dev-proc-runner', + from: '@kbn/dev-utils', + to: '@kbn/dev-proc-runner', exportNames: [ 'withProcRunner', 'ProcRunner', ] }, { - fromPackage: '@kbn/utils', - toPackage: '@kbn/repo-info', + from: '@kbn/utils', + to: '@kbn/repo-info', exportNames: [ 'REPO_ROOT', 'UPSTREAM_BRANCH', @@ -269,6 +269,21 @@ module.exports = { 'fromRoot', ] }, + { + from: '@kbn/presentation-util-plugin/common', + to: '@kbn/presentation-util-plugin/test_helpers', + exportNames: [ + 'functionWrapper', + 'fontStyle' + ] + }, + { + from: '@kbn/fleet-plugin/common', + to: '@kbn/fleet-plugin/common/mocks', + exportNames: [ + 'createFleetAuthzMock' + ] + } ]], '@kbn/disable/no_protected_eslint_disable': 'error', diff --git a/packages/kbn-eslint-plugin-imports/src/get_import_resolver.ts b/packages/kbn-eslint-plugin-imports/src/get_import_resolver.ts index fa1f12181f743..8679dd73b0223 100644 --- a/packages/kbn-eslint-plugin-imports/src/get_import_resolver.ts +++ b/packages/kbn-eslint-plugin-imports/src/get_import_resolver.ts @@ -14,7 +14,7 @@ import { RUNNING_IN_EDITOR } from './helpers/running_in_editor'; let importResolverCache: ImportResolver | undefined; /** - * Create a request resolver for ESLint, requires a PluginPackageResolver from @kbn/bazel-packages which will + * Create a request resolver for ESLint, requires a PluginPackageResolver from @kbn/repo-packages which will * be created and cached on contextServices automatically. * * All import requests in the repository should return a result, if they don't it's a bug diff --git a/packages/kbn-eslint-plugin-imports/src/rules/exports_moved_packages.test.ts b/packages/kbn-eslint-plugin-imports/src/rules/exports_moved_packages.test.ts index 720d738e2ca90..8de682647404c 100644 --- a/packages/kbn-eslint-plugin-imports/src/rules/exports_moved_packages.test.ts +++ b/packages/kbn-eslint-plugin-imports/src/rules/exports_moved_packages.test.ts @@ -16,8 +16,8 @@ const OPTIONS: MovedExportsRule[][] = [ [ { exportNames: ['foo', 'bar'], - fromPackage: 'old', - toPackage: 'new', + from: 'old', + to: 'new', }, ], ]; diff --git a/packages/kbn-eslint-plugin-imports/src/rules/exports_moved_packages.ts b/packages/kbn-eslint-plugin-imports/src/rules/exports_moved_packages.ts index 1dfde85dc1f2e..eb2bc90f2ba4f 100644 --- a/packages/kbn-eslint-plugin-imports/src/rules/exports_moved_packages.ts +++ b/packages/kbn-eslint-plugin-imports/src/rules/exports_moved_packages.ts @@ -13,8 +13,8 @@ import { TSESTree } from '@typescript-eslint/typescript-estree'; import { visitAllImportStatements, Importer } from '../helpers/visit_all_import_statements'; export interface MovedExportsRule { - fromPackage: string; - toPackage: string; + from: string; + to: string; exportNames: string[]; } @@ -71,7 +71,7 @@ function getBadImports(imported: Imported[], rules: MovedExportsRule[]): BadImpo node: i.node, id: i.id, name: i.name, - newPkg: match.toPackage, + newPkg: match.to, }; }); } @@ -203,10 +203,10 @@ export const ExportsMovedPackagesRule: Rule.RuleModule = { items: { type: 'object', properties: { - fromPackage: { + from: { type: 'string', }, - toPackage: { + to: { type: 'string', }, exportNames: { @@ -268,7 +268,7 @@ export const ExportsMovedPackagesRule: Rule.RuleModule = { return; } - const rulesForRightPackage = rules.filter((m) => m.fromPackage === req); + const rulesForRightPackage = rules.filter((m) => m.from === req); if (!rulesForRightPackage.length) { return; } diff --git a/src/plugins/expression_image/common/expression_functions/image_function.test.ts b/src/plugins/expression_image/common/expression_functions/image_function.test.ts index bdaf195015326..c301f68ee7a4e 100644 --- a/src/plugins/expression_image/common/expression_functions/image_function.test.ts +++ b/src/plugins/expression_image/common/expression_functions/image_function.test.ts @@ -8,11 +8,8 @@ import expect from '@kbn/expect'; import { ExecutionContext } from '@kbn/expressions-plugin/common'; -import { - functionWrapper, - getElasticLogo, - getElasticOutline, -} from '@kbn/presentation-util-plugin/common'; +import { getElasticLogo, getElasticOutline } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { imageFunction as image } from './image_function'; describe('image', () => { diff --git a/src/plugins/expression_metric/common/expression_functions/metric_function.test.ts b/src/plugins/expression_metric/common/expression_functions/metric_function.test.ts index fcbd4280167ba..cff12d0f04b64 100644 --- a/src/plugins/expression_metric/common/expression_functions/metric_function.test.ts +++ b/src/plugins/expression_metric/common/expression_functions/metric_function.test.ts @@ -7,7 +7,7 @@ */ import { ExecutionContext } from '@kbn/expressions-plugin/common'; -import { functionWrapper, fontStyle } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper, fontStyle } from '@kbn/presentation-util-plugin/test_helpers'; import { metricFunction } from './metric_function'; describe('metric', () => { diff --git a/src/plugins/expression_repeat_image/common/expression_functions/repeat_image_function.test.ts b/src/plugins/expression_repeat_image/common/expression_functions/repeat_image_function.test.ts index d874ae5aca4b1..f143dbcc25bdb 100644 --- a/src/plugins/expression_repeat_image/common/expression_functions/repeat_image_function.test.ts +++ b/src/plugins/expression_repeat_image/common/expression_functions/repeat_image_function.test.ts @@ -7,11 +7,8 @@ */ import { ExecutionContext } from '@kbn/expressions-plugin/common'; -import { - getElasticLogo, - getElasticOutline, - functionWrapper, -} from '@kbn/presentation-util-plugin/common'; +import { getElasticLogo, getElasticOutline } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { repeatImageFunction } from './repeat_image_function'; describe('repeatImage', () => { diff --git a/src/plugins/expression_reveal_image/common/expression_functions/reveal_image.test.ts b/src/plugins/expression_reveal_image/common/expression_functions/reveal_image.test.ts index 4d764056be539..a6538836630cd 100644 --- a/src/plugins/expression_reveal_image/common/expression_functions/reveal_image.test.ts +++ b/src/plugins/expression_reveal_image/common/expression_functions/reveal_image.test.ts @@ -6,11 +6,8 @@ * Side Public License, v 1. */ -import { - functionWrapper, - getElasticOutline, - getElasticLogo, -} from '@kbn/presentation-util-plugin/common'; +import { getElasticOutline, getElasticLogo } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { revealImageFunction, errors } from './reveal_image_function'; import { Origin } from '../types'; import { ExecutionContext } from '@kbn/expressions-plugin/common'; diff --git a/src/plugins/expression_shape/common/expression_functions/progress_function.test.ts b/src/plugins/expression_shape/common/expression_functions/progress_function.test.ts index 1a678ff02acde..8319eaba6c008 100644 --- a/src/plugins/expression_shape/common/expression_functions/progress_function.test.ts +++ b/src/plugins/expression_shape/common/expression_functions/progress_function.test.ts @@ -7,7 +7,7 @@ */ import { ExecutionContext } from '@kbn/expressions-plugin/common'; -import { functionWrapper, fontStyle } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper, fontStyle } from '@kbn/presentation-util-plugin/test_helpers'; import { progressFunction, errors } from './progress_function'; describe('progress', () => { diff --git a/src/plugins/presentation_util/common/index.ts b/src/plugins/presentation_util/common/index.ts index c7439d990c33f..f7ed4603d4acb 100644 --- a/src/plugins/presentation_util/common/index.ts +++ b/src/plugins/presentation_util/common/index.ts @@ -37,8 +37,6 @@ export { export { defaultTheme$, getElasticLogo, - fontStyle, - functionWrapper, getElasticOutline, isValidUrl, resolveWithMissingImage, diff --git a/src/plugins/presentation_util/common/lib/index.ts b/src/plugins/presentation_util/common/lib/index.ts index 0839d17e04c92..a50ff5c59e798 100644 --- a/src/plugins/presentation_util/common/lib/index.ts +++ b/src/plugins/presentation_util/common/lib/index.ts @@ -7,5 +7,3 @@ */ export * from './utils'; -// eslint-disable-next-line @kbn/imports/no_boundary_crossing -export * from './test_helpers'; diff --git a/src/plugins/presentation_util/common/lib/test_helpers/function_wrapper.ts b/src/plugins/presentation_util/test_helpers/function_wrapper.ts similarity index 100% rename from src/plugins/presentation_util/common/lib/test_helpers/function_wrapper.ts rename to src/plugins/presentation_util/test_helpers/function_wrapper.ts diff --git a/src/plugins/presentation_util/common/lib/test_helpers/index.ts b/src/plugins/presentation_util/test_helpers/index.ts similarity index 100% rename from src/plugins/presentation_util/common/lib/test_helpers/index.ts rename to src/plugins/presentation_util/test_helpers/index.ts diff --git a/src/plugins/presentation_util/common/lib/test_helpers/test_styles.ts b/src/plugins/presentation_util/test_helpers/test_styles.ts similarity index 100% rename from src/plugins/presentation_util/common/lib/test_helpers/test_styles.ts rename to src/plugins/presentation_util/test_helpers/test_styles.ts diff --git a/src/plugins/presentation_util/tsconfig.json b/src/plugins/presentation_util/tsconfig.json index c0c69200676bd..adc524125392e 100644 --- a/src/plugins/presentation_util/tsconfig.json +++ b/src/plugins/presentation_util/tsconfig.json @@ -8,6 +8,7 @@ "public/**/*", "public/**/*.json", "server/**/*", + "test_helpers/**/*", "storybook/**/*", "../../../typings/**/*" ], diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/browser/markdown.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/browser/markdown.test.js index 22611f859461f..decb6d5200c6e 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/browser/markdown.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/browser/markdown.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper, fontStyle } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper, fontStyle } from '@kbn/presentation-util-plugin/test_helpers'; import { testTable } from '../common/__fixtures__/test_tables'; import { markdown } from './markdown'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/all.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/all.test.js index a106adf40518c..2c1056c9c210e 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/all.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/all.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { all } from './all'; describe('all', () => { diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/alterColumn.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/alterColumn.test.js index e5d781ba6febe..15e2306109f88 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/alterColumn.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/alterColumn.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { getFunctionErrors } from '../../../i18n'; import { emptyTable, testTable } from './__fixtures__/test_tables'; import { alterColumn } from './alterColumn'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/any.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/any.test.js index 5e546726979dc..18bab2594be8b 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/any.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/any.test.js @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { any } from './any'; describe('any', () => { diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/as.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/as.test.js index 14537fd798509..fce33b7ac2d26 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/as.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/as.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { asFn } from './as'; describe('as', () => { diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/axis_config.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/axis_config.test.js index ae4e3694338e0..a414356cb4b3d 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/axis_config.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/axis_config.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { getFunctionErrors } from '../../../i18n'; import { testTable } from './__fixtures__/test_tables'; import { axisConfig } from './axisConfig'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/case.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/case.test.js index 505460910c335..e36788e27b5e0 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/case.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/case.test.js @@ -7,7 +7,7 @@ import { of } from 'rxjs'; import { TestScheduler } from 'rxjs/testing'; -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { caseFn } from './case'; describe('case', () => { diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/clear.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/clear.test.js index 8cd24fb16b39f..8d203300fd649 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/clear.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/clear.test.js @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { testTable } from './__fixtures__/test_tables'; import { clear } from './clear'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/columns.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/columns.test.js index f835893b2a423..b13806bd17554 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/columns.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/columns.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { emptyTable, testTable } from './__fixtures__/test_tables'; import { columns } from './columns'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/compare.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/compare.test.js index fea6c891ffb54..f9fe2f74563a7 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/compare.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/compare.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { getFunctionErrors } from '../../../i18n'; import { compare } from './compare'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/container_style.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/container_style.test.js index f5cc3eb93001e..223b8532d8a56 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/container_style.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/container_style.test.js @@ -5,7 +5,8 @@ * 2.0. */ -import { functionWrapper, getElasticLogo } from '@kbn/presentation-util-plugin/common'; +import { getElasticLogo } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { getFunctionErrors } from '../../../i18n'; import { containerStyle } from './containerStyle'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/context.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/context.test.js index e927dc12745c3..7101d75da7df0 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/context.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/context.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { testTable, emptyTable } from './__fixtures__/test_tables'; import { context } from './context'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/csv.test.ts b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/csv.test.ts index ba4fb5c3504d1..a3941afc07e44 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/csv.test.ts +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/csv.test.ts @@ -6,7 +6,7 @@ */ import { SerializableRecord } from '@kbn/utility-types'; -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { getFunctionErrors } from '../../../i18n'; import { csv } from './csv'; import { Datatable, ExecutionContext } from '@kbn/expressions-plugin/common'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/date.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/date.test.js index ff070f284b3f7..81d7ed9755d41 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/date.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/date.test.js @@ -6,7 +6,7 @@ */ import sinon from 'sinon'; -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { getFunctionErrors } from '../../../i18n'; import { date } from './date'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/do.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/do.test.js index 2896e75ffd180..9571c3b07f4a8 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/do.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/do.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { doFn } from './do'; describe('do', () => { diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/dropdown_control.test.ts b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/dropdown_control.test.ts index af0e319d0216e..c3cf677c87ff6 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/dropdown_control.test.ts +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/dropdown_control.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { testTable, relationalTable } from './__fixtures__/test_tables'; import { dropdownControl } from './dropdownControl'; import { ExecutionContext } from '@kbn/expressions-plugin/common'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/eq.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/eq.test.js index 2b0f5f2689518..92937a8b96f55 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/eq.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/eq.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { eq } from './eq'; describe('eq', () => { diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/exactly.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/exactly.test.js index 4ed2144540c6a..edff9bb662201 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/exactly.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/exactly.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { emptyFilter } from './__fixtures__/test_filters'; import { exactly } from './exactly'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/filterrows.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/filterrows.test.js index 9b113f2d1c389..c3dbfc419bde4 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/filterrows.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/filterrows.test.js @@ -7,7 +7,7 @@ import { of } from 'rxjs'; import { TestScheduler } from 'rxjs/testing'; -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { testTable } from './__fixtures__/test_tables'; import { filterrows } from './filterrows'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/formatdate.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/formatdate.test.js index 9cfb45b689ac6..3946bb15adaef 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/formatdate.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/formatdate.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { formatdate } from './formatdate'; describe('formatdate', () => { diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/formatnumber.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/formatnumber.test.js index 38a95d353d665..2943b5944bc6a 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/formatnumber.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/formatnumber.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { formatnumber } from './formatnumber'; describe('formatnumber', () => { diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/getCell.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/getCell.test.js index 319bb58fdcaea..86075369a3e30 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/getCell.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/getCell.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { getFunctionErrors } from '../../../i18n'; import { emptyTable, testTable } from './__fixtures__/test_tables'; import { getCell } from './getCell'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/gt.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/gt.test.js index 14db8f7bfc386..54c2ec9c5b978 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/gt.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/gt.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { gt } from './gt'; describe('gt', () => { diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/gte.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/gte.test.js index b69ab03bc1953..894cc90aa1b29 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/gte.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/gte.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { gte } from './gte'; describe('gte', () => { diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/head.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/head.test.js index a2aedea170ae5..c4aa2b9a33dd6 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/head.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/head.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { emptyTable, testTable } from './__fixtures__/test_tables'; import { head } from './head'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/if.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/if.test.js index c922916aa88a7..752f2299390fc 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/if.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/if.test.js @@ -7,7 +7,7 @@ import { of } from 'rxjs'; import { TestScheduler } from 'rxjs/testing'; -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { ifFn } from './if'; describe('if', () => { diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/join_rows.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/join_rows.test.js index caf75d54dd1ce..40728cf1f4c04 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/join_rows.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/join_rows.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { getFunctionErrors } from '../../../i18n'; import { testTable } from './__fixtures__/test_tables'; import { joinRows } from './join_rows'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/lt.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/lt.test.js index d2dcfb0087779..397a3d639c94d 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/lt.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/lt.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { lt } from './lt'; describe('lt', () => { diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/lte.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/lte.test.js index 701ddbfcd4de7..fdc960f17fde6 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/lte.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/lte.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { lte } from './lte'; describe('lte', () => { diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/neq.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/neq.test.js index fba309b23728c..1f2a7914dded4 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/neq.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/neq.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { neq } from './neq'; describe('neq', () => { diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/ply.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/ply.test.js index 19683aae2c3d2..af5b7673c492a 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/ply.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/ply.test.js @@ -7,7 +7,7 @@ import { of } from 'rxjs'; import { TestScheduler } from 'rxjs/testing'; -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { getFunctionErrors } from '../../../i18n'; import { testTable } from './__fixtures__/test_tables'; import { ply } from './ply'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/render.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/render.test.js index 20e48a27de6d2..4250ee9dd3d34 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/render.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/render.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { DEFAULT_ELEMENT_CSS } from '../../../common/lib/constants'; import { testTable } from './__fixtures__/test_tables'; import { fontStyle, getContainerStyle } from './__fixtures__/test_styles'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/replace.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/replace.test.js index 7f54d79039f0a..ee74865c0578d 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/replace.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/replace.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { replace } from './replace'; describe('replace', () => { diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/rounddate.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/rounddate.test.js index 2c9e2c790df53..6f559afc2903a 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/rounddate.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/rounddate.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { rounddate } from './rounddate'; describe('rounddate', () => { diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/rowCount.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/rowCount.test.js index 27e2c29d4fa5f..34ad6714e267a 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/rowCount.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/rowCount.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { emptyTable, testTable } from './__fixtures__/test_tables'; import { rowCount } from './rowCount'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/series_style.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/series_style.test.js index 098456da0267a..c47538bc6b77b 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/series_style.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/series_style.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { seriesStyle } from './seriesStyle'; describe('seriesStyle', () => { diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/sort.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/sort.test.js index 110cd0cc0ef5d..4accbfee50463 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/sort.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/sort.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { testTable } from './__fixtures__/test_tables'; import { sort } from './sort'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/staticColumn.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/staticColumn.test.js index 04280d092958d..07dffb5e29bb7 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/staticColumn.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/staticColumn.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { testTable, emptyTable } from './__fixtures__/test_tables'; import { staticColumn } from './staticColumn'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/string.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/string.test.js index 33ca2809aedcb..8924ac47c823f 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/string.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/string.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { string } from './string'; describe('string', () => { diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/switch.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/switch.test.js index d79dc3e8405a7..3319ee63d7039 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/switch.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/switch.test.js @@ -7,7 +7,7 @@ import { of } from 'rxjs'; import { TestScheduler } from 'rxjs/testing'; -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { switchFn } from './switch'; describe('switch', () => { diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/table.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/table.test.js index b03463bf48ca9..e6e51c78f6f07 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/table.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/table.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper, fontStyle } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper, fontStyle } from '@kbn/presentation-util-plugin/test_helpers'; import { testTable } from './__fixtures__/test_tables'; import { table } from './table'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/tail.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/tail.test.js index 3ac1d6969666f..647dded8eb13d 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/tail.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/tail.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { emptyTable, testTable } from './__fixtures__/test_tables'; import { tail } from './tail'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/timefilter.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/timefilter.test.js index 6a76514628dbc..37ea5f5a7650d 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/timefilter.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/timefilter.test.js @@ -6,7 +6,7 @@ */ import sinon from 'sinon'; -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { getFunctionErrors } from '../../../i18n'; import { emptyFilter } from './__fixtures__/test_filters'; import { timefilter } from './timefilter'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/timefilter_control.test.js b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/timefilter_control.test.js index 84ac9f2f6dfbd..c2bc948f544b5 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/functions/common/timefilter_control.test.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/functions/common/timefilter_control.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { timefilterControl } from './timefilterControl'; describe('timefilterControl', () => { diff --git a/x-pack/plugins/canvas/public/functions/pie.test.js b/x-pack/plugins/canvas/public/functions/pie.test.js index 2bf11a67d7a9a..30500929d736f 100644 --- a/x-pack/plugins/canvas/public/functions/pie.test.js +++ b/x-pack/plugins/canvas/public/functions/pie.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { fontStyle, functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { fontStyle, functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { testPie } from '../../canvas_plugin_src/functions/common/__fixtures__/test_pointseries'; import { grayscalePalette, diff --git a/x-pack/plugins/canvas/public/functions/plot.test.js b/x-pack/plugins/canvas/public/functions/plot.test.js index 9d1dbceee694d..474d499d15357 100644 --- a/x-pack/plugins/canvas/public/functions/plot.test.js +++ b/x-pack/plugins/canvas/public/functions/plot.test.js @@ -5,7 +5,7 @@ * 2.0. */ -import { fontStyle, functionWrapper } from '@kbn/presentation-util-plugin/common'; +import { fontStyle, functionWrapper } from '@kbn/presentation-util-plugin/test_helpers'; import { testPlot } from '../../canvas_plugin_src/functions/common/__fixtures__/test_pointseries'; import { grayscalePalette, diff --git a/x-pack/plugins/canvas/public/functions/plot/get_font_spec.test.js b/x-pack/plugins/canvas/public/functions/plot/get_font_spec.test.js index 9a508dff6f242..dd29987204118 100644 --- a/x-pack/plugins/canvas/public/functions/plot/get_font_spec.test.js +++ b/x-pack/plugins/canvas/public/functions/plot/get_font_spec.test.js @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { fontStyle } from '@kbn/presentation-util-plugin/common'; +import { fontStyle } from '@kbn/presentation-util-plugin/test_helpers'; import { defaultSpec, getFontSpec } from './get_font_spec'; describe('getFontSpec', () => { diff --git a/x-pack/plugins/cloud_security_posture/server/plugin.test.ts b/x-pack/plugins/cloud_security_posture/server/plugin.test.ts index e9ce21173e94e..17c08cf3006e9 100644 --- a/x-pack/plugins/cloud_security_posture/server/plugin.test.ts +++ b/x-pack/plugins/cloud_security_posture/server/plugin.test.ts @@ -19,8 +19,8 @@ import { createPackagePolicyMock, deletePackagePolicyMock } from '@kbn/fleet-plu import { dataPluginMock } from '@kbn/data-plugin/server/mocks'; import { CspPlugin } from './plugin'; import { CspServerPluginStartDeps } from './types'; +import { createFleetAuthzMock } from '@kbn/fleet-plugin/common/mocks'; import { - createFleetAuthzMock, Installation, ListResult, PackagePolicy, diff --git a/x-pack/plugins/fleet/common/index.ts b/x-pack/plugins/fleet/common/index.ts index 25b108e9ad0d5..3dc816f9f3090 100644 --- a/x-pack/plugins/fleet/common/index.ts +++ b/x-pack/plugins/fleet/common/index.ts @@ -71,8 +71,6 @@ export { } from './services'; export type { FleetAuthz } from './authz'; -// eslint-disable-next-line @kbn/imports/no_boundary_crossing -export { createFleetAuthzMock } from './mocks'; export type { // Request/Response GetOneAgentResponse, diff --git a/x-pack/plugins/fleet/server/mocks/index.ts b/x-pack/plugins/fleet/server/mocks/index.ts index 3166253871123..d6620fe4c3fb9 100644 --- a/x-pack/plugins/fleet/server/mocks/index.ts +++ b/x-pack/plugins/fleet/server/mocks/index.ts @@ -24,7 +24,7 @@ import type { FleetAppContext } from '../plugin'; import { createMockTelemetryEventsSender } from '../telemetry/__mocks__'; import type { FleetConfigType } from '../../common/types'; import type { ExperimentalFeatures } from '../../common/experimental_features'; -import { createFleetAuthzMock } from '../../common'; +import { createFleetAuthzMock } from '../../common/mocks'; import { agentServiceMock } from '../services/agents/agent_service.mock'; import type { FleetRequestHandlerContext } from '../types'; import { packageServiceMock } from '../services/epm/package_service.mock'; diff --git a/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts b/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts index f4b35508e52c8..f073b8516a3d6 100644 --- a/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts +++ b/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts @@ -20,7 +20,7 @@ import { appContextService } from '../../services/app_context'; import { setupFleet } from '../../services/setup'; import type { FleetRequestHandlerContext } from '../../types'; -import { createFleetAuthzMock } from '../../../common'; +import { createFleetAuthzMock } from '../../../common/mocks'; import { fleetSetupHandler } from './handlers'; diff --git a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts index 34226900cbcc7..493e5d9ee3d75 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts @@ -7,7 +7,7 @@ import { calculateEndpointAuthz, getEndpointAuthzInitialState } from './authz'; import type { FleetAuthz } from '@kbn/fleet-plugin/common'; -import { createFleetAuthzMock } from '@kbn/fleet-plugin/common'; +import { createFleetAuthzMock } from '@kbn/fleet-plugin/common/mocks'; import { createLicenseServiceMock } from '../../../license/mocks'; import type { EndpointAuthzKeyList } from '../../types/authz'; diff --git a/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.test.ts b/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.test.ts index d5712bee73746..ee1480f2db641 100644 --- a/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.test.ts @@ -10,7 +10,7 @@ import { act, renderHook } from '@testing-library/react-hooks'; import { securityMock } from '@kbn/security-plugin/public/mocks'; import type { AuthenticatedUser } from '@kbn/security-plugin/common'; -import { createFleetAuthzMock } from '@kbn/fleet-plugin/common'; +import { createFleetAuthzMock } from '@kbn/fleet-plugin/common/mocks'; import type { EndpointPrivileges } from '../../../../../common/endpoint/types'; import { useCurrentUser, useKibana, useHttp as _useHttp } from '../../../lib/kibana'; diff --git a/x-pack/plugins/security_solution/public/management/links.test.ts b/x-pack/plugins/security_solution/public/management/links.test.ts index a00d03fff59d6..b86a3ac13869b 100644 --- a/x-pack/plugins/security_solution/public/management/links.test.ts +++ b/x-pack/plugins/security_solution/public/management/links.test.ts @@ -20,7 +20,7 @@ import { licenseService as _licenseService } from '../common/hooks/use_license'; import type { LicenseService } from '../../common/license'; import { createLicenseServiceMock } from '../../common/license/mocks'; import type { FleetAuthz } from '@kbn/fleet-plugin/common'; -import { createFleetAuthzMock } from '@kbn/fleet-plugin/common'; +import { createFleetAuthzMock } from '@kbn/fleet-plugin/common/mocks'; import type { DeepPartial } from '@kbn/utility-types'; import { merge } from 'lodash'; import { ENDPOINT_ARTIFACT_LISTS } from '@kbn/securitysolution-list-constants'; diff --git a/x-pack/plugins/security_solution/server/endpoint/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/mocks.ts index 61593f51aae6d..3d9329ed85cff 100644 --- a/x-pack/plugins/security_solution/server/endpoint/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/mocks.ts @@ -39,7 +39,7 @@ import { // file and not bundled with the application, adding a eslint disable below and using import from // a restricted path. import { createCasesClientMock } from '@kbn/cases-plugin/server/client/mocks'; -import { createFleetAuthzMock } from '@kbn/fleet-plugin/common'; +import { createFleetAuthzMock } from '@kbn/fleet-plugin/common/mocks'; import type { RequestFixtureOptions } from '@kbn/core-http-router-server-mocks'; import type { ElasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { getEndpointAuthzInitialStateMock } from '../../common/endpoint/service/authz/mocks'; diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/base_validator.test.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/base_validator.test.ts index 81f11ef16246e..9abe0b6b04147 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/base_validator.test.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/base_validator.test.ts @@ -14,7 +14,7 @@ import { BaseValidatorMock, createExceptionItemLikeOptionsMock } from './mocks'; import { EndpointArtifactExceptionValidationError } from './errors'; import { httpServerMock } from '@kbn/core/server/mocks'; import type { PackagePolicy } from '@kbn/fleet-plugin/common'; -import { createFleetAuthzMock } from '@kbn/fleet-plugin/common'; +import { createFleetAuthzMock } from '@kbn/fleet-plugin/common/mocks'; import type { PackagePolicyClient } from '@kbn/fleet-plugin/server'; import type { ExceptionItemLikeOptions } from '../types'; import {