From 0b9fe763faeb4e6c421071937432fbdaf7a0bf5e Mon Sep 17 00:00:00 2001 From: Thomas Neirynck Date: Tue, 22 Sep 2020 10:28:37 -0400 Subject: [PATCH] make use of currentLayerType consistent --- .../update_source_editor.test.tsx.snap | 62 +------------------ .../update_source_editor.js | 6 +- .../update_source_editor.test.tsx | 8 +-- 3 files changed, 5 insertions(+), 71 deletions(-) diff --git a/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/__snapshots__/update_source_editor.test.tsx.snap b/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/__snapshots__/update_source_editor.test.tsx.snap index 97d51e77fb87cf..dfce6b36396a75 100644 --- a/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/__snapshots__/update_source_editor.test.tsx.snap +++ b/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/__snapshots__/update_source_editor.test.tsx.snap @@ -60,7 +60,7 @@ exports[`source editor geo_grid_source default vector layer config should allow `; -exports[`source editor geo_grid_source should put limitations based on heatmap-rendering selection should disable multiple metrics 1`] = ` +exports[`source editor geo_grid_source should put limitations based on heatmap-rendering selection should not allow super-fine option for heatmaps and should not allow multiple metrics 1`] = ` - - -
- -
-
- - - -
- -
-`; - -exports[`source editor geo_grid_source should put limitations based on heatmap-rendering selection should not allow super-fine option for heatmaps 1`] = ` - - - -
- -
-
- - -
- { //these are countable metrics, where blending heatmap color blobs make sense return isMetricCountable(metric.value); } : null; - const allowMultipleMetrics = this.props.renderAs !== RENDER_AS.HEATMAP; + const allowMultipleMetrics = this.props.currentLayerType !== LAYER_TYPE.HEATMAP; return ( diff --git a/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/update_source_editor.test.tsx b/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/update_source_editor.test.tsx index 2d9dce6c82f882..ceb79230bc8320 100644 --- a/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/update_source_editor.test.tsx +++ b/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/update_source_editor.test.tsx @@ -29,17 +29,11 @@ describe('source editor geo_grid_source', () => { }); describe('should put limitations based on heatmap-rendering selection', () => { - test('should not allow super-fine option for heatmaps', async () => { + test('should not allow super-fine option for heatmaps and should not allow multiple metrics', async () => { const component = shallow( ); expect(component).toMatchSnapshot(); }); - test('should disable multiple metrics', async () => { - const component = shallow( - - ); - expect(component).toMatchSnapshot(); - }); }); });