Skip to content

Question: setReturnFocus errors in component test #28

Description

@elidupuis

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions