Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Add displayName to ActivityIndicator #22417

Conversation

miblanchard
Copy link

@miblanchard miblanchard commented Nov 26, 2018

Summary:
Similar to #21950, this adds displayName to ActivityIndicator, so it displays the correct component name in snapshots instead of Component.

Fixes #21937 (a little bit more than it was already fixed).

Test Plan:

yarn test - ActivityIndicator's - ActivityIndicator-test.js.snap should Show

Changelog/Release Notes:

[General] [Fixed] - Add displayName to ActivityIndicator for snapshots

…ying 'Component' instead of 'ActivityIndicator'
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 26, 2018
@elicwhite
Copy link
Member

Thanks for the fix!

As you mentioned there aren't any tests that caught this. Would you like to try adding a simple jest test for ActivityIndicator that uses a snapshot test that would keep this problem from happening again?

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Nov 26, 2018
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TheSavior is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@miblanchard
Copy link
Author

@TheSavior I added a basic Snapshot for ActivityIndicator that should catch regressions on this!

@elicwhite
Copy link
Member

Awesome, thanks!

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TheSavior is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

Michael Blanchard merged commit 53da585 into facebook:master.

@facebook facebook locked as resolved and limited conversation to collaborators Nov 27, 2018
@react-native-bot react-native-bot added the Merged This PR has been merged. label Nov 27, 2018
@miblanchard miblanchard deleted the ActivityIndicator/fix-display-name branch November 27, 2018 15:44
grabbou pushed a commit that referenced this pull request Dec 4, 2018
Summary:
Similar to #21950, this adds displayName to `ActivityIndicator`, so it displays the correct component name in snapshots instead of `Component`.

Fixes #21937 (a little bit more than it was already fixed).
Pull Request resolved: #22417

Differential Revision: D13205376

Pulled By: TheSavior

fbshipit-source-id: 21e71d4980d159a1f33d32d83346b48257ec21d4
kelset pushed a commit that referenced this pull request Dec 12, 2018
Summary:
Similar to #21950, this adds displayName to `ActivityIndicator`, so it displays the correct component name in snapshots instead of `Component`.

Fixes #21937 (a little bit more than it was already fixed).
Pull Request resolved: #22417

Differential Revision: D13205376

Pulled By: TheSavior

fbshipit-source-id: 21e71d4980d159a1f33d32d83346b48257ec21d4
@hramos hramos removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 6, 2019
t-nanava pushed a commit to microsoft/react-native-macos that referenced this pull request Jun 17, 2019
Summary:
Similar to facebook#21950, this adds displayName to `ActivityIndicator`, so it displays the correct component name in snapshots instead of `Component`.

Fixes facebook#21937 (a little bit more than it was already fixed).
Pull Request resolved: facebook#22417

Differential Revision: D13205376

Pulled By: TheSavior

fbshipit-source-id: 21e71d4980d159a1f33d32d83346b48257ec21d4
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Component: ActivityIndicator Merged This PR has been merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jest/Enzyme snapshots show 'Component' instead of the native component
5 participants