Commit 5ce35233618 for woocommerce

commit 5ce352336180af99ef3696b0222fdce617b36848
Author: Vlad Olaru <vlad.olaru@automattic.com>
Date:   Mon Sep 14 11:25:46 2026 +0300

    [tests] Make the customer payment page gateway selector exact (#68640)

    test(order): Make the customer payment page gateway selector exact

    The customer payment page spec picks the gateway by its visible text,
    with getByText( 'Direct bank transfer' ). That is a substring match,
    and a gateway's description can contain its own title, in which case
    the locator matches both the label and the description and Playwright
    fails in strict mode before the order is paid. The E2E Blocks seed
    writes exactly such a description: bin/blocks/scripts/parallel/
    payment.sh sets the BACS description to "Direct bank transfer
    description". That script runs as the environment start for the
    Blocks CI jobs, not as a Playwright step, so the Core E2E jobs start
    their own environment and never see it: CI reads the gateway's
    shipped default and is not currently red. The fix is defensive, for
    any store whose description names its gateway - which is what a
    long-lived local environment looks like once the Blocks seed has run
    in it. Make the selector exact.

    That is the whole change. No title moves layer, none is removed, and
    the spec keeps all three of its titles. Two of them carry a @not-e2e
    tag, which classifies them rather than excluding them: nothing in the
    Playwright config filters on it, and --list shows all three running
    in core-parallel.

    Consolidates three mega-branch commits, subjects verbatim:
    - refactor(e2e): remove cross-profile checkout setup
    - fix(e2e): handle hidden classic checkout terms
    - fix(e2e): satisfy payment flow prerequisites

    Only the payment-flow prerequisites commit contributes a line. It
    also added a terms checkbox step, which the hidden-terms commit
    turned into a helper call and the cross-profile cleanup then removed
    again, so that part nets to nothing between the diff base and the
    frozen state.

    Refs TESTOPS-288
    Refs #68046

    Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

diff --git a/plugins/woocommerce/changelog/testops-288-customer-payment-page b/plugins/woocommerce/changelog/testops-288-customer-payment-page
new file mode 100644
index 00000000000..726a8b5599b
--- /dev/null
+++ b/plugins/woocommerce/changelog/testops-288-customer-payment-page
@@ -0,0 +1,4 @@
+Significance: patch
+Type: dev
+Comment: Make the customer payment page's payment-method selector exact.
+
diff --git a/plugins/woocommerce/tests/e2e/tests/order/customer-payment-page.spec.ts b/plugins/woocommerce/tests/e2e/tests/order/customer-payment-page.spec.ts
index 2d1a49f20a9..209363706c1 100644
--- a/plugins/woocommerce/tests/e2e/tests/order/customer-payment-page.spec.ts
+++ b/plugins/woocommerce/tests/e2e/tests/order/customer-payment-page.spec.ts
@@ -124,7 +124,9 @@ test.describe(
 			} );
 			await test.step( 'Select payment method and pay for the order', async () => {
 				// explicitly select the payment method
-				await page.getByText( 'Direct bank transfer' ).click();
+				await page
+					.getByText( 'Direct bank transfer', { exact: true } )
+					.click();

 				// Handle notice if present
 				await page.addLocatorHandler(