Skip to content

Commit

Permalink
Fix Jest tests by removing use of BASE_PATH, made unnecessary by the …
Browse files Browse the repository at this point in the history
…NP migration of Management.
  • Loading branch information
cjcenizal committed Jun 3, 2020
1 parent 4bf9f62 commit 23f6e0e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@

import { registerTestBed, TestBed, TestBedConfig } from '../../../../../test_utils';
import { IndexManagementHome } from '../../../public/application/sections/home'; // eslint-disable-line @kbn/eslint/no-restricted-paths
import { BASE_PATH } from '../../../common/constants';
import { indexManagementStore } from '../../../public/application/store'; // eslint-disable-line @kbn/eslint/no-restricted-paths
import { WithAppDependencies, services, TestSubjects } from '../helpers';

const testBedConfig: TestBedConfig = {
store: () => indexManagementStore(services as any),
memoryRouter: {
initialEntries: [`${BASE_PATH}indices?includeHidden=true`],
componentRoutePath: `${BASE_PATH}:section(indices|templates)`,
initialEntries: [`/indices?includeHidden=true`],
componentRoutePath: `/:section(indices|templates)`,
},
doMountAsync: true,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ import { act } from 'react-dom/test-utils';

import { registerTestBed, TestBed, TestBedConfig } from '../../../../../test_utils';
import { IndexList } from '../../../public/application/sections/home/index_list'; // eslint-disable-line @kbn/eslint/no-restricted-paths
import { BASE_PATH } from '../../../common/constants';
import { indexManagementStore } from '../../../public/application/store'; // eslint-disable-line @kbn/eslint/no-restricted-paths
import { WithAppDependencies, services, TestSubjects } from '../helpers';

const testBedConfig: TestBedConfig = {
store: () => indexManagementStore(services as any),
memoryRouter: {
initialEntries: [`${BASE_PATH}indices?includeHidden=true`],
componentRoutePath: `${BASE_PATH}:section(indices|templates)`,
initialEntries: [`/indices?includeHidden=true`],
componentRoutePath: `/:section(indices|templates)`,
},
doMountAsync: true,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/

import { registerTestBed, TestBedConfig } from '../../../../../test_utils';
import { BASE_PATH } from '../../../common/constants';
import { TemplateClone } from '../../../public/application/sections/template_clone'; // eslint-disable-line @kbn/eslint/no-restricted-paths
import { WithAppDependencies } from '../helpers';

Expand All @@ -14,8 +13,8 @@ import { TEMPLATE_NAME } from './constants';

const testBedConfig: TestBedConfig = {
memoryRouter: {
initialEntries: [`${BASE_PATH}clone_template/${TEMPLATE_NAME}`],
componentRoutePath: `${BASE_PATH}clone_template/:name`,
initialEntries: [`/clone_template/${TEMPLATE_NAME}`],
componentRoutePath: `/clone_template/:name`,
},
doMountAsync: true,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
*/

import { registerTestBed, TestBedConfig } from '../../../../../test_utils';
import { BASE_PATH } from '../../../common/constants';
import { TemplateCreate } from '../../../public/application/sections/template_create'; // eslint-disable-line @kbn/eslint/no-restricted-paths
import { WithAppDependencies } from '../helpers';

import { formSetup, TestSubjects } from './template_form.helpers';

const testBedConfig: TestBedConfig = {
memoryRouter: {
initialEntries: [`${BASE_PATH}create_template`],
componentRoutePath: `${BASE_PATH}create_template`,
initialEntries: [`/create_template`],
componentRoutePath: `/create_template`,
},
doMountAsync: true,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/

import { registerTestBed, TestBedConfig } from '../../../../../test_utils';
import { BASE_PATH } from '../../../common/constants';
import { TemplateEdit } from '../../../public/application/sections/template_edit'; // eslint-disable-line @kbn/eslint/no-restricted-paths
import { WithAppDependencies } from '../helpers';

Expand All @@ -14,8 +13,8 @@ import { TEMPLATE_NAME } from './constants';

const testBedConfig: TestBedConfig = {
memoryRouter: {
initialEntries: [`${BASE_PATH}edit_template/${TEMPLATE_NAME}`],
componentRoutePath: `${BASE_PATH}edit_template/:name`,
initialEntries: [`/edit_template/${TEMPLATE_NAME}`],
componentRoutePath: `/edit_template/:name`,
},
doMountAsync: true,
};
Expand Down

0 comments on commit 23f6e0e

Please sign in to comment.