Commit 1a9bcb84d7d for woocommerce
commit 1a9bcb84d7d0da7359b05a2ae40901079865a926
Author: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
Date: Tue Sep 29 15:20:27 2026 +0300
Fix flaky add product task E2E test caused by the email upgrade modal (#69179)
Dismiss the email improvements modal in E2E site setup
Email specs leave the email improvements feature disabled. The next visit
to the WooCommerce home then redirects once to an upgrade modal, which
hid the product type options in the add product task spec and failed its
first attempt in every serial run.
diff --git a/plugins/woocommerce/changelog/fix-e2e-onboarding-add-product-task b/plugins/woocommerce/changelog/fix-e2e-onboarding-add-product-task
new file mode 100644
index 00000000000..fc0adbcc2d9
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-e2e-onboarding-add-product-task
@@ -0,0 +1,4 @@
+Significance: patch
+Type: dev
+Comment: Stop a one-time email upgrade modal from breaking an onboarding E2E test; no production change.
+
diff --git a/plugins/woocommerce/tests/e2e/fixtures/site.setup.ts b/plugins/woocommerce/tests/e2e/fixtures/site.setup.ts
index 9aef9137c0b..cc334517b6f 100644
--- a/plugins/woocommerce/tests/e2e/fixtures/site.setup.ts
+++ b/plugins/woocommerce/tests/e2e/fixtures/site.setup.ts
@@ -79,6 +79,18 @@ setup( 'setup site', async ( { baseURL, restApi } ) => {
);
} );
+ await setup.step( 'dismiss email improvements modal', async () => {
+ // Email specs leave `email_improvements` disabled, so the next visit to the
+ // WooCommerce home redirects once to a "Store emails have had an upgrade!"
+ // modal that covers whatever page the next spec expects.
+ await setOption(
+ request,
+ baseURL,
+ 'woocommerce_admin_dismissed_try_email_improvements_modal',
+ 'yes'
+ );
+ } );
+
await setup.step( 'disable coming soon', async () => {
await setComingSoon( { baseURL, enabled: 'no' } );
} );