From e1f87137c0c1a19e0298db3f2029c03852cf5eb6 Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Tue, 15 Mar 2022 17:00:08 +0100 Subject: [PATCH] fix tests --- .../__snapshots__/expression.test.tsx.snap | 6 ++++++ .../__snapshots__/to_expression.test.ts.snap | 6 ++++++ .../missing_value_option.test.tsx | 13 +++++++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/lens/public/xy_visualization/__snapshots__/expression.test.tsx.snap b/x-pack/plugins/lens/public/xy_visualization/__snapshots__/expression.test.tsx.snap index b34d5e8639382..504a553c5a631 100644 --- a/x-pack/plugins/lens/public/xy_visualization/__snapshots__/expression.test.tsx.snap +++ b/x-pack/plugins/lens/public/xy_visualization/__snapshots__/expression.test.tsx.snap @@ -138,6 +138,7 @@ exports[`xy_expression XYChart component it renders area 1`] = ` enableHistogramMode={false} fit={ Object { + "endValue": undefined, "type": "none", } } @@ -198,6 +199,7 @@ exports[`xy_expression XYChart component it renders area 1`] = ` enableHistogramMode={false} fit={ Object { + "endValue": undefined, "type": "none", } } @@ -862,6 +864,7 @@ exports[`xy_expression XYChart component it renders line 1`] = ` enableHistogramMode={false} fit={ Object { + "endValue": undefined, "type": "none", } } @@ -922,6 +925,7 @@ exports[`xy_expression XYChart component it renders line 1`] = ` enableHistogramMode={false} fit={ Object { + "endValue": undefined, "type": "none", } } @@ -1094,6 +1098,7 @@ exports[`xy_expression XYChart component it renders stacked area 1`] = ` enableHistogramMode={false} fit={ Object { + "endValue": undefined, "type": "none", } } @@ -1158,6 +1163,7 @@ exports[`xy_expression XYChart component it renders stacked area 1`] = ` enableHistogramMode={false} fit={ Object { + "endValue": undefined, "type": "none", } } diff --git a/x-pack/plugins/lens/public/xy_visualization/__snapshots__/to_expression.test.ts.snap b/x-pack/plugins/lens/public/xy_visualization/__snapshots__/to_expression.test.ts.snap index 5992d0bdb7264..1008fbf7874e7 100644 --- a/x-pack/plugins/lens/public/xy_visualization/__snapshots__/to_expression.test.ts.snap +++ b/x-pack/plugins/lens/public/xy_visualization/__snapshots__/to_expression.test.ts.snap @@ -33,6 +33,12 @@ Object { "description": Array [ "", ], + "emphasizeFitting": Array [ + false, + ], + "endValue": Array [ + "None", + ], "fillOpacity": Array [ 0.3, ], diff --git a/x-pack/plugins/lens/public/xy_visualization/xy_config_panel/visual_options_popover/missing_value_option.test.tsx b/x-pack/plugins/lens/public/xy_visualization/xy_config_panel/visual_options_popover/missing_value_option.test.tsx index d3960acd56377..ddab84f61ba1f 100644 --- a/x-pack/plugins/lens/public/xy_visualization/xy_config_panel/visual_options_popover/missing_value_option.test.tsx +++ b/x-pack/plugins/lens/public/xy_visualization/xy_config_panel/visual_options_popover/missing_value_option.test.tsx @@ -13,10 +13,15 @@ import { MissingValuesOptions } from './missing_values_option'; describe('Missing values option', () => { it('should show currently selected fitting function', () => { const component = shallow( - + ); - expect(component.find(EuiSuperSelect).prop('valueOfSelected')).toEqual('Carry'); + expect(component.find(EuiSuperSelect).first().prop('valueOfSelected')).toEqual('Carry'); }); it('should show the fitting option when enabled', () => { @@ -25,6 +30,8 @@ describe('Missing values option', () => { onFittingFnChange={jest.fn()} fittingFunction={'Carry'} isFittingEnabled={true} + onEmphasizeFittingChange={jest.fn()} + onEndValueChange={jest.fn()} /> ); @@ -37,6 +44,8 @@ describe('Missing values option', () => { onFittingFnChange={jest.fn()} fittingFunction={'Carry'} isFittingEnabled={false} + onEmphasizeFittingChange={jest.fn()} + onEndValueChange={jest.fn()} /> );