From 86ee87087326e2245a8d87aaec4d676602f8ce42 Mon Sep 17 00:00:00 2001 From: Joshua T Flowers Date: Tue, 22 Jun 2021 20:07:03 -0400 Subject: [PATCH] Add text for manage button when no help text exists (https://github.com/woocommerce/woocommerce-admin/pull/7191) * Add text for manage button when no help text exists * Update manage button text to set up * Handle PR feedback --- plugins/woocommerce-admin/client/task-list/style.scss | 4 ++-- .../components/Setup/Connect.js | 11 +++++++++-- .../components/Setup/test/connect.js | 4 ++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/plugins/woocommerce-admin/client/task-list/style.scss b/plugins/woocommerce-admin/client/task-list/style.scss index 14bb49ab6cb..2aa395f0315 100644 --- a/plugins/woocommerce-admin/client/task-list/style.scss +++ b/plugins/woocommerce-admin/client/task-list/style.scss @@ -240,8 +240,8 @@ font-size: 14px; color: $studio-gray-50; font-weight: 400; - margin-top: 16px; - margin-bottom: $gap-smaller; + margin-top: $gap; + margin-bottom: $gap; } } diff --git a/plugins/woocommerce-admin/client/task-list/tasks/payments/PaymentGatewaySuggestions/components/Setup/Connect.js b/plugins/woocommerce-admin/client/task-list/tasks/payments/PaymentGatewaySuggestions/components/Setup/Connect.js index 61e3d681a3e..1a0d6e761c5 100644 --- a/plugins/woocommerce-admin/client/task-list/tasks/payments/PaymentGatewaySuggestions/components/Setup/Connect.js +++ b/plugins/woocommerce-admin/client/task-list/tasks/payments/PaymentGatewaySuggestions/components/Setup/Connect.js @@ -142,9 +142,16 @@ export const Connect = ( { return ( <> - { helpText } + { helpText || ( +

+ { __( + "You can manage this payment gateway's settings by clicking the button below", + 'woocommerce-admin' + ) } +

+ ) } ); diff --git a/plugins/woocommerce-admin/client/task-list/tasks/payments/PaymentGatewaySuggestions/components/Setup/test/connect.js b/plugins/woocommerce-admin/client/task-list/tasks/payments/PaymentGatewaySuggestions/components/Setup/test/connect.js index 2e97a6a4e09..0f348435744 100644 --- a/plugins/woocommerce-admin/client/task-list/tasks/payments/PaymentGatewaySuggestions/components/Setup/test/connect.js +++ b/plugins/woocommerce-admin/client/task-list/tasks/payments/PaymentGatewaySuggestions/components/Setup/test/connect.js @@ -68,7 +68,7 @@ describe( 'Connect', () => { expect( inputs[ 1 ].placeholder ).toBe( 'API secret' ); } ); - it( 'should render the manage button when no connection URL or fields exist', () => { + it( 'should render the set up button when no connection URL or fields exist', () => { const props = { ...defaultProps, paymentGateway: { @@ -80,7 +80,7 @@ describe( 'Connect', () => { const { container } = render( ); const button = container.querySelector( 'a' ); - expect( button.textContent ).toBe( 'Manage' ); + expect( button.textContent ).toBe( 'Set up' ); expect( button.href ).toBe( mockGateway.settingsUrl ); } ); } );