chore: Upgrade react-dnd to 11.1.3 (#12815)

This commit is contained in:
Kamil Gabryjelski
2021-01-29 03:34:56 +01:00
committed by GitHub
parent 34549cb5b7
commit fcaa0acad5
31 changed files with 200 additions and 332 deletions

View File

@@ -71,7 +71,7 @@ function setup(overrides) {
...overrides,
};
const wrapper = shallow(<AdhocFilterControl {...props} />);
const component = wrapper.dive().dive().shallow();
const component = wrapper.dive().shallow();
return { wrapper, component, onChange };
}

View File

@@ -56,6 +56,6 @@ describe('AdhocFilterOption', () => {
const popover = overlay.find(Popover);
expect(popover).toHaveLength(1);
expect(popover.props().defaultVisible).toBe(false);
expect(overlay.find('DraggableOptionControlLabel')).toExist();
expect(overlay.find('OptionControlLabel')).toExist();
});
});

View File

@@ -60,7 +60,7 @@ describe('AdhocMetricOption', () => {
it('renders an overlay trigger wrapper for the label', () => {
const { wrapper } = setup();
expect(wrapper.find(Popover)).toExist();
expect(wrapper.find('DraggableOptionControlLabel')).toExist();
expect(wrapper.find('OptionControlLabel')).toExist();
});
it('overwrites the adhocMetric in state with onLabelChange', () => {

View File

@@ -55,7 +55,7 @@ function setup(overrides) {
...overrides,
};
const wrapper = shallow(<MetricsControl {...props} />);
const component = wrapper.dive().dive().shallow();
const component = wrapper.dive().shallow();
return { wrapper, component, onChange };
}

View File

@@ -120,9 +120,7 @@ describe('VerifiedMetricsControl', () => {
onChange: mockOnChange,
});
const child = wrapper.find(MetricsControl) as ReactWrapper<{
onChange: (str: string[]) => void;
}>;
const child = wrapper.find(MetricsControl);
child.props().onChange(['abc']);
expect(child.length).toBe(1);