diff --git a/packages/components/src/custom-select-control-v2/legacy-component/test/index.tsx b/packages/components/src/custom-select-control-v2/legacy-component/test/index.tsx index 906bf1cde0290..5fd66ac1112b7 100644 --- a/packages/components/src/custom-select-control-v2/legacy-component/test/index.tsx +++ b/packages/components/src/custom-select-control-v2/legacy-component/test/index.tsx @@ -12,7 +12,7 @@ import { useState } from '@wordpress/element'; /** * Internal dependencies */ -import UncontrolledCustomSelect from '..'; +import UncontrolledCustomSelectControl from '..'; const customClass = 'amber-skies'; @@ -48,14 +48,14 @@ const legacyProps = { ], }; -const LegacyControlledCustomSelect = ( { +const ControlledCustomSelectControl = ( { options, onChange, ...restProps -}: React.ComponentProps< typeof UncontrolledCustomSelect > ) => { +}: React.ComponentProps< typeof UncontrolledCustomSelectControl > ) => { const [ value, setValue ] = useState( options[ 0 ] ); return ( - { @@ -70,8 +70,8 @@ const LegacyControlledCustomSelect = ( { }; describe.each( [ - [ 'Uncontrolled', UncontrolledCustomSelect ], - [ 'Controlled', LegacyControlledCustomSelect ], + [ 'Uncontrolled', UncontrolledCustomSelectControl ], + [ 'Controlled', ControlledCustomSelectControl ], ] )( 'CustomSelectControl (%s)', ( ...modeAndComponent ) => { const [ , Component ] = modeAndComponent; diff --git a/packages/components/src/custom-select-control-v2/test/index.tsx b/packages/components/src/custom-select-control-v2/test/index.tsx index 353660d0b4cf1..13421479c0dd5 100644 --- a/packages/components/src/custom-select-control-v2/test/index.tsx +++ b/packages/components/src/custom-select-control-v2/test/index.tsx @@ -12,7 +12,7 @@ import { useState } from '@wordpress/element'; /** * Internal dependencies */ -import UncontrolledCustomSelectControl from '..'; +import UncontrolledCustomSelectControlV2 from '..'; import type { CustomSelectProps } from '../types'; const items = [ @@ -41,14 +41,14 @@ const items = [ const defaultProps = { label: 'label!', children: items.map( ( { value, key } ) => ( - + ) ), }; const ControlledCustomSelectControl = ( props: CustomSelectProps ) => { const [ value, setValue ] = useState< string | string[] >(); return ( - { setValue( nextValue ); @@ -60,7 +60,7 @@ const ControlledCustomSelectControl = ( props: CustomSelectProps ) => { }; describe.each( [ - [ 'Uncontrolled', UncontrolledCustomSelectControl ], + [ 'Uncontrolled', UncontrolledCustomSelectControlV2 ], [ 'Controlled', ControlledCustomSelectControl ], ] )( 'CustomSelectControlV2 (%s)', ( ...modeAndComponent ) => { const [ , Component ] = modeAndComponent; @@ -257,12 +257,12 @@ describe.each( [ 'rose blush', 'ultraviolet morning light', ].map( ( item ) => ( - { item } - + ) ) } ); @@ -329,12 +329,12 @@ describe.each( [ render( { defaultValues.map( ( item ) => ( - { item } - + ) ) } ); @@ -384,12 +384,12 @@ describe.each( [ render( - + { renderValue( 'april-29' ) } - - + + { renderValue( 'july-9' ) } - + );