feat: Implement drag & drop for metrics and filters labels (#12184)

This commit is contained in:
Kamil Gabryjelski
2020-12-25 05:46:37 +01:00
committed by GitHub
parent 74f3faf1cd
commit f3ab1f41ee
13 changed files with 251 additions and 22 deletions

View File

@@ -45,6 +45,9 @@ function setup(overrides) {
savedMetrics: [],
onMetricEdit,
columns,
onMoveLabel: () => {},
onDropLabel: () => {},
index: 0,
...overrides,
};
const wrapper = shallow(<AdhocMetricOption {...props} />)
@@ -57,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('OptionControlLabel')).toExist();
expect(wrapper.find('DraggableOptionControlLabel')).toExist();
});
it('overwrites the adhocMetric in state with onLabelChange', () => {