test: refs #8413 add validation for error color on invalid date input in VnInputDate component
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Jose Antonio Tubau 2025-04-16 15:20:45 +02:00
parent a3a6f1aa2b
commit 0e66e3362f
1 changed files with 9 additions and 0 deletions

View File

@ -59,6 +59,15 @@ describe('VnInputDate', () => {
await vm.formatDate();
expect(vm.model).toBe('2001-03-11T23:00:00.000Z');
});
it('should add errColor when invalid date is entered', async () => {
const input = wrapper.find('input');
await input.setValue('31.13-23');
await vm.$nextTick();
await vm.formatDate();
const inputStyle = input.attributes('input-style');
expect(inputStyle).not.toBe('');
});
});
describe('styleAttrs', () => {