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

Always store selector in Wrapper created by wrapper.find(...) #1135

Closed
ghost opened this issue Feb 7, 2019 · 3 comments · Fixed by #1248
Closed

Always store selector in Wrapper created by wrapper.find(...) #1135

ghost opened this issue Feb 7, 2019 · 3 comments · Fixed by #1248

Comments

@ghost
Copy link

ghost commented Feb 7, 2019

What problem does this feature solve?

When using wrapper.find(...), the returned new wrapper only knows the selector if nothing was found. This makes it difficult to debug tests with dynamic selectors and to create custom matchers like expect(wrapper.find('.something')).toExist().

What does the proposed API look like?

Make Wrapper always have a selector property when created with .find(...)—not only ErrorWrapper (

).

@eddyerburgh
Copy link
Member

This is a great idea :)

Would you like to implement it @gitlab-winnie ?

@ghost
Copy link
Author

ghost commented Feb 7, 2019

Would you like to implement it @gitlab-winnie ?

I can't make any Promise yet but have to await my workload for the next month. Definitely interested in getting my feet wet at the Vue test utils beach though. 🏖

@winniehell
Copy link
Contributor

I started working on this in #1248.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants