From 2c3ab48c9f2eb856d391afd45974db9d84e2c0f9 Mon Sep 17 00:00:00 2001 From: "Maria.Golomb" Date: Wed, 2 Oct 2024 15:46:12 +0200 Subject: [PATCH] FIO-9086: autotests --- src/process/validation/__tests__/Validator.test.ts | 3 ++- src/process/validation/__tests__/fixtures/forms.ts | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/process/validation/__tests__/Validator.test.ts b/src/process/validation/__tests__/Validator.test.ts index 0f9331ff..35810ae6 100644 --- a/src/process/validation/__tests__/Validator.test.ts +++ b/src/process/validation/__tests__/Validator.test.ts @@ -15,6 +15,7 @@ it('Validator will throw the correct errors given a flat components array', asyn email: 'brendanb', url: 'htpigoogle', inputMask: 'hello, world', + time: ['12:00:00', '11:00'], // one of the values is provided in incorrect format (format instead dataFormat) submit: false, }; for (let component of simpleForm.components) { @@ -34,5 +35,5 @@ it('Validator will throw the correct errors given a flat components array', asyn errors = [...errors, ...scope.errors.map((error) => error.errorKeyOrMessage)]; } } - expect(errors).to.have.length(6); + expect(errors).to.have.length(7); }); diff --git a/src/process/validation/__tests__/fixtures/forms.ts b/src/process/validation/__tests__/fixtures/forms.ts index e6a72e0e..37717dcc 100644 --- a/src/process/validation/__tests__/fixtures/forms.ts +++ b/src/process/validation/__tests__/fixtures/forms.ts @@ -2290,6 +2290,15 @@ export const simpleForm = { id: 'e8vls3a', keyModified: true, }, + { + label: 'Time', + type: 'time', + key: 'time', + input: true, + dataFormat: 'HH:mm:ss', + format: 'HH:mm', + multiple: true, + }, { type: 'button', label: 'Submit', @@ -2297,7 +2306,7 @@ export const simpleForm = { disableOnInvalid: true, input: true, tableView: false, - }, + } ], settings: {}, properties: {},