From ff3952569280104fafb734733f59c42214c43d79 Mon Sep 17 00:00:00 2001 From: Abshir Date: Fri, 7 Jul 2023 11:58:25 +0100 Subject: [PATCH] fix: highlights checkbox display issue ENTST-547 --- components/x-gift-article/__tests__/x-gift-article.test.jsx | 3 ++- components/x-gift-article/src/v2/AdvancedSharingOptions.jsx | 5 +++-- ...hare-article-modal-with-advanced-sharing-free-article.jsx | 3 ++- ...cle-modal-with-advanced-sharing-no-enterprise-credits.jsx | 3 ++- ...e-article-modal-with-advanced-sharing-no-gift-credits.jsx | 3 ++- ...e-modal-with-advanced-sharing-save-highlights-message.jsx | 1 + .../storybook/share-article-modal-with-advanced-sharing.jsx | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/components/x-gift-article/__tests__/x-gift-article.test.jsx b/components/x-gift-article/__tests__/x-gift-article.test.jsx index 57c491708..8c79cd068 100644 --- a/components/x-gift-article/__tests__/x-gift-article.test.jsx +++ b/components/x-gift-article/__tests__/x-gift-article.test.jsx @@ -19,7 +19,8 @@ const baseArgs = { title: 'Equinor and Daimler Truck cut Russia ties as Volvo and JLR halt car deliveries' }, id: 'base-gift-article-static-id', - enterpriseApiBaseUrl: `https://enterprise-sharing-api.ft.com` + enterpriseApiBaseUrl: `https://enterprise-sharing-api.ft.com`, + hasHighlights: true } describe('x-gift-article', () => { diff --git a/components/x-gift-article/src/v2/AdvancedSharingOptions.jsx b/components/x-gift-article/src/v2/AdvancedSharingOptions.jsx index 33eca9764..41d1632e2 100644 --- a/components/x-gift-article/src/v2/AdvancedSharingOptions.jsx +++ b/components/x-gift-article/src/v2/AdvancedSharingOptions.jsx @@ -11,7 +11,8 @@ export const AdvancedSharingOptions = (props) => { includeHighlights, enterpriseHasCredits, giftCredits, - showHighlightsRecipientMessage + showHighlightsRecipientMessage, + hasHighlights } = props const onValueChange = (event) => { if (event.target.value === ShareType.enterprise) { @@ -69,7 +70,7 @@ export const AdvancedSharingOptions = (props) => { )} {showHighlightsRecipientMessage && } - {showHighlightsCheckbox && ( + {showHighlightsCheckbox && hasHighlights && (