question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

setValue() is not work well

See original GitHub issue

Subject 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

  1. run the test
  2. throw the error message to console shows:
    image image

image

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:closed
  • Created 3 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
cexbrayatcommented, Dec 11, 2020

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.

0reactions
lmiller1990commented, May 11, 2021

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found