<h2 dir="auto">System:</h2>
<ul dir="auto">
<li>OS: macOS Mojave 10.14.6</li>
<li>CPU: (8) x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz</li>
<li>Memory: 169.37 MB / 16.00 GB</li>
<li>Shell: 3.2.57 - /bin/bash</li>
</ul>
<h2 dir="auto">Binaries:</h2>
<ul dir="auto">
<li>Node: 11.14.0 - ~/.nvm/versions/node/v11.14.0/bin/node</li>
<li>Yarn: 1.17.3 - /usr/local/bin/yarn</li>
<li>npm: 6.7.0 - ~/.nvm/versions/node/v11.14.0/bin/npm</li>
</ul>
<h2 dir="auto">npmPackages:</h2>
<ul dir="auto">
<li>styled-components: ^4.4.0 =&gt; 4.4.0</li>
<li>jest: ^24.9.0</li>
<li>react-test-renderer: ^16.10.1</li>
<li>ts-jest: ^24.1.0</li>
<li>typescript: 3.6.3</li>
</ul>
<h2 dir="auto">Reproduction</h2>
<p dir="auto">Run <code class="notranslate">yarn test</code> on my example repo and look at the output from Demo.test.tsx.<br>
<a href="https://github.com/Swazimodo/demo-broken-styled-components">https://github.com/Swazimodo/demo-broken-styled-components</a></p>
<h2 dir="auto">Steps to reproduce</h2>
<ul dir="auto">
<li>set a data tag for UI testing on a styled-component div</li>
<li>render the component with react-test-renderer</li>
<li>take the output and find all by props</li>
<li>check the length of the selection</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<ul dir="auto">
<li>get one result for each rendered item</li>
</ul>
<h2 dir="auto">Actual Behavior</h2>
<ul dir="auto">
<li>get 3x the results</li>
</ul>
<h2 dir="auto">notes</h2>
<ul dir="auto">
<li>This works for regular react nodes but seems to blow up when you use styled-components</li>
<li>I have created a snapshot with the rendered result to look at it and I do not see any duplicates <g-emoji class="g-emoji" alias="man_shrugging" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f937-2642.png">🤷‍♂</g-emoji></li>
</ul>
<p dir="auto">Describe what you were doing when the bug occurred:</p>
<ol dir="auto">
<li>Collapsed one component in the React devtools (tab 'components')</li>
<li>This error message is shown</li>
<li></li>
</ol>
<hr>
<h2 dir="auto">Please do not remove the text below this line</h2>
<p dir="auto">DevTools version: 4.11.0-39713716aa</p>
<p dir="auto">Call stack: at store_Store.getIndexOfElementID (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:22245:24)<br>
at getCurrentValue (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29244:29)<br>
at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25898:23<br>
at Yh (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13305:36)<br>
at Zh (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13343:53)<br>
at Object.useState (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13795:12)<br>
at exports.useState (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:5320:20)<br>
at useSubscription (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25871:54)<br>
at SelectedTreeHighlight_SelectedTreeHighlight (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29268:16)<br>
at Rh (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13245:7)</p>
<p dir="auto">Component stack: at SelectedTreeHighlight_SelectedTreeHighlight (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29213:34)<br>
at div<br>
at InnerElementType (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29953:3)<br>
at div<br>
at List (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:23588:30)<br>
at div<br>
at AutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:3111:5)<br>
at div<br>
at div<br>
at Tree_Tree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29531:47)<br>
at div<br>
at div<br>
at OwnersListContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:28680:3)<br>
at SettingsModalContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29121:3)<br>
at Components_Components (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:34645:52)<br>
at ErrorBoundary_ErrorBoundary (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30035:5)<br>
at PortaledContent (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30157:5)<br>
at div<br>
at div<br>
at ProfilerContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:34264:3)<br>
at TreeContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25356:3)<br>
at SettingsContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25963:3)<br>
at ModalDialogContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30300:3)<br>
at DevTools_DevTools (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:37639:3)</p>