test: add unit tests for TimeField and DateField components#11
Merged
Conversation
42 tests covering config (label, input type, required, disabled), values (initial display, external update, user change via @change event), and validation (required/empty, null, disabled override, data-error attribute). Note: tests use element.value + trigger('change') instead of setValue() because Vue re-renders between the synthetic input/change events in setValue and resets the bound :value, preventing the component from reading the new value. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 task
knep
pushed a commit
that referenced
this pull request
May 29, 2026
Upgrades the web frontend from Vue 2 (Vue CLI + Webpack + Karma) to Vue 3 with Vite and Vitest. Integrates cleanly with PRs #11–#13 already on master (the new DateField/TimeField unit tests were migrated to Vitest as part of this merge). - Vue 3: v-model refactor, emits, lifecycle renames, Proxy reactivity (no more Vue.set/$set/$delete), :deep() selectors, Vue Router 4 + Vuex 4 - Vite build (assets in web/assets/; server web-build check updated) - Vitest + jsdom: 821 passing, 54 browser-only skips - Runtime bugs fixed: ace file-loader, v-if/v-for same element, reactive-Proxy identity (file dialog), array delete (param list), stale value-prop bindings (ScriptConfigForm, TimeField, DateField labels) - Removed vue.config.js / babel.config.js / Karma entry; CI cleanup - Verified in-browser: main + admin apps render with zero console errors Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TimeField.vue(the newtimeparameter type added in PR feat: addtimeparameter type and HTTP security headers #1)DateField.vue(thedateparameter type added previously)Test coverage
data-errorattributeImplementation note
Tests use
element.value = '...' + trigger('change')instead of Vue Test UtilssetValue(). This is becausesetValuetriggers a syntheticinputevent first (which causes Vue to re-render and reset:valueback to the prop), then triggerschange— so the component reads the old value. Settingelement.valuedirectly beforetrigger('change')avoids this re-render race.🤖 Generated with Claude Code