Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Deep snapshots have ForwardRef instead of component names #95

Closed
1 task done
bcmn opened this issue Dec 4, 2018 · 1 comment
Closed
1 task done

Deep snapshots have ForwardRef instead of component names #95

bcmn opened this issue Dec 4, 2018 · 1 comment
Labels
blocked This issue should not be worked on until another internal issue is completed - see desc for details bug Something isn't working Refinement Needed This is ready for refinement. It shouldn't be worked on until it has been refined by Dev & Test.
Projects

Comments

@bcmn
Copy link
Contributor

bcmn commented Dec 4, 2018

Describe the bug
When using deep rendering with styled-components V4, snapshot references to other React components are replaced with <ForwardRef />. An example of this is visible in the original Simorgh PR for styled-components V4.

Luckily, as most Psammead components are currently only composed to a depth of 1, this isn't yet visible in this repo. However, it will become an issue as we introduce more complex or nested components.

Possible Solutions/Approaches
This issue is caused by our dependency jest-styled-components. If we stick with using jest-styled-components alone, we will have to await or contribute to their resolution of this issue. They have a ticket on it here. We could potentially contribute to the PRs that spawn out of it if we considered it a high priority.

Alternatively, if we are evaluating using Enzyme or react-testing-library alongside jest-styled-components, one of the benefits from either of these moves would be that this would no longer be an issue.

  • Initially labelled with "bug"
@bcmn bcmn added bug Something isn't working Refinement Needed This is ready for refinement. It shouldn't be worked on until it has been refined by Dev & Test. labels Dec 4, 2018
@bcmn bcmn added this to To do in Articles via automation Dec 4, 2018
@ChrisBAshton ChrisBAshton added the blocked This issue should not be worked on until another internal issue is completed - see desc for details label Dec 11, 2018
@ChrisBAshton ChrisBAshton removed this from To do in Articles Jan 7, 2019
@ChrisBAshton ChrisBAshton added this to To do in Simorgh via automation Jan 7, 2019
@ChrisBAshton
Copy link
Contributor

Superseded by #273.

Simorgh automation moved this from To do to Done Mar 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked This issue should not be worked on until another internal issue is completed - see desc for details bug Something isn't working Refinement Needed This is ready for refinement. It shouldn't be worked on until it has been refined by Dev & Test.
Projects
No open projects
Development

No branches or pull requests

2 participants