Skip to content

Commit

Permalink
Apply JL's feedback: rename tsx->ts filetypes, fix typo, remove unuse…
Browse files Browse the repository at this point in the history
…d TestSubjects type.
  • Loading branch information
cjcenizal committed Apr 28, 2021
1 parent 2482fa7 commit d3f480f
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { KibanaContextProvider } from '../../../../../../src/plugins/kibana_reac
import { createBreadcrumbsMock } from '../../../public/application/services/breadcrumbs.mock';
import { licensingMock } from '../../../../licensing/public/mocks';
import { App } from '../../../public/application/app';
import { TestSubjects } from '../helpers';

const breadcrumbService = createBreadcrumbsMock();

Expand All @@ -37,7 +36,7 @@ const getTestBedConfig = (initialEntries: string[]): TestBedConfig => ({
const initTestBed = (initialEntries: string[]) =>
registerTestBed(AppWithContext, getTestBedConfig(initialEntries))();

export interface AppTestBed extends TestBed<TestSubjects> {
export interface AppTestBed extends TestBed {
actions: {
clickPolicyNameLink: () => void;
clickCreatePolicyButton: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { EditPolicy } from '../../../public/application/sections/edit_policy';
import { KibanaContextProvider } from '../../../public/shared_imports';
import { AppServicesContext } from '../../../public/types';
import { createBreadcrumbsMock } from '../../../public/application/services/breadcrumbs.mock';
import { TestSubjects } from '../helpers';
import { POLICY_NAME } from './constants';

const getTestBedConfig = (testBedConfigArgs?: Partial<TestBedConfig>): TestBedConfig => {
Expand Down Expand Up @@ -52,8 +51,5 @@ export const initTestBed = (arg?: {
testBedConfig?: Partial<TestBedConfig>;
}) => {
const { testBedConfig: testBedConfigArgs, ...rest } = arg || {};
return registerTestBed<TestSubjects>(
EditPolicyContainer,
getTestBedConfig(testBedConfigArgs)
)(rest);
return registerTestBed(EditPolicyContainer, getTestBedConfig(testBedConfigArgs))(rest);
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

export { TestSubjects, Phase } from './types';
export { Phase } from './types';

export { createNodeAllocationActions } from './create_node_allocation_actions';
export { createEnablePhaseAction } from './create_enable_phase_action';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,3 @@
import { Phases } from '../../../common/types';

export type Phase = keyof Phases;

export type TestSubjects =
| 'snapshotPolicyCombobox'
| 'savePolicyButton'
| 'customPolicyCallout'
| 'noPoliciesCallout'
| 'policiesErrorCallout'
| 'rolloverSwitch'
| 'rolloverSettingsRequired'
| 'hot-selectedMaxSizeStored'
| 'hot-selectedMaxSizeStoredUnits'
| 'hot-selectedMaxDocuments'
| 'hot-selectedMaxAge'
| 'hot-selectedMaxAgeUnits'
| 'policyTablePolicyNameLink'
| 'policyTitle'
| 'createPolicyButton'
| 'cold-freezeSwitch'
| 'frozen-freezeSwitch'
| string;
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const NodeAllocation: FunctionComponent<SharedProps> = ({
let nodeAllocationOptions = [];

// On Cloud, allocating to data tiers and allocating to data nodes is mutually exclusive. So we
// only let users select this option if they're using data nodes. Otherwise we remove it.r
// only let users select this option if they're using data nodes. Otherwise we remove it.
//
// On prem, users should have the freedom to choose this option, even if they're using node roles.
// So we always give them this option.
Expand Down

0 comments on commit d3f480f

Please sign in to comment.