Cleanup TS in home plugin (#94516) (#94524)

* fix problem with home plugin

* home: /mocks/index.ts --> mocks

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Mikhail Shustov <restrry@gmail.com>
This commit is contained in:
Kibana Machine 2021-03-12 09:44:07 -05:00 committed by GitHub
parent 336eb55de7
commit ff03d9bad3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 17 deletions

View file

@ -9,6 +9,7 @@
import React from 'react';
import { AddData } from './add_data';
import { shallowWithIntl } from '@kbn/test/jest';
import { FeatureCatalogueEntry, FeatureCatalogueCategory } from '../../../services';
jest.mock('../app_navigation_handler', () => {
return {
@ -28,9 +29,9 @@ beforeEach(() => {
const addBasePathMock = jest.fn((path: string) => (path ? path : 'path'));
const mockFeatures = [
const mockFeatures: FeatureCatalogueEntry[] = [
{
category: 'data',
category: FeatureCatalogueCategory.DATA,
description: 'Ingest data from popular apps and services.',
showOnHomePage: true,
icon: 'indexOpen',
@ -40,7 +41,7 @@ const mockFeatures = [
title: 'Ingest data',
},
{
category: 'admin',
category: FeatureCatalogueCategory.ADMIN,
description: 'Add and manage your fleet of Elastic Agents and integrations.',
showOnHomePage: true,
icon: 'indexManagementApp',
@ -50,7 +51,7 @@ const mockFeatures = [
title: 'Add Elastic Agent',
},
{
category: 'data',
category: FeatureCatalogueCategory.DATA,
description: 'Import your own CSV, NDJSON, or log file',
showOnHomePage: true,
icon: 'document',

View file

@ -11,8 +11,7 @@ import PropTypes from 'prop-types';
import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiTitle } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { METRIC_TYPE } from '@kbn/analytics';
// @ts-expect-error untyped service
import { FeatureCatalogueEntry } from '../../services';
import type { FeatureCatalogueEntry } from '../../../services';
import { createAppNavigationHandler } from '../app_navigation_handler';
// @ts-expect-error untyped component
import { Synopsis } from '../synopsis';

View file

@ -9,6 +9,7 @@
import React from 'react';
import { ManageData } from './manage_data';
import { shallowWithIntl } from '@kbn/test/jest';
import { FeatureCatalogueEntry, FeatureCatalogueCategory } from '../../../services';
jest.mock('../app_navigation_handler', () => {
return {
@ -28,9 +29,9 @@ beforeEach(() => {
const addBasePathMock = jest.fn((path: string) => (path ? path : 'path'));
const mockFeatures = [
const mockFeatures: FeatureCatalogueEntry[] = [
{
category: 'admin',
category: FeatureCatalogueCategory.ADMIN,
description: 'Control who has access and what tasks they can perform.',
icon: 'securityApp',
id: 'security',
@ -40,7 +41,7 @@ const mockFeatures = [
showOnHomePage: true,
},
{
category: 'admin',
category: FeatureCatalogueCategory.ADMIN,
description: 'Track the real-time health and performance of your deployment.',
icon: 'monitoringApp',
id: 'monitoring',
@ -50,7 +51,7 @@ const mockFeatures = [
showOnHomePage: true,
},
{
category: 'admin',
category: FeatureCatalogueCategory.ADMIN,
description:
'Save snapshots to a backup repository, and restore to recover index and cluster state.',
icon: 'storage',
@ -61,7 +62,7 @@ const mockFeatures = [
showOnHomePage: true,
},
{
category: 'admin',
category: FeatureCatalogueCategory.ADMIN,
description: 'Define lifecycle policies to automatically perform operations as an index ages.',
icon: 'indexSettings',
id: 'index_lifecycle_management',

View file

@ -11,8 +11,7 @@ import PropTypes from 'prop-types';
import { EuiFlexGroup, EuiHorizontalRule, EuiSpacer, EuiTitle, EuiFlexItem } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { METRIC_TYPE } from '@kbn/analytics';
// @ts-expect-error untyped service
import { FeatureCatalogueEntry } from '../../services';
import { FeatureCatalogueEntry } from '../../../services';
import { createAppNavigationHandler } from '../app_navigation_handler';
// @ts-expect-error untyped component
import { Synopsis } from '../synopsis';

View file

@ -6,10 +6,10 @@
* Side Public License, v 1.
*/
import { featureCatalogueRegistryMock } from '../services/feature_catalogue/feature_catalogue_registry.mock';
import { environmentServiceMock } from '../services/environment/environment.mock';
import { configSchema } from '../../config';
import { tutorialServiceMock } from '../services/tutorials/tutorial_service.mock';
import { featureCatalogueRegistryMock } from './services/feature_catalogue/feature_catalogue_registry.mock';
import { environmentServiceMock } from './services/environment/environment.mock';
import { configSchema } from '../config';
import { tutorialServiceMock } from './services/tutorials/tutorial_service.mock';
const createSetupContract = () => ({
featureCatalogue: featureCatalogueRegistryMock.createSetup(),