Skip to content

Improve document for setChecked(), setSelected() and setValue() #700

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

Closed
38elements opened this issue Jun 10, 2018 · 2 comments
Closed

Improve document for setChecked(), setSelected() and setValue() #700

38elements opened this issue Jun 10, 2018 · 2 comments

Comments

@38elements
Copy link
Contributor

Version

1.0.0-beta.18

Reproduction link

https://github.com/vuejs/vue-test-utils/tree/dev/docs

Steps to reproduce

Please See below links.

https://github.com/vuejs/vue-test-utils/blob/6dcfc4f5e88acc5aad903f5e2de619aa2bdb5ff0/docs/api/wrapper/setChecked.md

https://github.com/vuejs/vue-test-utils/blob/6dcfc4f5e88acc5aad903f5e2de619aa2bdb5ff0/docs/api/wrapper/setSelected.md

https://github.com/vuejs/vue-test-utils/blob/6dcfc4f5e88acc5aad903f5e2de619aa2bdb5ff0/docs/api/wrapper/setValue.md

What is expected?

There are descriptions of reason why the functions is necessary in the document for setChecked(), setSelected() and setValue().

What is actually happening?

The document for setChecked(), setSelected() and setValue() lacks the important points.
The important point is why the functions is necessary.
There was a problem which is not updating by v-model.
#260 (comment)
setChecked(), setSelected() and setValue() are added to resolve it.
I think the description of the problem should be added to the document for them.

@lmiller1990
Copy link
Member

I personally don't see it as necessary to explain why it's needed - the idea of providing the helper functions is so that users don't need to understand the internals, and can focus on testing their components.

Although we could add something like:

"this is required to ensure v-model is correctly updated".

Another alternative would be adding a guide, perhaps called "Testing forms". It could show some common examples. The docs for setValue etc could then have a note linking to the guide.

@38elements
Copy link
Contributor Author

I did not mentioned "It is necessary to account internal.".
You does not need to resolve this issue.
Other person will resolve it.

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

No branches or pull requests

3 participants