Issue 1:
System:

OS: macOS Mojave 10.14.6

CPU: (8) x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz

Memory: 169.37 MB / 16.00 GB

Shell: 3.2.57 - /bin/bash

Binaries:

Node: 11.14.0 - ~/.nvm/versions/node/v11.14.0/bin/node

Yarn: 1.17.3 - /usr/local/bin/yarn

npm: 6.7.0 - ~/.nvm/versions/node/v11.14.0/bin/npm

npmPackages:

styled-components: ^4.4.0 => 4.4.0

jest: ^24.9.0

react-test-renderer: ^16.10.1

ts-jest: ^24.1.0

typescript: 3.6.3

Reproduction

Run yarn test on my example repo and look at the output from Demo.test.tsx.

https://github.com/Swazimodo/demo-broken-styled-components

Steps to reproduce

set a data tag for UI testing on a styled-component div

render the component with react-test-renderer

take the output and find all by props

check the length of the selection

Expected Behavior

get one result for each rendered item

Actual Behavior

get 3x the results

notes

This works for regular react nodes but seems to blow up when you use styled-components

I have created a snapshot with the rendered result to look at it and I do not see any duplicates 🤷‍♂

Issue 2:
Describe what you were doing when the bug occurred:

Collapsed one component in the React devtools (tab 'components')

This error message is shown

Please do not remove the text below this line

DevTools version: 4.11.0-39713716aa

Call stack: at store_Store.getIndexOfElementID (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:22245:24)

at getCurrentValue (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29244:29)

at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25898:23

at Yh (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13305:36)

at Zh (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13343:53)

at Object.useState (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13795:12)

at exports.useState (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:5320:20)

at useSubscription (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25871:54)

at SelectedTreeHighlight_SelectedTreeHighlight (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29268:16)

at Rh (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13245:7)

Component stack: at SelectedTreeHighlight_SelectedTreeHighlight (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29213:34)

at div

at InnerElementType (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29953:3)

at div

at List (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:23588:30)

at div

at AutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:3111:5)

at div

at div

at Tree_Tree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29531:47)

at div

at div

at OwnersListContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:28680:3)

at SettingsModalContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29121:3)

at Components_Components (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:34645:52)

at ErrorBoundary_ErrorBoundary (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30035:5)

at PortaledContent (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30157:5)

at div

at div

at ProfilerContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:34264:3)

at TreeContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25356:3)

at SettingsContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25963:3)

at ModalDialogContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30300:3)

at DevTools_DevTools (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:37639:3)