Skip to content

Commit b8d137d

Browse files
authored
Update payout texts for New Account Waiting Period (#11120)
1 parent e77626d commit b8d137d

File tree

5 files changed

+28
-13
lines changed

5 files changed

+28
-13
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: minor
2+
Type: update
3+
4+
Change payout texts for New Account Waiting Period to be consistent with new Account Details

client/components/deposits-overview/__tests__/index.test.tsx

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,12 @@ describe( 'Deposits Overview information', () => {
306306
setSelectedCurrency: mockSetSelectedCurrency,
307307
} );
308308
const { getByText, queryByText } = render( <DepositsOverview /> );
309-
getByText( /Your first payout is held for/, {
310-
ignore: '.a11y-speak-region',
311-
} );
309+
getByText(
310+
/Payout scheduling becomes available after the standard 7-day waiting period for new accounts is complete/,
311+
{
312+
ignore: '.a11y-speak-region',
313+
}
314+
);
312315
expect( queryByText( 'Change deposit schedule' ) ).toBeFalsy();
313316
expect( queryByText( 'View full deposits history' ) ).toBeFalsy();
314317
} );
@@ -426,7 +429,11 @@ describe( 'Deposits Overview information', () => {
426429
} );
427430

428431
const { queryByText } = render( <DepositsOverview /> );
429-
expect( queryByText( /Your first payout is held for/ ) ).toBeFalsy();
432+
expect(
433+
queryByText(
434+
/Payout scheduling becomes available after the standard 7-day waiting period for new accounts is complete/
435+
)
436+
).toBeFalsy();
430437
} );
431438

432439
test( 'Confirm new account waiting period notice shows if within waiting period', () => {
@@ -444,10 +451,13 @@ describe( 'Deposits Overview information', () => {
444451
} );
445452

446453
const { getByText, getByRole } = render( <DepositsOverview /> );
447-
getByText( /Your first payout is held for/, {
448-
ignore: '.a11y-speak-region',
449-
} );
450-
expect( getByRole( 'link', { name: /Why\?/ } ) ).toHaveAttribute(
454+
getByText(
455+
/Payout scheduling becomes available after the standard 7-day waiting period for new accounts is complete/,
456+
{
457+
ignore: '.a11y-speak-region',
458+
}
459+
);
460+
expect( getByRole( 'link', { name: /Learn more/ } ) ).toHaveAttribute(
451461
'href',
452462
'https://woocommerce.com/document/woopayments/payouts/payout-schedule/#new-accounts'
453463
);

client/components/deposits-overview/deposit-notices.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ export const NewAccountWaitingPeriodNotice: React.FC = () => (
5858
>
5959
{ interpolateComponents( {
6060
mixedString: __(
61-
'Your first payout is held for 7-14 days. {{whyLink}}Why?{{/whyLink}}',
61+
'Payout scheduling becomes available after the standard 7-day waiting period for new accounts is complete. {{learnMoreLink}}Learn more{{/learnMoreLink}}',
6262
'woocommerce-payments'
6363
),
6464
components: {
65-
whyLink: (
65+
learnMoreLink: (
6666
// Link content is in the format string above. Consider disabling jsx-a11y/anchor-has-content.
6767
// eslint-disable-next-line jsx-a11y/anchor-has-content
6868
<a

client/settings/deposits/__tests__/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ describe( 'Deposits', () => {
163163
);
164164

165165
const depositsMessage = screen.getByText(
166-
/Your first payout will be held for/,
166+
/Payout scheduling becomes available after the standard 7-day waiting period for new accounts is complete/,
167167
{
168168
ignore: '.a11y-speak-region',
169169
}

client/settings/deposits/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,9 @@ const DepositsSchedule = () => {
189189
<InlineNotice status="warning" isDismissible={ false } icon>
190190
{ interpolateComponents( {
191191
mixedString: __(
192-
'Your first payout will be held for 7-14 days. ' +
193-
'Payout scheduling will be available after this period. {{learnMoreLink}}Learn more{{/learnMoreLink}}',
192+
'Payout scheduling becomes available after the standard 7-day waiting period for new accounts is complete.' +
193+
' ' +
194+
'{{learnMoreLink}}Learn more{{/learnMoreLink}}',
194195
'woocommerce-payments'
195196
),
196197
components: {

0 commit comments

Comments
 (0)