Closed
Description
Subject of the issue
We have a very simple test that makes the following assertion
it('Shows options when component is focused', async () => {
const input = wrapper.find('input');
await input.trigger('focus');
expect(wrapper.vm.hasFocus).toBe(true);
});
With @vue/test-utils@1.1.2
this assertion pass. Starting from 1.1.3 and all the way to 1.2.0 (I tested all releases in between) the wrapper.vm.hasFocus
assertion returns false
.
Steps to reproduce
Shallow mount a component that has an input, then try to focus it:
it('Shows options when component is focused', async () => {
const input = wrapper.find('input');
await input.trigger('focus');
expect(wrapper.vm.hasFocus).toBe(true);
});
Expected behaviour
What should happen?
hasFocus
should return a consistent result from v1.1.2 to v1.1.3
Actual behaviour
What happens instead?
hasFocus
now returns the opposite value without the test changing
Possible Solution
None of the changes in the release note ring a bell to me about why this may occur :(
What are the alternative solutions? Please describe what else you have considered?
Metadata
Metadata
Assignees
Labels
No labels