feat: Add Saved Metrics tab to metrics popover (#12123)

* Implement saved metrics

* Fix bug in sql editor

* Fix unit tests

* Fix outlines in popovers

* Add types for saved metrics

* Add translations

* Move savedMetricType to a separate file
This commit is contained in:
Kamil Gabryjelski
2020-12-18 20:11:49 +01:00
committed by GitHub
parent 8e625e0a64
commit 2a23744223
15 changed files with 239 additions and 152 deletions

View File

@@ -49,6 +49,8 @@ function setup(overrides) {
const onClose = sinon.spy();
const props = {
adhocMetric: sumValueAdhocMetric,
savedMetric: {},
savedMetrics: [],
onChange,
onClose,
onResize: () => {},
@@ -62,7 +64,7 @@ function setup(overrides) {
describe('AdhocMetricEditPopover', () => {
it('renders a popover with edit metric form contents', () => {
const { wrapper } = setup();
expect(wrapper.find(FormGroup)).toHaveLength(3);
expect(wrapper.find(FormGroup)).toHaveLength(4);
expect(wrapper.find(Button)).toHaveLength(2);
});