From 8065703c8530231576c77be4864d6a104864bc70 Mon Sep 17 00:00:00 2001 From: Stratoula Kalafateli Date: Fri, 11 Feb 2022 13:09:36 +0200 Subject: [PATCH] Fix jest test --- .../visualize_app/utils/get_top_nav_config.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/plugins/visualizations/public/visualize_app/utils/get_top_nav_config.tsx b/src/plugins/visualizations/public/visualize_app/utils/get_top_nav_config.tsx index b11f68bed565c..362749cb206df 100644 --- a/src/plugins/visualizations/public/visualize_app/utils/get_top_nav_config.tsx +++ b/src/plugins/visualizations/public/visualize_app/utils/get_top_nav_config.tsx @@ -303,14 +303,14 @@ export const getTopNavConfig = ( className: 'visNavItem__goToLens', disableButton: !editInLensConfig, testId: 'visualizeEditInLensButton', - badge: showBadge - ? { - label: i18n.translate('visualizations.tonNavMenu.tryItBadgeText', { - defaultMessage: 'Try it', - }), - color: 'accent' as EuiBetaBadgeProps['color'], - } - : undefined, + ...(showBadge && { + badge: { + label: i18n.translate('visualizations.tonNavMenu.tryItBadgeText', { + defaultMessage: 'Try it', + }), + color: 'accent' as EuiBetaBadgeProps['color'], + }, + }), run: async () => { const updatedWithMeta = { ...editInLensConfig,