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

DOMWrapper: setValue #29

Closed
lmiller1990 opened this issue Mar 28, 2020 · 11 comments · Fixed by #38
Closed

DOMWrapper: setValue #29

lmiller1990 opened this issue Mar 28, 2020 · 11 comments · Fixed by #38
Labels

Comments

@lmiller1990
Copy link
Member

combines setSelected, setChecked` etc as per #17 (comment)

@lmiller1990 lmiller1990 mentioned this issue Mar 28, 2020
18 tasks
@dobromir-hristov
Copy link
Contributor

Should we use this issue to track the removal of set methods from Vue Wrapper and the combination of setSelected and setChecked?

@lmiller1990
Copy link
Member Author

lmiller1990 commented Mar 29, 2020

Yep, I think that makes sense.

This should be a fun ticket. We could copy paste the tests from beta (that's what I did for setChecked). Some small updates are needed (eg now we can do await setValue).

@afontcu
Copy link
Member

afontcu commented Mar 30, 2020

I'd like to work on this! Even though I might need some guidance 😇So, in short, I should:

  1. Rename current setChecked to setValue, and make sure current tests keep passing (after updating the public API, of course).

  2. copy&paste setSelected tests from VTU, adapt them, and make them pass with setValue.

After that (could be another PR, and could be done after alpha-0), it should be extended to handle VueWrapper elements.

Am I in the right track?

@dobromir-hristov
Copy link
Contributor

oh dang I am on it atm... Want me to push and you continue or just drop mine?

@afontcu
Copy link
Member

afontcu commented Mar 30, 2020

oh no worries, keep on working on it :) will be busy for the next hour or so. I guess at some point we can split work and submit separate PRs 🤗

@dobromir-hristov
Copy link
Contributor

Yes! I will have to go in exactly 1h :)

@lmiller1990
Copy link
Member Author

The way I was expecting this to go is we keep setChecked etc, but make them private. Then setValue just checks the type of the element, and calls the correct one. But any implementation is fine. I think we should copy paste the tests for setChecked, setSelected etc where we can from beta.

@dobromir-hristov
Copy link
Contributor

I was going to do that, but then I just left it as is, so you guys can comment on it.

There were quite extensive tests on those methods, not sure if I should put them in the setValue spec or not.

@lmiller1990
Copy link
Member Author

Just the ones you think are relevant!

@dospunk
Copy link

dospunk commented Aug 17, 2021

This does not seem to be documented on the Migrating page https://next.vue-test-utils.vuejs.org/migration/

@lmiller1990
Copy link
Member Author

This should have been backported to VTU v1 and include deprecation messages. Is that not the case?

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

Successfully merging a pull request may close this issue.

4 participants