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' ) + '"]' )
|
||||
.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(
|
||||
'disabled-items',
|
||||
|
|
|
@ -41,8 +41,8 @@ test.describe( 'Add product attributes', () => {
|
|||
test( 'can add custom product attributes', async ( { page } ) => {
|
||||
const textbox_attributeName =
|
||||
page.getByPlaceholder( 'f.e. size or color' );
|
||||
const textbox_attributeValues = page.getByLabel(
|
||||
'Value(s):'
|
||||
const textbox_attributeValues = page.getByPlaceholder(
|
||||
'Enter options for customers to choose from'
|
||||
);
|
||||
const checkbox_visible = page
|
||||
.getByText( 'Visible on the product page' )
|
||||
|
|
Loading…
Reference in New Issue