Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonelizabeth committed Jul 29, 2020
1 parent d012f0e commit 05ebb2a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { setup, SetupResult } from './pipeline_processors_editor.helpers';

import { notificationServiceMock } from 'src/core/public/mocks';
import { Pipeline } from '../../../../../common/types';
import { apiService } from '../../../services';
import { setup, SetupResult } from './pipeline_processors_editor.helpers';

const testProcessors: Pick<Pipeline, 'processors'> = {
processors: [
Expand Down Expand Up @@ -46,6 +49,8 @@ describe('Pipeline Editor', () => {
links: {
esDocsBasePath: 'test',
},
toasts: notificationServiceMock.createSetupContract().toasts,
api: apiService,
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const TestPipelineButton: FunctionComponent = () => {
<FlyoutProvider>
{(openFlyout) => {
return (
<EuiButton size="s" onClick={openFlyout}>
<EuiButton size="s" onClick={openFlyout} data-test-subj="testPipelineButton">
{i18nTexts.buttonLabel}
</EuiButton>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,17 @@ export const ProcessorsEditorContextProvider: FunctionComponent<Props> = ({
onFlyoutOpen,
}: Props) => {
return (
<PipelineProcessorsContextProvider
onFlyoutOpen={onFlyoutOpen}
links={links}
api={api}
toasts={toasts}
onUpdate={onUpdate}
value={value}
>
<TestConfigContextProvider>{children}</TestConfigContextProvider>
</PipelineProcessorsContextProvider>
<TestConfigContextProvider>
<PipelineProcessorsContextProvider
onFlyoutOpen={onFlyoutOpen}
links={links}
api={api}
toasts={toasts}
onUpdate={onUpdate}
value={value}
>
{children}
</PipelineProcessorsContextProvider>
</TestConfigContextProvider>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ export { TestConfigContextProvider, useTestConfigContext, TestConfig } from './t
export {
PipelineProcessorsContextProvider,
usePipelineProcessorsContext,
Props,
} from './processors_context';

0 comments on commit 05ebb2a

Please sign in to comment.