Ensure that a placeholder always exists
This commit is contained in:
parent
4aeabe64ef
commit
80e998481f
|
@ -463,6 +463,10 @@ jQuery( function ( $ ) {
|
||||||
.find( 'option[value="' + $( el ).data( 'taxonomy' ) + '"]' )
|
.find( 'option[value="' + $( el ).data( 'taxonomy' ) + '"]' )
|
||||||
.attr( 'disabled', 'disabled' );
|
.attr( 'disabled', 'disabled' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( 'undefined' === $(el).attr( 'data-taxonomy' ) || false === $(el).attr( 'data-taxonomy' ) || '' === $(el).attr( 'data-taxonomy' ) ) {
|
||||||
|
add_placeholder_to_attribute_values_field( $(el) );
|
||||||
|
}
|
||||||
} );
|
} );
|
||||||
$( 'select.wc-attribute-search' ).data(
|
$( 'select.wc-attribute-search' ).data(
|
||||||
'disabled-items',
|
'disabled-items',
|
||||||
|
|
|
@ -41,8 +41,8 @@ test.describe( 'Add product attributes', () => {
|
||||||
test( 'can add custom product attributes', async ( { page } ) => {
|
test( 'can add custom product attributes', async ( { page } ) => {
|
||||||
const textbox_attributeName =
|
const textbox_attributeName =
|
||||||
page.getByPlaceholder( 'f.e. size or color' );
|
page.getByPlaceholder( 'f.e. size or color' );
|
||||||
const textbox_attributeValues = page.getByLabel(
|
const textbox_attributeValues = page.getByPlaceholder(
|
||||||
'Value(s):'
|
'Enter options for customers to choose from'
|
||||||
);
|
);
|
||||||
const checkbox_visible = page
|
const checkbox_visible = page
|
||||||
.getByText( 'Visible on the product page' )
|
.getByText( 'Visible on the product page' )
|
||||||
|
|
Loading…
Reference in New Issue