Commit 780dd7eff0 for woocommerce
commit 780dd7eff027432d76ea5852ec56582444fe6840
Author: Raluca Stan <ralucastn@gmail.com>
Date: Fri Dec 12 12:15:32 2025 +0100
Remove skipped E2E tests for WordPress versions <= 6.7 (#62391)
* Remove skipped E2E tests for WordPress versions <= 6.7
These skip conditions were added for tests that require the withSyncEvent
feature, which is available starting from WordPress 6.8. Now that WordPress
6.9 has been released, these skip conditions are no longer needed.
Removed 24 skip conditions from 6 files:
- add-to-cart.spec.js (1)
- product-collection-errors.block_theme.spec.ts (1)
- mini-cart.block_theme.spec.ts (11)
- product-button.block_theme.spec.ts (1)
- mini-cart-block.shopper.block_theme.spec.ts (2)
- add-to-cart-with-options.block_theme.spec.ts (8)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Changelog
* Fix lint error
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
diff --git a/plugins/woocommerce/changelog/wooplug-5819-remove-skipped-e2e-tests-with-older-wordpress-versions b/plugins/woocommerce/changelog/wooplug-5819-remove-skipped-e2e-tests-with-older-wordpress-versions
new file mode 100644
index 0000000000..cbef044331
--- /dev/null
+++ b/plugins/woocommerce/changelog/wooplug-5819-remove-skipped-e2e-tests-with-older-wordpress-versions
@@ -0,0 +1,4 @@
+Significance: patch
+Type: dev
+
+Remove skipped E2E tests for WordPress versions <= 6.7
diff --git a/plugins/woocommerce/client/blocks/tests/e2e/tests/add-to-cart-with-options/add-to-cart-with-options.block_theme.spec.ts b/plugins/woocommerce/client/blocks/tests/e2e/tests/add-to-cart-with-options/add-to-cart-with-options.block_theme.spec.ts
index a9e6c46d6c..539e289c90 100644
--- a/plugins/woocommerce/client/blocks/tests/e2e/tests/add-to-cart-with-options/add-to-cart-with-options.block_theme.spec.ts
+++ b/plugins/woocommerce/client/blocks/tests/e2e/tests/add-to-cart-with-options/add-to-cart-with-options.block_theme.spec.ts
@@ -59,14 +59,7 @@ test.describe( 'Add to Cart + Options Block', () => {
page,
pageObject,
editor,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
-
await pageObject.updateSingleProductTemplate();
await editor.saveSiteEditorEntities( {
@@ -98,14 +91,7 @@ test.describe( 'Add to Cart + Options Block', () => {
pageObject,
productGalleryPageObject,
editor,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
-
const variationDescription =
'This is the output of the variation description';
// Set a variable product as having 100 in stock and one of its variations as being out of stock.
@@ -288,14 +274,7 @@ test.describe( 'Add to Cart + Options Block', () => {
page,
pageObject,
editor,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
-
// Make Hoodie with Logo to be sold individually.
const cliOutput = await wpCLI(
`post list --post_type=product --field=ID --name="Hoodie with Logo" --format=ids`
@@ -825,14 +804,7 @@ test.describe( 'Add to Cart + Options Block', () => {
page,
pageObject,
editor,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
-
await wpCLI( `option set woocommerce_enable_ajax_add_to_cart no` );
await pageObject.updateSingleProductTemplate();
@@ -944,14 +916,7 @@ test.describe( 'Add to Cart + Options Block', () => {
test( 'allows adding simple products to cart when inside the Product block', async ( {
page,
pageObject,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
-
await pageObject.createPostWithProductBlock( 't-shirt' );
const addToCartButton = page.getByRole( 'button', {
@@ -966,14 +931,7 @@ test.describe( 'Add to Cart + Options Block', () => {
test( 'allows adding variable products to cart when inside the Product block', async ( {
page,
pageObject,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
-
await pageObject.createPostWithProductBlock( 'hoodie' );
const colorBlueOption = page.locator( 'label:has-text("Blue")' );
@@ -997,14 +955,7 @@ test.describe( 'Add to Cart + Options Block', () => {
test( 'allows adding variations to cart when inside the Product block', async ( {
page,
pageObject,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
-
await pageObject.createPostWithProductBlock(
'hoodie',
'hoodie-blue-yes'
@@ -1024,14 +975,7 @@ test.describe( 'Add to Cart + Options Block', () => {
test( 'allows adding grouped products to cart when inside the Product block', async ( {
page,
pageObject,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
-
await pageObject.createPostWithProductBlock( 'logo-collection' );
const increaseQuantityButton = page.getByLabel(
diff --git a/plugins/woocommerce/client/blocks/tests/e2e/tests/mini-cart/mini-cart-block.shopper.block_theme.spec.ts b/plugins/woocommerce/client/blocks/tests/e2e/tests/mini-cart/mini-cart-block.shopper.block_theme.spec.ts
index 967613fd55..dd218f4d11 100644
--- a/plugins/woocommerce/client/blocks/tests/e2e/tests/mini-cart/mini-cart-block.shopper.block_theme.spec.ts
+++ b/plugins/woocommerce/client/blocks/tests/e2e/tests/mini-cart/mini-cart-block.shopper.block_theme.spec.ts
@@ -32,13 +32,7 @@ test.describe( 'Shopper → Notices', () => {
editor,
admin,
productCollectionPage,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
const checkMiniCartTitle = async ( itemCount: number ) => {
try {
// iAPI Mini Cart.
@@ -176,13 +170,7 @@ test.describe( 'Shopper → Tax', () => {
test( 'User can see tax label and price including tax', async ( {
frontendUtils,
page,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
await frontendUtils.emptyCart();
await frontendUtils.goToShop();
await frontendUtils.addToCart( REGULAR_PRICED_PRODUCT_NAME );
diff --git a/plugins/woocommerce/client/blocks/tests/e2e/tests/mini-cart/mini-cart.block_theme.spec.ts b/plugins/woocommerce/client/blocks/tests/e2e/tests/mini-cart/mini-cart.block_theme.spec.ts
index 430fbc4384..33fa6c7d9c 100644
--- a/plugins/woocommerce/client/blocks/tests/e2e/tests/mini-cart/mini-cart.block_theme.spec.ts
+++ b/plugins/woocommerce/client/blocks/tests/e2e/tests/mini-cart/mini-cart.block_theme.spec.ts
@@ -97,14 +97,7 @@ test.describe( `${ blockData.name } Block`, () => {
page,
frontendUtils,
miniCartUtils,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
-
await frontendUtils.goToShop();
await miniCartUtils.openMiniCart();
@@ -117,14 +110,7 @@ test.describe( `${ blockData.name } Block`, () => {
page,
frontendUtils,
miniCartUtils,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
-
await frontendUtils.goToShop();
await miniCartUtils.openMiniCart();
@@ -140,14 +126,7 @@ test.describe( `${ blockData.name } Block`, () => {
page,
frontendUtils,
miniCartUtils,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
-
await frontendUtils.goToShop();
await miniCartUtils.openMiniCart();
@@ -163,14 +142,7 @@ test.describe( `${ blockData.name } Block`, () => {
page,
frontendUtils,
miniCartUtils,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
-
await frontendUtils.goToShop();
await page.click( 'text=Add to cart' );
await miniCartUtils.openMiniCart();
@@ -182,14 +154,7 @@ test.describe( `${ blockData.name } Block`, () => {
page,
frontendUtils,
miniCartUtils,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
-
await frontendUtils.goToShop();
await frontendUtils.addToCart( REGULAR_PRICED_PRODUCT_NAME );
await miniCartUtils.openMiniCart();
@@ -224,14 +189,7 @@ test.describe( `${ blockData.name } Block`, () => {
page,
frontendUtils,
miniCartUtils,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
-
await frontendUtils.goToShop();
await frontendUtils.addToCart( REGULAR_PRICED_PRODUCT_NAME );
await miniCartUtils.openMiniCart();
@@ -251,14 +209,7 @@ test.describe( `${ blockData.name } Block`, () => {
page,
frontendUtils,
miniCartUtils,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
-
await frontendUtils.goToShop();
await frontendUtils.addToCart( REGULAR_PRICED_PRODUCT_NAME );
await miniCartUtils.openMiniCart();
@@ -296,14 +247,7 @@ test.describe( `${ blockData.name } Block`, () => {
page,
frontendUtils,
miniCartUtils,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
-
await frontendUtils.goToShop();
await frontendUtils.addToCart( REGULAR_PRICED_PRODUCT_NAME );
await miniCartUtils.openMiniCart();
@@ -323,14 +267,7 @@ test.describe( `${ blockData.name } Block`, () => {
page,
frontendUtils,
miniCartUtils,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
-
await frontendUtils.goToShop();
await frontendUtils.addToCart( REGULAR_PRICED_PRODUCT_NAME );
await miniCartUtils.openMiniCart();
@@ -342,14 +279,7 @@ test.describe( `${ blockData.name } Block`, () => {
page,
frontendUtils,
miniCartUtils,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
-
await frontendUtils.goToShop();
await frontendUtils.addToCart( REGULAR_PRICED_PRODUCT_NAME );
await miniCartUtils.openMiniCart();
diff --git a/plugins/woocommerce/client/blocks/tests/e2e/tests/product-button/product-button.block_theme.spec.ts b/plugins/woocommerce/client/blocks/tests/e2e/tests/product-button/product-button.block_theme.spec.ts
index 020ab1236c..c1d36e06f0 100644
--- a/plugins/woocommerce/client/blocks/tests/e2e/tests/product-button/product-button.block_theme.spec.ts
+++ b/plugins/woocommerce/client/blocks/tests/e2e/tests/product-button/product-button.block_theme.spec.ts
@@ -33,14 +33,7 @@ test.describe( `${ blockData.name } Block`, () => {
test( 'should add product to the cart', async ( {
frontendUtils,
page,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
-
const blocks = await frontendUtils.getBlockByName( blockData.slug );
const block = blocks.first();
diff --git a/plugins/woocommerce/client/blocks/tests/e2e/tests/product-collection/product-collection-errors.block_theme.spec.ts b/plugins/woocommerce/client/blocks/tests/e2e/tests/product-collection/product-collection-errors.block_theme.spec.ts
index 2018a1881c..6c2acf0b69 100644
--- a/plugins/woocommerce/client/blocks/tests/e2e/tests/product-collection/product-collection-errors.block_theme.spec.ts
+++ b/plugins/woocommerce/client/blocks/tests/e2e/tests/product-collection/product-collection-errors.block_theme.spec.ts
@@ -23,14 +23,7 @@ test.describe( 'Product Page: error notices', () => {
test( 'displays error notice when attempting to add product beyond stock limit', async ( {
page,
pageObject,
- wpCoreVersion,
} ) => {
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wpCoreVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
-
const productName = 'A Managed Stock';
await wpCLI(
diff --git a/plugins/woocommerce/tests/e2e-pw/tests/cart/add-to-cart.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/cart/add-to-cart.spec.js
index 0b57a6881a..d82bc33b0b 100644
--- a/plugins/woocommerce/tests/e2e-pw/tests/cart/add-to-cart.spec.js
+++ b/plugins/woocommerce/tests/e2e-pw/tests/cart/add-to-cart.spec.js
@@ -11,7 +11,6 @@ import {
*/
import { tags, test, expect } from '../../fixtures/fixtures';
import { checkCartContentInBlocksCart } from '../../utils/cart';
-import { getInstalledWordPressVersion } from '../../utils/wordpress';
const productName = `Cart product test ${ Date.now() }`;
const productPrice = '13.99';
@@ -97,13 +96,6 @@ test.describe(
'should be able to navigate and remove item from mini cart using keyboard',
{ tag: [ tags.COULD_BE_LOWER_LEVEL_TEST ] },
async ( { page } ) => {
- const wordPressVersion = await getInstalledWordPressVersion();
- // eslint-disable-next-line playwright/no-skipped-test
- test.skip(
- wordPressVersion <= 6.7,
- 'Skipping test as withSyncEvent is available starting from WordPress 6.8'
- );
-
await test.step( 'Add product to cart and open mini cart', async () => {
await addAProductToCart( page, productId );
const miniCartButton = page.locator(