Skip to content

Commit

Permalink
Merge branch 'develop' into dev/fix-unstable-test-WC_Payments_Incenti…
Browse files Browse the repository at this point in the history
…ves_Service_Test
  • Loading branch information
htdat authored Feb 28, 2025
2 parents cefae87 + ec98a59 commit 2aa0369
Show file tree
Hide file tree
Showing 13 changed files with 96 additions and 85 deletions.
4 changes: 4 additions & 0 deletions changelog/fix-10245-update-texts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: update

Change wording for Sales Channel, Online Store, In-Person, and In-Person (POS)
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ exports[`Order details page should match the snapshot - Charge without payment i
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,13 @@ exports[`PaymentDetailsSummary capture notification and fraud buttons renders ca
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -508,13 +508,13 @@ exports[`PaymentDetailsSummary capture notification and fraud buttons renders th
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -868,13 +868,13 @@ exports[`PaymentDetailsSummary correctly renders a charge 1`] = `
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -1179,13 +1179,13 @@ exports[`PaymentDetailsSummary correctly renders when payment intent is missing
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -1504,13 +1504,13 @@ exports[`PaymentDetailsSummary order missing notice does not render notice if or
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -1829,13 +1829,13 @@ exports[`PaymentDetailsSummary order missing notice renders notice if order miss
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -2177,13 +2177,13 @@ exports[`PaymentDetailsSummary renders a charge with subscriptions 1`] = `
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -2506,13 +2506,13 @@ exports[`PaymentDetailsSummary renders fully refunded information for a charge 1
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -2774,13 +2774,13 @@ exports[`PaymentDetailsSummary renders loading state 1`] = `
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -3078,13 +3078,13 @@ exports[`PaymentDetailsSummary renders partially refunded information for a char
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down Expand Up @@ -3403,7 +3403,7 @@ exports[`PaymentDetailsSummary renders the Tap to Pay channel from metadata 1`]
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
Expand Down Expand Up @@ -3728,13 +3728,13 @@ exports[`PaymentDetailsSummary renders the information of a dispute-reversal cha
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion client/payment-details/summary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const composePaymentSummaryItems = ( {
: '–',
},
{
title: __( 'Channel', 'woocommerce-payments' ),
title: __( 'Sales channel', 'woocommerce-payments' ),
content: (
<span>
{ isTapToPay( metadata?.reader_model )
Expand Down
4 changes: 2 additions & 2 deletions client/payment-details/test/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -656,13 +656,13 @@ exports[`Payment details page should match the snapshot - Payment Intent query p
<span
class="woocommerce-list__item-title"
>
Channel
Sales channel
</span>
<span
class="woocommerce-list__item-content"
>
<span>
Online
Online store
</span>
</span>
</div>
Expand Down
25 changes: 14 additions & 11 deletions client/transactions/filters/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,43 +442,46 @@ export const getAdvancedFilters = (
},
channel: {
labels: {
add: __( 'Channel', 'woocommerce-payments' ),
add: __( 'Sales channel', 'woocommerce-payments' ),
remove: __(
'Remove transaction channel filter',
'Remove transaction sales channel filter',
'woocommerce-payments'
),
rule: __(
'Select a transaction channel filter match',
'Select a transaction sales channel filter match',
'woocommerce-payments'
),
/* translators: A sentence describing a Transaction Channel filter. */
title:
wooCommerceVersion < 7.8
? __(
'{{title}}Channel{{/title}} {{rule /}} {{filter /}}',
'{{title}}Sales channel{{/title}} {{rule /}} {{filter /}}',
'woocommerce-payments'
)
: __(
'<title>Channel</title> <rule /> <filter />',
'<title>Sales channel</title> <rule /> <filter />',
'woocommerce-payments'
),
filter: __(
'Select a transaction channel',
'Select a transaction sales channel',
'woocommerce-payments'
),
},
rules: [
{
value: 'is',
/* translators: Sentence fragment, logical, "Is" refers to searching for transactions matching a chosen transaction channel type. */
label: _x( 'Is', 'Channel', 'woocommerce-payments' ),
/* translators: Sentence fragment, logical, "Is" refers to searching for transactions matching a chosen transaction sales channel type. */
label: _x(
'Is',
'Sales channel',
'woocommerce-payments'
),
},
{
value: 'is_not',
/* translators: Sentence fragment, logical, "Is not" refers to searching for transactions that don\'t match a chosen transaction channel type. */
/* translators: Sentence fragment, logical, "Is not" refers to searching for transactions that don\'t match a chosen transaction sales channel type. */
label: _x(
'Is not',
'Channel',
'Sales channel',
'woocommerce-payments'
),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@ HTMLOptionsCollection [
<option
value="online"
>
Online
Online store
</option>,
<option
value="in_person"
>
In-Person
</option>,
<option
value="in_person_pos"
>
In-Person (POS)
</option>,
]
`;

Expand Down
11 changes: 5 additions & 6 deletions client/transactions/filters/test/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -356,26 +356,25 @@ describe( 'Transactions filters', () => {
let ruleSelector: HTMLElement;

beforeEach( () => {
addAdvancedFilter( 'Channel' );
addAdvancedFilter( 'Sales channel' );
ruleSelector = screen.getByRole( 'combobox', {
name: /transaction channel filter/i,
name: /transaction sales channel filter/i,
} );
} );

test( 'should render all types', () => {
const typeSelect = screen.getByRole( 'combobox', {
name: /transaction channel$/i,
name: /transaction sales channel$/i,
} ) as HTMLSelectElement;
expect( typeSelect.options ).toMatchSnapshot();
} );

test( 'should filter by is', () => {
user.selectOptions( ruleSelector, 'is' );

// need to include $ in name, otherwise "Select a transaction type filter" is also matched.
user.selectOptions(
screen.getByRole( 'combobox', {
name: /transaction channel$/i,
name: /transaction sales channel$/i,
} ),
'online'
);
Expand All @@ -390,7 +389,7 @@ describe( 'Transactions filters', () => {
// need to include $ in name, otherwise "Select a transaction type filter" is also matched.
user.selectOptions(
screen.getByRole( 'combobox', {
name: /transaction channel$/i,
name: /transaction sales channel$/i,
} ),
'in_person'
);
Expand Down
4 changes: 2 additions & 2 deletions client/transactions/list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ const getColumns = (
},
{
key: 'channel',
label: __( 'Channel', 'woocommerce-payments' ),
screenReaderLabel: __( 'Channel', 'woocommerce-payments' ),
label: __( 'Sales channel', 'woocommerce-payments' ),
screenReaderLabel: __( 'Sales channel', 'woocommerce-payments' ),
required: true,
isLeftAligned: true,
},
Expand Down
Loading

0 comments on commit 2aa0369

Please sign in to comment.