This error actually makes sense because the element I'm pointing to in setReturnFocus lives outside the scope of the component under test. I'm curious if other people have encountered this while testing components and what some options are for dealing with it. Is It possible to mock focusTrap in this scenario? Does anyone have any thoughts?
<error message="Uncaught Error: `setReturnFocus` refers to no known node">
<![CDATA[Source:
Error: `setReturnFocus` refers to no known node
at getNodeForOption (webpack://__ember_auto_import__/./node_modules/focus-trap/index.js?:170:15)
at getReturnFocusNode (webpack://__ember_auto_import__/./node_modules/focus-trap/index.js?:204:16)
at eval (webpack://__ember_auto_import__/./node_modules/focus-trap/index.js?:99:18)]]>
</error>
This error actually makes sense because the element I'm pointing to in
setReturnFocuslives outside the scope of the component under test. I'm curious if other people have encountered this while testing components and what some options are for dealing with it. Is It possible to mock focusTrap in this scenario? Does anyone have any thoughts?