Skip to content

Commit

Permalink
fix CITs after master merge
Browse files Browse the repository at this point in the history
  • Loading branch information
jloleysens committed Jun 22, 2020
1 parent 1c4e4f2 commit fe68f96
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,15 @@ jest.mock('@elastic/eui', () => {
}}
/>
),
// Mocking EuiCodeEditor, which uses React Ace under the hood
EuiCodeEditor: (props: any) => (
};
});

jest.mock('../../../../../../../../src/plugins/kibana_react/public', () => {
const original = jest.requireActual('../../../../../../../../src/plugins/kibana_react/public');
return {
...original,
// Mocking CodeEditor, which uses React Monaco under the hood
CodeEditor: (props: any) => (
<input
data-test-subj={props['data-test-subj'] || 'mockCodeEditor'}
data-currentvalue={props.value}
Expand Down Expand Up @@ -95,8 +102,9 @@ const createActions = (testBed: TestBed<TestSubject>) => {
act(() => {
find(`${processorSelector}.moveItemButton`).simulate('click');
});
component.update();
act(() => {
find(dropZoneSelector).last().simulate('click');
find(dropZoneSelector).simulate('click');
});
component.update();
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ export const PipelineProcessorsEditorItem: FunctionComponent<Props> = memo(
size="s"
disabled={disabled}
aria-label={editorItemMessages.moveButtonLabel}
size="s"
onClick={onMove}
iconType="sortable"
/>
Expand Down Expand Up @@ -146,6 +145,7 @@ export const PipelineProcessorsEditorItem: FunctionComponent<Props> = memo(
</EuiFlexItem>
<EuiFlexItem grow={false}>
<ContextMenu
data-test-subj="moreMenu"
disabled={disabled}
showAddOnFailure={!processor.onFailure?.length}
onAddOnFailure={() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ export const PrivateTree: FunctionComponent<PrivateProps> = ({
});
}}
isVisible={Boolean(movingProcessor)}
isDisabled={Boolean(
!movingProcessor || isDropZoneAboveDisabled(info, movingProcessor!)
)}
isDisabled={!movingProcessor || isDropZoneAboveDisabled(info, movingProcessor)}
/>
</EuiFlexItem>
) : undefined}
Expand All @@ -111,9 +109,7 @@ export const PrivateTree: FunctionComponent<PrivateProps> = ({
<DropZoneButton
data-test-subj={`dropButtonBelow-${stringifiedSelector}`}
isVisible={Boolean(movingProcessor)}
isDisabled={Boolean(
!movingProcessor || isDropZoneBelowDisabled(info, movingProcessor!)
)}
isDisabled={!movingProcessor || isDropZoneBelowDisabled(info, movingProcessor)}
onClick={(event) => {
event.preventDefault();
onAction({
Expand Down

0 comments on commit fe68f96

Please sign in to comment.