[Bug Report][3.2.1] testing-library can't interact with vuetify components #17296
-
EnvironmentVuetify Version: 3.2.1 Steps to reproducerun unit tests: Expected BehavioruserEvent or fireEvent to really type in inputs Actual Behaviorevents does not cause any change on vuetify components Reproduction Linkhttps://github.com/lucaspagliari/vuetify-testing-library Other commentsThis is my first time using vuetify with testing-library and vitest, if I missed something please let me know |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
When you do |
Beta Was this translation helpful? Give feedback.
When you do
screen.getByTestId('field')
you're only getting the root div of the v-text-field component. You either need to further drill down and find the<input>
, maybe with.querySelector('input')
. Or use thegetByLabelText
function, as long as you have an id attribute on the v-text-field