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

vue-test-utils can not resolve PascalCase names of components #1232

Closed
Qvatra opened this issue May 13, 2019 · 1 comment · Fixed by #1398
Closed

vue-test-utils can not resolve PascalCase names of components #1232

Qvatra opened this issue May 13, 2019 · 1 comment · Fixed by #1398
Assignees

Comments

@Qvatra
Copy link

Qvatra commented May 13, 2019

Version

1.0.0-beta.29

Reproduction link

bootstrap-vue/bootstrap-vue#3270

Steps to reproduce

Access a bootstrap-vue component by name: wrapper.find({ name: 'bFormRadioGroup' }).
bootstrap-vue version v2.0.0-rc.19

What is expected?

wrapper of the element should be returned

What is actually happening?

empty wrapper is returned

[vue-test-utils]: find did not return Component, cannot call props() on empty Wrapper


Per the Vue style guide, since version 2.0.0-rc.12 bootstrap-vue team have named all components using PascalCase instead of camelCase

@lmiller1990
Copy link
Member

lmiller1990 commented Jan 6, 2020

I see two solutions for this:

  1. we automatically try matching against pascal/camel/kebab/whatever
  2. we only match against the exact name

I'm thinking (1), we should make it as easy as possible to use find. It's hard to know what the name is for third party components. Since we support the find({ name }) syntax, we should match Vue and handle both pascal case and kebab case. You would update this file.

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

Successfully merging a pull request may close this issue.

2 participants