import {cleanup, fireEvent, render, screen} from '@testing-library/react'; import {useState} from 'react'; import { useClick, useFloating, useId, useInteractions, useRole, } from '../../src'; import type {UseRoleProps} from '../../src/hooks/useRole'; function App({ initiallyOpen = false, ...props }: UseRoleProps & {initiallyOpen?: boolean}) { const [open, setOpen] = useState(initiallyOpen); const {refs, context} = useFloating({ open, onOpenChange: setOpen, }); const {getReferenceProps, getFloatingProps} = useInteractions([ useRole(context, props), ]); return ( <>