Open
Description
I've ran into this problem when changing from mount to shallowMount(). The latter also strips out attributes ie
<input data-test="old-password" />
data-test is stripped.
When using the renderStubDefaultSlot option like this:
const wrapper = shallowMount(YourComponent, {
props: {
title: 'Hello world',
},
global: {renderStubDefaultSlot: true},
});
The attribute can be found using attribute, find or get.
When using the option renderStubDefaultSlot: true it will restore attributes as well. But this isn't documented in the api reference. It's very unintuitive that it affects attributes in my opinion, I'd think it would only affect tags. A mention what it restores in the wrapper should be added here:
https://test-utils.vuejs.org/api/