Commit d97dfda0491 for woocommerce

commit d97dfda04914ec7833f53d4850d7e249f4b5e9de
Author: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com>
Date:   Mon Jun 29 15:32:52 2026 +0300

    e2e tests: fix unstable create-product-attributes test (#66089)

diff --git a/plugins/woocommerce/changelog/testops-199-fix-flaky-create-product-attributes-e2e b/plugins/woocommerce/changelog/testops-199-fix-flaky-create-product-attributes-e2e
new file mode 100644
index 00000000000..de8e6571da5
--- /dev/null
+++ b/plugins/woocommerce/changelog/testops-199-fix-flaky-create-product-attributes-e2e
@@ -0,0 +1,3 @@
+Significance: patch
+Type: dev
+Comment: E2E test only change.
diff --git a/plugins/woocommerce/tests/e2e/tests/product/create-product-attributes.spec.ts b/plugins/woocommerce/tests/e2e/tests/product/create-product-attributes.spec.ts
index d577a553a91..7eb3801500e 100644
--- a/plugins/woocommerce/tests/e2e/tests/product/create-product-attributes.spec.ts
+++ b/plugins/woocommerce/tests/e2e/tests/product/create-product-attributes.spec.ts
@@ -68,7 +68,13 @@ async function goToAttributesTab( page: Page ) {
 			.locator( '.attribute_tab' )
 			.getByRole( 'link', { name: 'Attributes' } );

-		await attributesTab.click();
+		// On a freshly reloaded edit page the tab click can fire before the
+		// metabox JS binds its handlers, silently leaving the General panel
+		// active. Retry the click until the Attributes panel is really shown.
+		await expect( async () => {
+			await attributesTab.click();
+			await expect( page.locator( '#product_attributes' ) ).toBeVisible();
+		} ).toPass();
 	} );
 }
 async function addAttribute(
@@ -92,17 +98,20 @@ async function addAttribute(
 	}

 	await test.step( `Type "${ attributeName }" in the "Attribute name" input field.`, async () => {
+		// Use pressSequentially (not fill): the "Save attributes" button is
+		// enabled by a `keyup` handler on these inputs (see meta-boxes.js).
+		// fill() only fires `input`, leaving the button disabled.
 		await page
 			.getByPlaceholder( 'e.g. length or weight' )
 			.last()
-			.type( attributeName );
+			.pressSequentially( attributeName );
 	} );

 	await test.step( `Type the attribute values "${ attributeValues }".`, async () => {
 		await page
 			.getByPlaceholder( 'Enter options for customers to choose from' )
 			.last()
-			.type( attributeValues );
+			.pressSequentially( attributeValues );
 	} );

 	await test.step( `Expect "Visible on the product page" checkbox to be checked by default`, async () => {