setValue() is not work well
See original GitHub issueSubject of the issue
Describe your issue here.
it("should bind value to input by v-model", async () => {
const textInput = wrapper.find('input[type="text"]');
await textInput.setValue("some value");
expect(textInput.element.innerHTML).toBe("some value");
});
Steps to reproduce
- run the test
- throw the error message to console shows:
Tell us how to reproduce this issue. Please provide a working and simplified example.
Expected behaviour
pass the test What should happen?
Actual behaviour
throw error as you can see What happens instead?
Possible Solution
maybe the API is deprecated but the official doc is not updated, all of above is from doc example What are the alternative solutions? Please describe what else you have considered?
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
'setValue' method is not working in Angular application
Try this.extrudedHeightForm.get('extrudedHeight').setValue(data['extrudedHeight']);. You should set value on FormControl, not on FormGroup.
Read more >SetValue("") sometimes doesn't work properly with some ...
The problem Following code: $().setValue(""); should clear the input field as if the user has cleared the value. But in some cases validator ......
Read more >Solved: SetValue not working - ServiceNow Community
Solved: Hello, I'm trying to create a script that can run early in the morning to set all of the assets that are...
Read more >Issue with apex.item().setValue(); not working — oracle-tech
The value of the item can be set by executing apex.item("P226_TOTAL_BORDEREAU").setValue("99") in an Execute JavaScript Code DA, but this API ...
Read more >Performance issues with setValue() - Retool Forum
However, I did not not notice a performance issue before changing to setValue(), so I don't know. If you are certain that using...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think the issue is not with
setValue
here? We use it in pretty much all our Vue 3 projects with latest VTU and we have no issue, but we don’t use TSX.I’m not even sure the TSX support for Vue 3 in the Vue CLI is ready. Are you using ButtonTSX somewhere in your application? Does it work without error at runtime? I wouldn’t be surprised if that was throwing the same error at runtime.
Do we even have a problem? It looks like this was resolved and closed.
If you have a problem with
setValue
, please open a new issue with your reproduction. Thanks!