From c2fa5eeff5a4e703dd153cce7f629b02368670eb Mon Sep 17 00:00:00 2001 From: Narendra Sishodiya <32844880+narenin@users.noreply.github.com> Date: Wed, 18 Sep 2024 04:29:22 +0530 Subject: [PATCH] Updated Product attributes placeholder to e.g. length or weight (#51379) * Updated Product attributes placeholder to e.g. length or weight * Added Changelog * Add changefile(s) from automation for the following project(s): woocommerce * Delete changelog/51134-product-attribute-placeholder-update * Add changefile(s) from automation for the following project(s): woocommerce * Revise changelog. * Add changefile(s) from automation for the following project(s): woocommerce * Satisfy linter. * Increase exactitude to reduce ambiguity levels. --------- Co-authored-by: github-actions Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com> --- .../51379-51134-product-attribute-placeholder-change | 4 ++++ .../admin/meta-boxes/views/html-product-attribute-inner.php | 2 +- .../e2e-pw/tests/merchant/product-create-simple.spec.js | 4 ++-- .../add-variable-product/create-product-attributes.spec.js | 5 +++-- 4 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 plugins/woocommerce/changelog/51379-51134-product-attribute-placeholder-change diff --git a/plugins/woocommerce/changelog/51379-51134-product-attribute-placeholder-change b/plugins/woocommerce/changelog/51379-51134-product-attribute-placeholder-change new file mode 100644 index 00000000000..35d09da84a8 --- /dev/null +++ b/plugins/woocommerce/changelog/51379-51134-product-attribute-placeholder-change @@ -0,0 +1,4 @@ +Significance: patch +Type: fix +Comment: Changed Product attributes placeholder to e.g. length or weight + diff --git a/plugins/woocommerce/includes/admin/meta-boxes/views/html-product-attribute-inner.php b/plugins/woocommerce/includes/admin/meta-boxes/views/html-product-attribute-inner.php index ef38a24cb54..94112796bb9 100644 --- a/plugins/woocommerce/includes/admin/meta-boxes/views/html-product-attribute-inner.php +++ b/plugins/woocommerce/includes/admin/meta-boxes/views/html-product-attribute-inner.php @@ -20,7 +20,7 @@ if ( ! defined( 'ABSPATH' ) ) { get_name() ) ); ?> - + diff --git a/plugins/woocommerce/tests/e2e-pw/tests/merchant/product-create-simple.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/merchant/product-create-simple.spec.js index 77b8a6ebefa..46934a82a1d 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/merchant/product-create-simple.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/merchant/product-create-simple.spec.js @@ -112,7 +112,7 @@ for ( const productType of Object.keys( productData ) ) { .getByRole( 'link', { name: 'Attributes' } ) .click(); await page - .getByPlaceholder( 'f.e. size or color' ) + .getByPlaceholder( 'e.g. length or weight' ) .fill( attributeName ); await page .getByPlaceholder( 'Enter some descriptive text.' ) @@ -183,7 +183,7 @@ for ( const productType of Object.keys( productData ) ) { .getByPlaceholder( '0' ) .fill( productData[ productType ].shipping.weight ); await page - .getByPlaceholder( 'Length' ) + .getByPlaceholder( 'Length', { exact: true } ) .fill( productData[ productType ].shipping.length ); await page .getByPlaceholder( 'Width' ) diff --git a/plugins/woocommerce/tests/e2e-pw/tests/merchant/products/add-variable-product/create-product-attributes.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/merchant/products/add-variable-product/create-product-attributes.spec.js index 77db0953f5c..9be4189e4b9 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/merchant/products/add-variable-product/create-product-attributes.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/merchant/products/add-variable-product/create-product-attributes.spec.js @@ -39,8 +39,9 @@ test.describe( 'Add product attributes', { tag: '@gutenberg' }, () => { } ); test( 'can add custom product attributes', async ( { page } ) => { - const textbox_attributeName = - page.getByPlaceholder( 'f.e. size or color' ); + const textbox_attributeName = page.getByPlaceholder( + 'e.g. length or weight' + ); const textbox_attributeValues = page.getByPlaceholder( 'Enter options for customers to choose from' );