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

Gracefully handle failures when deriving component name during mount #24344

Closed
rockindahizzy opened this issue Oct 21, 2022 · 2 comments · Fixed by #24571
Closed

Gracefully handle failures when deriving component name during mount #24344

rockindahizzy opened this issue Oct 21, 2022 · 2 comments · Fixed by #24571
Assignees
Labels
CT Issue related to component testing

Comments

@rockindahizzy
Copy link
Contributor

rockindahizzy commented Oct 21, 2022

Current Behavior

When passing a component to mount in React as an object, the mount function cannot derive the component name and throws an error. The error that is surfaced to the user does not point to the cause or solution of the scenario and is confusing for the user.

Expected Behavior

Instead of throwing the error at this stage we should verify that the component is the correct type and throw the error if that is not the case with better messaging for the user

Additional considerations

Verify that other frameworks handle this situation gracefully and address it in a similar way if this is not the case.

@rockindahizzy rockindahizzy added CT Issue related to component testing ct-core and removed stage: product backlog labels Oct 21, 2022
@baus
Copy link
Collaborator

baus commented Oct 24, 2022

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 7, 2022

The code for this is done in cypress-io/cypress#24571, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CT Issue related to component testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants