1010 * governing permissions and limitations under the License.
1111 */
1212
13- import { act , fireEvent , installMouseEvent , installPointerEvent , pointerMap , render } from '@react-spectrum/test-utils-internal' ;
13+ import { act , fireEvent , installMouseEvent , installPointerEvent , pointerMap , renderv3 as render } from '@react-spectrum/test-utils-internal' ;
1414import { ColorWheel } from '../' ;
1515import { ControlledHSL } from '../stories/ColorWheel.stories' ;
1616import { parseColor } from '@react-stately/color' ;
@@ -297,7 +297,7 @@ describe('ColorWheel', () => {
297297 let { container : _container , getByRole} = render ( < ColorWheel defaultValue = { defaultColor } onChange = { onChangeSpy } /> ) ;
298298 let slider = getByRole ( 'slider' ) ;
299299 let thumb = slider . parentElement ;
300- let container = _container ?. firstChild ?. firstChild as HTMLElement ;
300+ let container = _container ?. firstChild ?. firstChild ?. firstChild as HTMLElement ;
301301 container . getBoundingClientRect = getBoundingClientRect ;
302302
303303 expect ( document . activeElement ) . not . toBe ( slider ) ;
@@ -320,7 +320,7 @@ describe('ColorWheel', () => {
320320 let defaultColor = parseColor ( 'hsl(0, 100%, 50%)' ) ;
321321 let { container : _container , getByRole} = render ( < ColorWheel defaultValue = { defaultColor } onChange = { onChangeSpy } isDisabled /> ) ;
322322 let slider = getByRole ( 'slider' ) ;
323- let container = _container ?. firstChild ?. firstChild as HTMLElement ;
323+ let container = _container ?. firstChild ?. firstChild ?. firstChild as HTMLElement ;
324324 container . getBoundingClientRect = getBoundingClientRect ;
325325
326326 expect ( document . activeElement ) . not . toBe ( slider ) ;
@@ -341,7 +341,7 @@ describe('ColorWheel', () => {
341341 let defaultColor = parseColor ( 'hsl(0, 100%, 50%)' ) ;
342342 let { container : _container , getByRole} = render ( < ControlledHSL defaultValue = { defaultColor } onChange = { onChangeSpy } onChangeEnd = { onChangeEndSpy } /> ) ;
343343 let slider = getByRole ( 'slider' ) ;
344- let container = _container ?. firstChild ?. firstChild ?. firstChild as HTMLElement ;
344+ let container = _container ?. firstChild ?. firstChild ?. firstChild ?. firstChild as HTMLElement ;
345345 container . getBoundingClientRect = getBoundingClientRect ;
346346
347347 expect ( document . activeElement ) . not . toBe ( slider ) ;
@@ -372,7 +372,7 @@ describe('ColorWheel', () => {
372372 ...
373373 input.spectrum-ColorWheel-slider
374374 */
375- let handleColorElement = _container ?. firstChild ?. firstChild ?. nextSibling ?. firstChild as HTMLElement ;
375+ let handleColorElement = _container ?. firstChild ?. firstChild ?. firstChild ?. nextSibling ?. firstChild as HTMLElement ;
376376 let thumbColor = parseColor ( handleColorElement . style . backgroundColor ) ;
377377 expect ( defaultColor . getChannelValue ( 'alpha' ) ) . toEqual ( 0.5 ) ;
378378 expect ( thumbColor . getChannelValue ( 'alpha' ) ) . toEqual ( 1 ) ;
0 commit comments