Skip to content

Commit e2b43da

Browse files
authored
Use more specific selector for express checkout e2e tests (#4591)
* Use more specific selector on product page * Changelog
1 parent 07bc109 commit e2b43da

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Fix - Checks for the subscription payment method (if it is Stripe) when verifying for the payment method detachment
77
* Dev - Implements WooCommerce constants for the tax statuses
88
* Fix - Ensure all Javascript strings use the correct text domain for translation
9+
* Tweak - Use more specific selector in express checkout e2e tests
910

1011
= 9.8.0 - 2025-08-11 =
1112
* Add - Adds the current setting value for the Optimized Checkout to the Stripe System Status Report data

readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,6 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o
116116
* Fix - Checks for the subscription payment method (if it is Stripe) when verifying for the payment method detachment
117117
* Dev - Implements WooCommerce constants for the tax statuses
118118
* Fix - Ensure all Javascript strings use the correct text domain for translation
119+
* Tweak - Use more specific selector in express checkout e2e tests
119120

120121
[See changelog for full details across versions](https://raw.githubusercontent.com/woocommerce/woocommerce-gateway-stripe/trunk/changelog.txt).

tests/e2e/tests/express-checkout/express-checkout.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const addProductToCart = async ( page, productSlug = 'beanie' ) => {
66

77
const addToCartButton = await page.getByRole( 'button', {
88
name: 'Add to cart',
9+
exact: true, // Needs to be exact, as there are other "Add to cart" buttons for other products in WooCommerce 10.1.
910
} );
1011
await expect( addToCartButton ).toBeEnabled();
1112
await addToCartButton.dispatchEvent( 'click' );

0 commit comments

Comments
 (0)