Commit 49fed7051fa for woocommerce

commit 49fed7051fae1a13fbea7d486be7a7f0fda15f5e
Author: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
Date:   Mon Nov 30 17:03:39 2026 +0200

    Rebalance blocks e2e shards and enable fullyParallel (#71519)

diff --git a/plugins/woocommerce/changelog/testops-307-blocks-e2e-serial-shard-counts b/plugins/woocommerce/changelog/testops-307-blocks-e2e-serial-shard-counts
new file mode 100644
index 00000000000..ec21fb245fe
--- /dev/null
+++ b/plugins/woocommerce/changelog/testops-307-blocks-e2e-serial-shard-counts
@@ -0,0 +1,3 @@
+Significance: patch
+Type: dev
+Comment: Set the Blocks e2e CI shard counts from CI timings; CI config only, no production change.
diff --git a/plugins/woocommerce/package.json b/plugins/woocommerce/package.json
index 975e3667c5e..8ab7ec9b3cb 100644
--- a/plugins/woocommerce/package.json
+++ b/plugins/woocommerce/package.json
@@ -987,8 +987,12 @@
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:blocks:parallel",
 					"shardingArguments": [
-						"--shard=1/2",
-						"--shard=2/2"
+						"--shard=1/6",
+						"--shard=2/6",
+						"--shard=3/6",
+						"--shard=4/6",
+						"--shard=5/6",
+						"--shard=6/6"
 					],
 					"changes": [
 						"patterns/**/*.php",
@@ -1038,14 +1042,10 @@
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:blocks:serial",
 					"shardingArguments": [
-						"--shard=1/8",
-						"--shard=2/8",
-						"--shard=3/8",
-						"--shard=4/8",
-						"--shard=5/8",
-						"--shard=6/8",
-						"--shard=7/8",
-						"--shard=8/8"
+						"--shard=1/4",
+						"--shard=2/4",
+						"--shard=3/4",
+						"--shard=4/4"
 					],
 					"changes": [
 						"patterns/**/*.php",
@@ -1094,7 +1094,12 @@
 					"testType": "e2e",
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:blocks:parallel",
-					"shardingArguments": [],
+					"shardingArguments": [
+						"--shard=1/4",
+						"--shard=2/4",
+						"--shard=3/4",
+						"--shard=4/4"
+					],
 					"changes": [],
 					"onlyForDependencies": [
 						"@woocommerce/block-library"
@@ -1120,14 +1125,11 @@
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:blocks:serial",
 					"shardingArguments": [
-						"--shard=1/8",
-						"--shard=2/8",
-						"--shard=3/8",
-						"--shard=4/8",
-						"--shard=5/8",
-						"--shard=6/8",
-						"--shard=7/8",
-						"--shard=8/8"
+						"--shard=1/5",
+						"--shard=2/5",
+						"--shard=3/5",
+						"--shard=4/5",
+						"--shard=5/5"
 					],
 					"changes": [],
 					"onlyForDependencies": [
@@ -1153,7 +1155,12 @@
 					"testType": "e2e",
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:blocks:parallel",
-					"shardingArguments": [],
+					"shardingArguments": [
+						"--shard=1/4",
+						"--shard=2/4",
+						"--shard=3/4",
+						"--shard=4/4"
+					],
 					"changes": [],
 					"onlyForDependencies": [
 						"@woocommerce/block-library"
@@ -1179,14 +1186,11 @@
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:blocks:serial",
 					"shardingArguments": [
-						"--shard=1/8",
-						"--shard=2/8",
-						"--shard=3/8",
-						"--shard=4/8",
-						"--shard=5/8",
-						"--shard=6/8",
-						"--shard=7/8",
-						"--shard=8/8"
+						"--shard=1/5",
+						"--shard=2/5",
+						"--shard=3/5",
+						"--shard=4/5",
+						"--shard=5/5"
 					],
 					"changes": [],
 					"onlyForDependencies": [
@@ -1212,7 +1216,12 @@
 					"testType": "e2e",
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:blocks:unified-editor-assets:parallel",
-					"shardingArguments": [],
+					"shardingArguments": [
+						"--shard=1/4",
+						"--shard=2/4",
+						"--shard=3/4",
+						"--shard=4/4"
+					],
 					"changes": [
 						"patterns/**/*.php",
 						"includes/**/*.php",
@@ -1255,14 +1264,11 @@
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:blocks:unified-editor-assets:serial",
 					"shardingArguments": [
-						"--shard=1/8",
-						"--shard=2/8",
-						"--shard=3/8",
-						"--shard=4/8",
-						"--shard=5/8",
-						"--shard=6/8",
-						"--shard=7/8",
-						"--shard=8/8"
+						"--shard=1/5",
+						"--shard=2/5",
+						"--shard=3/5",
+						"--shard=4/5",
+						"--shard=5/5"
 					],
 					"changes": [
 						"patterns/**/*.php",
@@ -1307,8 +1313,12 @@
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:blocks:parallel",
 					"shardingArguments": [
-						"--shard=1/2",
-						"--shard=2/2"
+						"--shard=1/6",
+						"--shard=2/6",
+						"--shard=3/6",
+						"--shard=4/6",
+						"--shard=5/6",
+						"--shard=6/6"
 					],
 					"changes": [
 						"sample-data/sample_products.xml",
@@ -1351,14 +1361,10 @@
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:blocks:serial",
 					"shardingArguments": [
-						"--shard=1/8",
-						"--shard=2/8",
-						"--shard=3/8",
-						"--shard=4/8",
-						"--shard=5/8",
-						"--shard=6/8",
-						"--shard=7/8",
-						"--shard=8/8"
+						"--shard=1/4",
+						"--shard=2/4",
+						"--shard=3/4",
+						"--shard=4/4"
 					],
 					"changes": [
 						"sample-data/sample_products.xml",
@@ -1400,8 +1406,12 @@
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:blocks:parallel",
 					"shardingArguments": [
-						"--shard=1/2",
-						"--shard=2/2"
+						"--shard=1/6",
+						"--shard=2/6",
+						"--shard=3/6",
+						"--shard=4/6",
+						"--shard=5/6",
+						"--shard=6/6"
 					],
 					"changes": [
 						"sample-data/sample_products.xml",
@@ -1443,14 +1453,10 @@
 					"usesSharedPluginBuild": true,
 					"command": "test:e2e:blocks:serial",
 					"shardingArguments": [
-						"--shard=1/8",
-						"--shard=2/8",
-						"--shard=3/8",
-						"--shard=4/8",
-						"--shard=5/8",
-						"--shard=6/8",
-						"--shard=7/8",
-						"--shard=8/8"
+						"--shard=1/4",
+						"--shard=2/4",
+						"--shard=3/4",
+						"--shard=4/4"
 					],
 					"changes": [
 						"sample-data/sample_products.xml",
diff --git a/plugins/woocommerce/tests/e2e/playwright.config.ts b/plugins/woocommerce/tests/e2e/playwright.config.ts
index ee6935202f8..12e541fbe3d 100644
--- a/plugins/woocommerce/tests/e2e/playwright.config.ts
+++ b/plugins/woocommerce/tests/e2e/playwright.config.ts
@@ -369,6 +369,9 @@ export default defineConfig< { resetDatabaseAfterEachTest: boolean } >( {
 			name: 'blocks-serial',
 			testDir: `${ TESTS_ROOT_PATH }/tests/blocks`,
 			testMatch: blocksSerialSpecs,
+			// Lets `--shard` split a spec file between shards. With one worker,
+			// the tests still run one at a time.
+			fullyParallel: true,
 			dependencies: [ 'blocks setup' ],
 			workers: 1,
 			use: {
@@ -380,6 +383,8 @@ export default defineConfig< { resetDatabaseAfterEachTest: boolean } >( {
 			name: 'blocks-parallel',
 			testDir: `${ TESTS_ROOT_PATH }/tests/blocks`,
 			testIgnore: blocksSerialSpecs,
+			// Lets `--shard` split a spec file between shards.
+			fullyParallel: true,
 			dependencies: [ 'blocks setup' ],
 			use: {
 				...devices[ 'Desktop Chrome' ],