You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running snapshot tests for a login form using vee-validate with shadcn-vue in a Nuxt 3 application, the validation error messages are not displayed in the snapshot. The test simulates a button click to trigger form submission, but the expected error messages do not appear in the snapshot, indicating that the validations are not being triggered or resolved (I think this the real problem) correctly during the test.
Expected Behavior:
The snapshot should contain the validation error messages after the button click triggers the form submission.
Actual Behavior:
The snapshot does not contain the validation error messages, indicating that the validations are not being triggered or resolved correctly during the test.
Additional Context:
The form validation works correctly when tested manually in the browser, but the issue only occurs during the automated tests.
Reproduction steps
Set up a Nuxt 3 project with vee-validate for form validation.
Create a login form component with vee-validate validation rules.
Write a test using vitest and @vue/test-utils to simulate a button click and capture the snapshot.
Run the test and observe that the snapshot does not contain the expected validation error messages.
I followed the documentation's instructions and included wait-for-expect to handle the rendering of error messages. However, even with this, the error messages didn't appear in the HTML.
What happened?
When running snapshot tests for a login form using vee-validate with shadcn-vue in a Nuxt 3 application, the validation error messages are not displayed in the snapshot. The test simulates a button click to trigger form submission, but the expected error messages do not appear in the snapshot, indicating that the validations are not being triggered or resolved (I think this the real problem) correctly during the test.
Expected Behavior:
The snapshot should contain the validation error messages after the button click triggers the form submission.
Actual Behavior:
The snapshot does not contain the validation error messages, indicating that the validations are not being triggered or resolved correctly during the test.
Additional Context:
The form validation works correctly when tested manually in the browser, but the issue only occurs during the automated tests.
Reproduction steps
Version
Vue.js 3.x and vee-validate 4.x
What browsers are you seeing the problem on?
Relevant log output
Demo link
testing
Code of Conduct
The text was updated successfully, but these errors were encountered: