epicmaxco / vuestic-ui

Free and Open Source UI Library for Vue 3 🤘
https://vuestic.dev
MIT License
3.31k stars 321 forks source link

Make stories about validation in form components #4221

Closed m0ksem closed 2 weeks ago

m0ksem commented 1 month ago

Components:

Stories:

! Make sure to test how component displayed, not if useValidation is working - we have unit test for that. We need only check visual (e.g. className, not style), dom content and aria attributes.

Notice, in this task we only need stories, component might be broken and falling test are OK.

Most of stories for one component applies to another, but I'd go with copy/paste stories instead of making some kind of wrapper for it.

Example of VaForm globall stories: packages/ui/src/components/va-form/VaForm.stories.ts - there mostly input tested, so half stories for VaInput is already here. We can copy them with few changes. Keep VaForm stories as is.