You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unit test case is failing in rendering a React Component whose child has an UncontrolledCollapse component. Complains of a bogus selector. Otherwise, works fine in the browser.
This is with a boilerplate create-react-app instance with only bootstrap and reactstrap installed.
What should be happening?
Would expect the component to render and the unit test not fail
SyntaxError: '##toggler' is not a valid selector
at emit (node_modules/nwsapi/src/nwsapi.js:563:17)
at Object._querySelectorAll [as select] (node_modules/nwsapi/src/nwsapi.js:1492:9)
at findDOMElements (node_modules/reactstrap/lib/utils.js:239:28)
at UncontrolledCollapse.componentDidMount (node_modules/reactstrap/lib/UncontrolledCollapse.js:55:48)
at commitLifeCycles (node_modules/react-dom/cjs/react-dom.development.js:17334:22)
at commitAllLifeCycles (node_modules/react-dom/cjs/react-dom.development.js:18736:7)
at HTMLUnknownElement.callCallback (node_modules/react-dom/cjs/react-dom.development.js:149:14)
Code
constExample=()=>(<div><Buttoncolor="primary"id="toggler"style={{marginBottom: '1rem'}}>
Toggle
</Button><UncontrolledCollapsetoggler="#toggler"><Card><CardBody>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Nesciunt magni, voluptas debitis
similique porro a molestias consequuntur earum odio officiis natus, amet hic, iste sed
dignissimos esse fuga! Minus, alias.
</CardBody></Card></UncontrolledCollapse></div>);
The text was updated successfully, but these errors were encountered:
If it is happening in the browser then at the time the component check the DOM for your target, your target is not yet rendered to the DOM. This is still an issue, but checkout #773 for more details.
UncontrolledCollapse
#8.0.0
#16.8.6
#8.0.0
What is happening?
Unit test case is failing in rendering a React Component whose child has an
UncontrolledCollapse
component. Complains of a bogus selector. Otherwise, works fine in the browser.This is with a boilerplate
create-react-app
instance with onlybootstrap
andreactstrap
installed.What should be happening?
Would expect the component to render and the unit test not fail
Steps to reproduce issue
yarn test
Error message in console
Code
The text was updated successfully, but these errors were encountered: