mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[presUtils/fleet] stop importing test helpers in bundles (#148825)
This PR stops importing: - `functionWrapper` and `fontStyle` test helpers in `@kbn/presentation-util-plugin/common` - `createFleetAuthzMock` test helper in `@kbn/fleet-plugin/common` These are instead imported from a `*/mocks` or `*/test_helpers` import target and the related `eslint-disable` comments were removed. While working through some changes to the package system I fixed a bug in the source classifier which made these issues clear and made a fix required. The changes have been broken out of my massive PR to make review simpler.
This commit is contained in:
parent
4975a766f6
commit
ffeb61a75f
71 changed files with 112 additions and 110 deletions
|
@ -141,9 +141,9 @@ module.exports = {
|
||||||
/**
|
/**
|
||||||
* ESLint rule to aid with breaking up packages:
|
* ESLint rule to aid with breaking up packages:
|
||||||
*
|
*
|
||||||
* `fromPacakge` the package name which was broken up
|
* `from` the package/request where the exports used to be
|
||||||
* `toPackage` the package where the removed exports were placed
|
* `to` the package/request where the exports are now
|
||||||
* `exportNames` the list of exports which used to be found in `fromPacakge` and are now found in `toPackage`
|
* `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
|
* 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
|
* 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', [
|
'@kbn/imports/exports_moved_packages': ['error', [
|
||||||
{
|
{
|
||||||
fromPackage: '@kbn/dev-utils',
|
from: '@kbn/dev-utils',
|
||||||
toPackage: '@kbn/tooling-log',
|
to: '@kbn/tooling-log',
|
||||||
exportNames: [
|
exportNames: [
|
||||||
'DEFAULT_LOG_LEVEL',
|
'DEFAULT_LOG_LEVEL',
|
||||||
'getLogLevelFlagsHelp',
|
'getLogLevelFlagsHelp',
|
||||||
|
@ -171,8 +171,8 @@ module.exports = {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fromPackage: '@kbn/dev-utils',
|
from: '@kbn/dev-utils',
|
||||||
toPackage: '@kbn/ci-stats-reporter',
|
to: '@kbn/ci-stats-reporter',
|
||||||
exportNames: [
|
exportNames: [
|
||||||
'CiStatsMetric',
|
'CiStatsMetric',
|
||||||
'CiStatsReporter',
|
'CiStatsReporter',
|
||||||
|
@ -188,15 +188,15 @@ module.exports = {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fromPackage: '@kbn/dev-utils',
|
from: '@kbn/dev-utils',
|
||||||
toPackage: '@kbn/ci-stats-core',
|
to: '@kbn/ci-stats-core',
|
||||||
exportNames: [
|
exportNames: [
|
||||||
'Config',
|
'Config',
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fromPackage: '@kbn/dev-utils',
|
from: '@kbn/dev-utils',
|
||||||
toPackage: '@kbn/jest-serializers',
|
to: '@kbn/jest-serializers',
|
||||||
exportNames: [
|
exportNames: [
|
||||||
'createAbsolutePathSerializer',
|
'createAbsolutePathSerializer',
|
||||||
'createStripAnsiSerializer',
|
'createStripAnsiSerializer',
|
||||||
|
@ -206,23 +206,23 @@ module.exports = {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fromPackage: '@kbn/dev-utils',
|
from: '@kbn/dev-utils',
|
||||||
toPackage: '@kbn/stdio-dev-helpers',
|
to: '@kbn/stdio-dev-helpers',
|
||||||
exportNames: [
|
exportNames: [
|
||||||
'observeReadable',
|
'observeReadable',
|
||||||
'observeLines',
|
'observeLines',
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fromPackage: '@kbn/dev-utils',
|
from: '@kbn/dev-utils',
|
||||||
toPackage: '@kbn/sort-package-json',
|
to: '@kbn/sort-package-json',
|
||||||
exportNames: [
|
exportNames: [
|
||||||
'sortPackageJson',
|
'sortPackageJson',
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fromPackage: '@kbn/dev-utils',
|
from: '@kbn/dev-utils',
|
||||||
toPackage: '@kbn/dev-cli-runner',
|
to: '@kbn/dev-cli-runner',
|
||||||
exportNames: [
|
exportNames: [
|
||||||
'run',
|
'run',
|
||||||
'Command',
|
'Command',
|
||||||
|
@ -242,8 +242,8 @@ module.exports = {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fromPackage: '@kbn/dev-utils',
|
from: '@kbn/dev-utils',
|
||||||
toPackage: '@kbn/dev-cli-errors',
|
to: '@kbn/dev-cli-errors',
|
||||||
exportNames: [
|
exportNames: [
|
||||||
'createFailError',
|
'createFailError',
|
||||||
'createFlagError',
|
'createFlagError',
|
||||||
|
@ -251,16 +251,16 @@ module.exports = {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fromPackage: '@kbn/dev-utils',
|
from: '@kbn/dev-utils',
|
||||||
toPackage: '@kbn/dev-proc-runner',
|
to: '@kbn/dev-proc-runner',
|
||||||
exportNames: [
|
exportNames: [
|
||||||
'withProcRunner',
|
'withProcRunner',
|
||||||
'ProcRunner',
|
'ProcRunner',
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fromPackage: '@kbn/utils',
|
from: '@kbn/utils',
|
||||||
toPackage: '@kbn/repo-info',
|
to: '@kbn/repo-info',
|
||||||
exportNames: [
|
exportNames: [
|
||||||
'REPO_ROOT',
|
'REPO_ROOT',
|
||||||
'UPSTREAM_BRANCH',
|
'UPSTREAM_BRANCH',
|
||||||
|
@ -269,6 +269,21 @@ module.exports = {
|
||||||
'fromRoot',
|
'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',
|
'@kbn/disable/no_protected_eslint_disable': 'error',
|
||||||
|
|
|
@ -14,7 +14,7 @@ import { RUNNING_IN_EDITOR } from './helpers/running_in_editor';
|
||||||
let importResolverCache: ImportResolver | undefined;
|
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.
|
* 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
|
* All import requests in the repository should return a result, if they don't it's a bug
|
||||||
|
|
|
@ -16,8 +16,8 @@ const OPTIONS: MovedExportsRule[][] = [
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
exportNames: ['foo', 'bar'],
|
exportNames: ['foo', 'bar'],
|
||||||
fromPackage: 'old',
|
from: 'old',
|
||||||
toPackage: 'new',
|
to: 'new',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
|
@ -13,8 +13,8 @@ import { TSESTree } from '@typescript-eslint/typescript-estree';
|
||||||
import { visitAllImportStatements, Importer } from '../helpers/visit_all_import_statements';
|
import { visitAllImportStatements, Importer } from '../helpers/visit_all_import_statements';
|
||||||
|
|
||||||
export interface MovedExportsRule {
|
export interface MovedExportsRule {
|
||||||
fromPackage: string;
|
from: string;
|
||||||
toPackage: string;
|
to: string;
|
||||||
exportNames: string[];
|
exportNames: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ function getBadImports(imported: Imported[], rules: MovedExportsRule[]): BadImpo
|
||||||
node: i.node,
|
node: i.node,
|
||||||
id: i.id,
|
id: i.id,
|
||||||
name: i.name,
|
name: i.name,
|
||||||
newPkg: match.toPackage,
|
newPkg: match.to,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -203,10 +203,10 @@ export const ExportsMovedPackagesRule: Rule.RuleModule = {
|
||||||
items: {
|
items: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
fromPackage: {
|
from: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
},
|
},
|
||||||
toPackage: {
|
to: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
},
|
},
|
||||||
exportNames: {
|
exportNames: {
|
||||||
|
@ -268,7 +268,7 @@ export const ExportsMovedPackagesRule: Rule.RuleModule = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const rulesForRightPackage = rules.filter((m) => m.fromPackage === req);
|
const rulesForRightPackage = rules.filter((m) => m.from === req);
|
||||||
if (!rulesForRightPackage.length) {
|
if (!rulesForRightPackage.length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,11 +8,8 @@
|
||||||
|
|
||||||
import expect from '@kbn/expect';
|
import expect from '@kbn/expect';
|
||||||
import { ExecutionContext } from '@kbn/expressions-plugin/common';
|
import { ExecutionContext } from '@kbn/expressions-plugin/common';
|
||||||
import {
|
import { getElasticLogo, getElasticOutline } from '@kbn/presentation-util-plugin/common';
|
||||||
functionWrapper,
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
getElasticLogo,
|
|
||||||
getElasticOutline,
|
|
||||||
} from '@kbn/presentation-util-plugin/common';
|
|
||||||
import { imageFunction as image } from './image_function';
|
import { imageFunction as image } from './image_function';
|
||||||
|
|
||||||
describe('image', () => {
|
describe('image', () => {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ExecutionContext } from '@kbn/expressions-plugin/common';
|
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';
|
import { metricFunction } from './metric_function';
|
||||||
|
|
||||||
describe('metric', () => {
|
describe('metric', () => {
|
||||||
|
|
|
@ -7,11 +7,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ExecutionContext } from '@kbn/expressions-plugin/common';
|
import { ExecutionContext } from '@kbn/expressions-plugin/common';
|
||||||
import {
|
import { getElasticLogo, getElasticOutline } from '@kbn/presentation-util-plugin/common';
|
||||||
getElasticLogo,
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
getElasticOutline,
|
|
||||||
functionWrapper,
|
|
||||||
} from '@kbn/presentation-util-plugin/common';
|
|
||||||
import { repeatImageFunction } from './repeat_image_function';
|
import { repeatImageFunction } from './repeat_image_function';
|
||||||
|
|
||||||
describe('repeatImage', () => {
|
describe('repeatImage', () => {
|
||||||
|
|
|
@ -6,11 +6,8 @@
|
||||||
* Side Public License, v 1.
|
* Side Public License, v 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
import { getElasticOutline, getElasticLogo } from '@kbn/presentation-util-plugin/common';
|
||||||
functionWrapper,
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
getElasticOutline,
|
|
||||||
getElasticLogo,
|
|
||||||
} from '@kbn/presentation-util-plugin/common';
|
|
||||||
import { revealImageFunction, errors } from './reveal_image_function';
|
import { revealImageFunction, errors } from './reveal_image_function';
|
||||||
import { Origin } from '../types';
|
import { Origin } from '../types';
|
||||||
import { ExecutionContext } from '@kbn/expressions-plugin/common';
|
import { ExecutionContext } from '@kbn/expressions-plugin/common';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ExecutionContext } from '@kbn/expressions-plugin/common';
|
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';
|
import { progressFunction, errors } from './progress_function';
|
||||||
|
|
||||||
describe('progress', () => {
|
describe('progress', () => {
|
||||||
|
|
|
@ -37,8 +37,6 @@ export {
|
||||||
export {
|
export {
|
||||||
defaultTheme$,
|
defaultTheme$,
|
||||||
getElasticLogo,
|
getElasticLogo,
|
||||||
fontStyle,
|
|
||||||
functionWrapper,
|
|
||||||
getElasticOutline,
|
getElasticOutline,
|
||||||
isValidUrl,
|
isValidUrl,
|
||||||
resolveWithMissingImage,
|
resolveWithMissingImage,
|
||||||
|
|
|
@ -7,5 +7,3 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export * from './utils';
|
export * from './utils';
|
||||||
// eslint-disable-next-line @kbn/imports/no_boundary_crossing
|
|
||||||
export * from './test_helpers';
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
"public/**/*",
|
"public/**/*",
|
||||||
"public/**/*.json",
|
"public/**/*.json",
|
||||||
"server/**/*",
|
"server/**/*",
|
||||||
|
"test_helpers/**/*",
|
||||||
"storybook/**/*",
|
"storybook/**/*",
|
||||||
"../../../typings/**/*"
|
"../../../typings/**/*"
|
||||||
],
|
],
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 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 { testTable } from '../common/__fixtures__/test_tables';
|
||||||
import { markdown } from './markdown';
|
import { markdown } from './markdown';
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { all } from './all';
|
import { all } from './all';
|
||||||
|
|
||||||
describe('all', () => {
|
describe('all', () => {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { getFunctionErrors } from '../../../i18n';
|
import { getFunctionErrors } from '../../../i18n';
|
||||||
import { emptyTable, testTable } from './__fixtures__/test_tables';
|
import { emptyTable, testTable } from './__fixtures__/test_tables';
|
||||||
import { alterColumn } from './alterColumn';
|
import { alterColumn } from './alterColumn';
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { any } from './any';
|
import { any } from './any';
|
||||||
|
|
||||||
describe('any', () => {
|
describe('any', () => {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { asFn } from './as';
|
import { asFn } from './as';
|
||||||
|
|
||||||
describe('as', () => {
|
describe('as', () => {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { getFunctionErrors } from '../../../i18n';
|
import { getFunctionErrors } from '../../../i18n';
|
||||||
import { testTable } from './__fixtures__/test_tables';
|
import { testTable } from './__fixtures__/test_tables';
|
||||||
import { axisConfig } from './axisConfig';
|
import { axisConfig } from './axisConfig';
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
import { TestScheduler } from 'rxjs/testing';
|
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';
|
import { caseFn } from './case';
|
||||||
|
|
||||||
describe('case', () => {
|
describe('case', () => {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||||
* 2.0.
|
* 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 { testTable } from './__fixtures__/test_tables';
|
||||||
import { clear } from './clear';
|
import { clear } from './clear';
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 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 { emptyTable, testTable } from './__fixtures__/test_tables';
|
||||||
import { columns } from './columns';
|
import { columns } from './columns';
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { getFunctionErrors } from '../../../i18n';
|
import { getFunctionErrors } from '../../../i18n';
|
||||||
import { compare } from './compare';
|
import { compare } from './compare';
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
* 2.0.
|
* 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 { getFunctionErrors } from '../../../i18n';
|
||||||
import { containerStyle } from './containerStyle';
|
import { containerStyle } from './containerStyle';
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 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 { testTable, emptyTable } from './__fixtures__/test_tables';
|
||||||
import { context } from './context';
|
import { context } from './context';
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { SerializableRecord } from '@kbn/utility-types';
|
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 { getFunctionErrors } from '../../../i18n';
|
||||||
import { csv } from './csv';
|
import { csv } from './csv';
|
||||||
import { Datatable, ExecutionContext } from '@kbn/expressions-plugin/common';
|
import { Datatable, ExecutionContext } from '@kbn/expressions-plugin/common';
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import sinon from 'sinon';
|
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 { getFunctionErrors } from '../../../i18n';
|
||||||
import { date } from './date';
|
import { date } from './date';
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { doFn } from './do';
|
import { doFn } from './do';
|
||||||
|
|
||||||
describe('do', () => {
|
describe('do', () => {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 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 { testTable, relationalTable } from './__fixtures__/test_tables';
|
||||||
import { dropdownControl } from './dropdownControl';
|
import { dropdownControl } from './dropdownControl';
|
||||||
import { ExecutionContext } from '@kbn/expressions-plugin/common';
|
import { ExecutionContext } from '@kbn/expressions-plugin/common';
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { eq } from './eq';
|
import { eq } from './eq';
|
||||||
|
|
||||||
describe('eq', () => {
|
describe('eq', () => {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 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 { emptyFilter } from './__fixtures__/test_filters';
|
||||||
import { exactly } from './exactly';
|
import { exactly } from './exactly';
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
import { TestScheduler } from 'rxjs/testing';
|
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 { testTable } from './__fixtures__/test_tables';
|
||||||
import { filterrows } from './filterrows';
|
import { filterrows } from './filterrows';
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { formatdate } from './formatdate';
|
import { formatdate } from './formatdate';
|
||||||
|
|
||||||
describe('formatdate', () => {
|
describe('formatdate', () => {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { formatnumber } from './formatnumber';
|
import { formatnumber } from './formatnumber';
|
||||||
|
|
||||||
describe('formatnumber', () => {
|
describe('formatnumber', () => {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { getFunctionErrors } from '../../../i18n';
|
import { getFunctionErrors } from '../../../i18n';
|
||||||
import { emptyTable, testTable } from './__fixtures__/test_tables';
|
import { emptyTable, testTable } from './__fixtures__/test_tables';
|
||||||
import { getCell } from './getCell';
|
import { getCell } from './getCell';
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { gt } from './gt';
|
import { gt } from './gt';
|
||||||
|
|
||||||
describe('gt', () => {
|
describe('gt', () => {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { gte } from './gte';
|
import { gte } from './gte';
|
||||||
|
|
||||||
describe('gte', () => {
|
describe('gte', () => {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 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 { emptyTable, testTable } from './__fixtures__/test_tables';
|
||||||
import { head } from './head';
|
import { head } from './head';
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
import { TestScheduler } from 'rxjs/testing';
|
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';
|
import { ifFn } from './if';
|
||||||
|
|
||||||
describe('if', () => {
|
describe('if', () => {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { getFunctionErrors } from '../../../i18n';
|
import { getFunctionErrors } from '../../../i18n';
|
||||||
import { testTable } from './__fixtures__/test_tables';
|
import { testTable } from './__fixtures__/test_tables';
|
||||||
import { joinRows } from './join_rows';
|
import { joinRows } from './join_rows';
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { lt } from './lt';
|
import { lt } from './lt';
|
||||||
|
|
||||||
describe('lt', () => {
|
describe('lt', () => {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { lte } from './lte';
|
import { lte } from './lte';
|
||||||
|
|
||||||
describe('lte', () => {
|
describe('lte', () => {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { neq } from './neq';
|
import { neq } from './neq';
|
||||||
|
|
||||||
describe('neq', () => {
|
describe('neq', () => {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
import { TestScheduler } from 'rxjs/testing';
|
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 { getFunctionErrors } from '../../../i18n';
|
||||||
import { testTable } from './__fixtures__/test_tables';
|
import { testTable } from './__fixtures__/test_tables';
|
||||||
import { ply } from './ply';
|
import { ply } from './ply';
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 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 { DEFAULT_ELEMENT_CSS } from '../../../common/lib/constants';
|
||||||
import { testTable } from './__fixtures__/test_tables';
|
import { testTable } from './__fixtures__/test_tables';
|
||||||
import { fontStyle, getContainerStyle } from './__fixtures__/test_styles';
|
import { fontStyle, getContainerStyle } from './__fixtures__/test_styles';
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { replace } from './replace';
|
import { replace } from './replace';
|
||||||
|
|
||||||
describe('replace', () => {
|
describe('replace', () => {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { rounddate } from './rounddate';
|
import { rounddate } from './rounddate';
|
||||||
|
|
||||||
describe('rounddate', () => {
|
describe('rounddate', () => {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 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 { emptyTable, testTable } from './__fixtures__/test_tables';
|
||||||
import { rowCount } from './rowCount';
|
import { rowCount } from './rowCount';
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { seriesStyle } from './seriesStyle';
|
import { seriesStyle } from './seriesStyle';
|
||||||
|
|
||||||
describe('seriesStyle', () => {
|
describe('seriesStyle', () => {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 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 { testTable } from './__fixtures__/test_tables';
|
||||||
import { sort } from './sort';
|
import { sort } from './sort';
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 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 { testTable, emptyTable } from './__fixtures__/test_tables';
|
||||||
import { staticColumn } from './staticColumn';
|
import { staticColumn } from './staticColumn';
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { string } from './string';
|
import { string } from './string';
|
||||||
|
|
||||||
describe('string', () => {
|
describe('string', () => {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
import { TestScheduler } from 'rxjs/testing';
|
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';
|
import { switchFn } from './switch';
|
||||||
|
|
||||||
describe('switch', () => {
|
describe('switch', () => {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 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 { testTable } from './__fixtures__/test_tables';
|
||||||
import { table } from './table';
|
import { table } from './table';
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 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 { emptyTable, testTable } from './__fixtures__/test_tables';
|
||||||
import { tail } from './tail';
|
import { tail } from './tail';
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import sinon from 'sinon';
|
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 { getFunctionErrors } from '../../../i18n';
|
||||||
import { emptyFilter } from './__fixtures__/test_filters';
|
import { emptyFilter } from './__fixtures__/test_filters';
|
||||||
import { timefilter } from './timefilter';
|
import { timefilter } from './timefilter';
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { functionWrapper } from '@kbn/presentation-util-plugin/common';
|
import { functionWrapper } from '@kbn/presentation-util-plugin/test_helpers';
|
||||||
import { timefilterControl } from './timefilterControl';
|
import { timefilterControl } from './timefilterControl';
|
||||||
|
|
||||||
describe('timefilterControl', () => {
|
describe('timefilterControl', () => {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 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 { testPie } from '../../canvas_plugin_src/functions/common/__fixtures__/test_pointseries';
|
||||||
import {
|
import {
|
||||||
grayscalePalette,
|
grayscalePalette,
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 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 { testPlot } from '../../canvas_plugin_src/functions/common/__fixtures__/test_pointseries';
|
||||||
import {
|
import {
|
||||||
grayscalePalette,
|
grayscalePalette,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||||
* 2.0.
|
* 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';
|
import { defaultSpec, getFontSpec } from './get_font_spec';
|
||||||
|
|
||||||
describe('getFontSpec', () => {
|
describe('getFontSpec', () => {
|
||||||
|
|
|
@ -19,8 +19,8 @@ import { createPackagePolicyMock, deletePackagePolicyMock } from '@kbn/fleet-plu
|
||||||
import { dataPluginMock } from '@kbn/data-plugin/server/mocks';
|
import { dataPluginMock } from '@kbn/data-plugin/server/mocks';
|
||||||
import { CspPlugin } from './plugin';
|
import { CspPlugin } from './plugin';
|
||||||
import { CspServerPluginStartDeps } from './types';
|
import { CspServerPluginStartDeps } from './types';
|
||||||
|
import { createFleetAuthzMock } from '@kbn/fleet-plugin/common/mocks';
|
||||||
import {
|
import {
|
||||||
createFleetAuthzMock,
|
|
||||||
Installation,
|
Installation,
|
||||||
ListResult,
|
ListResult,
|
||||||
PackagePolicy,
|
PackagePolicy,
|
||||||
|
|
|
@ -71,8 +71,6 @@ export {
|
||||||
} from './services';
|
} from './services';
|
||||||
|
|
||||||
export type { FleetAuthz } from './authz';
|
export type { FleetAuthz } from './authz';
|
||||||
// eslint-disable-next-line @kbn/imports/no_boundary_crossing
|
|
||||||
export { createFleetAuthzMock } from './mocks';
|
|
||||||
export type {
|
export type {
|
||||||
// Request/Response
|
// Request/Response
|
||||||
GetOneAgentResponse,
|
GetOneAgentResponse,
|
||||||
|
|
|
@ -24,7 +24,7 @@ import type { FleetAppContext } from '../plugin';
|
||||||
import { createMockTelemetryEventsSender } from '../telemetry/__mocks__';
|
import { createMockTelemetryEventsSender } from '../telemetry/__mocks__';
|
||||||
import type { FleetConfigType } from '../../common/types';
|
import type { FleetConfigType } from '../../common/types';
|
||||||
import type { ExperimentalFeatures } from '../../common/experimental_features';
|
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 { agentServiceMock } from '../services/agents/agent_service.mock';
|
||||||
import type { FleetRequestHandlerContext } from '../types';
|
import type { FleetRequestHandlerContext } from '../types';
|
||||||
import { packageServiceMock } from '../services/epm/package_service.mock';
|
import { packageServiceMock } from '../services/epm/package_service.mock';
|
||||||
|
|
|
@ -20,7 +20,7 @@ import { appContextService } from '../../services/app_context';
|
||||||
import { setupFleet } from '../../services/setup';
|
import { setupFleet } from '../../services/setup';
|
||||||
import type { FleetRequestHandlerContext } from '../../types';
|
import type { FleetRequestHandlerContext } from '../../types';
|
||||||
|
|
||||||
import { createFleetAuthzMock } from '../../../common';
|
import { createFleetAuthzMock } from '../../../common/mocks';
|
||||||
|
|
||||||
import { fleetSetupHandler } from './handlers';
|
import { fleetSetupHandler } from './handlers';
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
import { calculateEndpointAuthz, getEndpointAuthzInitialState } from './authz';
|
import { calculateEndpointAuthz, getEndpointAuthzInitialState } from './authz';
|
||||||
import type { FleetAuthz } from '@kbn/fleet-plugin/common';
|
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 { createLicenseServiceMock } from '../../../license/mocks';
|
||||||
import type { EndpointAuthzKeyList } from '../../types/authz';
|
import type { EndpointAuthzKeyList } from '../../types/authz';
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { act, renderHook } from '@testing-library/react-hooks';
|
||||||
|
|
||||||
import { securityMock } from '@kbn/security-plugin/public/mocks';
|
import { securityMock } from '@kbn/security-plugin/public/mocks';
|
||||||
import type { AuthenticatedUser } from '@kbn/security-plugin/common';
|
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 type { EndpointPrivileges } from '../../../../../common/endpoint/types';
|
||||||
import { useCurrentUser, useKibana, useHttp as _useHttp } from '../../../lib/kibana';
|
import { useCurrentUser, useKibana, useHttp as _useHttp } from '../../../lib/kibana';
|
||||||
|
|
|
@ -20,7 +20,7 @@ import { licenseService as _licenseService } from '../common/hooks/use_license';
|
||||||
import type { LicenseService } from '../../common/license';
|
import type { LicenseService } from '../../common/license';
|
||||||
import { createLicenseServiceMock } from '../../common/license/mocks';
|
import { createLicenseServiceMock } from '../../common/license/mocks';
|
||||||
import type { FleetAuthz } from '@kbn/fleet-plugin/common';
|
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 type { DeepPartial } from '@kbn/utility-types';
|
||||||
import { merge } from 'lodash';
|
import { merge } from 'lodash';
|
||||||
import { ENDPOINT_ARTIFACT_LISTS } from '@kbn/securitysolution-list-constants';
|
import { ENDPOINT_ARTIFACT_LISTS } from '@kbn/securitysolution-list-constants';
|
||||||
|
|
|
@ -39,7 +39,7 @@ import {
|
||||||
// file and not bundled with the application, adding a eslint disable below and using import from
|
// file and not bundled with the application, adding a eslint disable below and using import from
|
||||||
// a restricted path.
|
// a restricted path.
|
||||||
import { createCasesClientMock } from '@kbn/cases-plugin/server/client/mocks';
|
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 { RequestFixtureOptions } from '@kbn/core-http-router-server-mocks';
|
||||||
import type { ElasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks';
|
import type { ElasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks';
|
||||||
import { getEndpointAuthzInitialStateMock } from '../../common/endpoint/service/authz/mocks';
|
import { getEndpointAuthzInitialStateMock } from '../../common/endpoint/service/authz/mocks';
|
||||||
|
|
|
@ -14,7 +14,7 @@ import { BaseValidatorMock, createExceptionItemLikeOptionsMock } from './mocks';
|
||||||
import { EndpointArtifactExceptionValidationError } from './errors';
|
import { EndpointArtifactExceptionValidationError } from './errors';
|
||||||
import { httpServerMock } from '@kbn/core/server/mocks';
|
import { httpServerMock } from '@kbn/core/server/mocks';
|
||||||
import type { PackagePolicy } from '@kbn/fleet-plugin/common';
|
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 { PackagePolicyClient } from '@kbn/fleet-plugin/server';
|
||||||
import type { ExceptionItemLikeOptions } from '../types';
|
import type { ExceptionItemLikeOptions } from '../types';
|
||||||
import {
|
import {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue