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
Copy file name to clipboardExpand all lines: packages/react-form-renderer/src/tests/parsers/__snapshots__/default-schema-validator.test.js.snap
+56Lines changed: 56 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -117,6 +117,48 @@ exports[`Default schema validator should fail if input object does fields names
117
117
118
118
exports[`Default schema validator should fail if input object does not have fields names 1`] =`"Component of type schema must contain \\"fields\\" property of type array, received undefined!"`;
119
119
120
+
exports[`Default schema validator should fail validation when sequence is not array 1`] =`
121
+
"
122
+
Error occured in field definition with \\"name\\" property: \\"foo\\".
123
+
'sequence' property in a field condition must be an array! Received: object.
124
+
"
125
+
`;
126
+
127
+
exports[`Default schema validator should fail validation when sequence is not root condition 1`] =`
128
+
"
129
+
Error occured in field definition with \\"name\\" property: \\"foo\\".
130
+
'sequence' condition has to be the root condition: \\" condition: {sequence: [ ... ]}\\"
131
+
"
132
+
`;
133
+
134
+
exports[`Default schema validator should fail validation when set is not object 1`] =`
135
+
"
136
+
Error occured in field definition with \\"name\\" property: \\"foo\\".
137
+
'set' property in action \\"then\\" has to be a object! Received: undefined, isArray: false.
138
+
"
139
+
`;
140
+
141
+
exports[`Default schema validator should fail validation when set is not object 2`] =`
142
+
"
143
+
Error occured in field definition with \\"name\\" property: \\"foo\\".
144
+
'set' property in action \\"then\\" has to be a object! Received: undefined, isArray: true.
145
+
"
146
+
`;
147
+
148
+
exports[`Default schema validator should fail validation when then/else is not in root condition 1`] =`
149
+
"
150
+
Error occured in field definition with \\"name\\" property: \\"foo\\".
151
+
'then', 'else' condition keys can be included only in root conditions or in a 'sequence'.
152
+
"
153
+
`;
154
+
155
+
exports[`Default schema validator should fail validation when then/else is not in root condition 2`] =`
156
+
"
157
+
Error occured in field definition with \\"name\\" property: \\"foo\\".
158
+
'then', 'else' condition keys can be included only in root conditions or in a 'sequence'.
159
+
"
160
+
`;
161
+
120
162
exports[`Default schema validator should fail validation when using "and" and "or" conditions 1`] =`
121
163
"
122
164
Error occured in field definition with \\"name\\" property: \\"foo\\".
@@ -151,3 +193,17 @@ exports[`Default schema validator should fail validation when using wrong data t
151
193
Unknow dataType. Data type must be string
152
194
"
153
195
`;
196
+
197
+
exports[`Default schema validator should fail validation when visible is not boolean 1`] =`
198
+
"
199
+
Error occured in field definition with \\"name\\" property: \\"foo\\".
200
+
'visible' property in action \\"then\\" has to be a boolean value! Received: string.
201
+
"
202
+
`;
203
+
204
+
exports[`Default schema validator should fail validation when visible is not boolean 2`] =`
205
+
"
206
+
Error occured in field definition with \\"name\\" property: \\"foo\\".
207
+
'visible' property in action \\"else\\" has to be a boolean value! Received: string.
0 commit comments