Make UserTable tests pass #12664
Labels
help wanted
Open source contributors welcome
TAG: regression
Something that previously worked
TAG: unit tests
Add or update tests
Milestone
Observed behavior
See #12662 - you will need to change the tests which are ignored there using the
xit()
function to useit
and test the same cases.I did not find it easy to work out how to fix the tests without rewriting them. The way I understand it, the behavior being tested is actually behavior that is defined in a parent component.
That is to say,
UserTable
is setup to accommodate thev-model
- so it's ownthis.value
prop indicates what ids are selected. Then, when a checkbox is clicked, we emit theinput
event with a payload of whatthis.value
should be after the checkbox was clicked.The parent then will update whichever of its own local values it is passing to the
UserTable
v-model
and can use it elsewhere.These tests directly mount
UserTable
- so I think that the issue is to do with the fact that there is no parent component mounted w/ UserTable that is reacting to thev-model
relationship. So, in these tests,UserTable
is emitting events into the aether.Expected behavior
Tests in UserTable spec should not be ignored.
User-facing consequences
n/a
Context
develop
The text was updated successfully, but these errors were encountered: