catalog-backend: relations working e2e
Co-authored-by: blam <ben@blam.sh>
This commit is contained in:
@@ -32,21 +32,21 @@ const schema = yup.object<Partial<GroupEntityV1alpha1>>({
|
||||
// one element and there is no simple workaround -_-
|
||||
// the cast is there to convince typescript that the array itself is
|
||||
// required without using .required()
|
||||
ancestors: yup.array(yup.string().required()).test({
|
||||
name: 'isDefined',
|
||||
message: 'ancestors must be defined',
|
||||
test: v => Boolean(v),
|
||||
}) as yup.ArraySchema<string, object>,
|
||||
children: yup.array(yup.string().required()).test({
|
||||
name: 'isDefined',
|
||||
message: 'children must be defined',
|
||||
test: v => Boolean(v),
|
||||
}) as yup.ArraySchema<string, object>,
|
||||
descendants: yup.array(yup.string().required()).test({
|
||||
name: 'isDefined',
|
||||
message: 'descendants must be defined',
|
||||
test: v => Boolean(v),
|
||||
}) as yup.ArraySchema<string, object>,
|
||||
// ancestors: yup.array(yup.string().required()).test({
|
||||
// name: 'isDefined',
|
||||
// message: 'ancestors must be defined',
|
||||
// test: v => Boolean(v),
|
||||
// }) as yup.ArraySchema<string, object>,
|
||||
// children: yup.array(yup.string().required()).test({
|
||||
// name: 'isDefined',
|
||||
// message: 'children must be defined',
|
||||
// test: v => Boolean(v),
|
||||
// }) as yup.ArraySchema<string, object>,
|
||||
// descendants: yup.array(yup.string().required()).test({
|
||||
// name: 'isDefined',
|
||||
// message: 'descendants must be defined',
|
||||
// test: v => Boolean(v),
|
||||
// }) as yup.ArraySchema<string, object>,
|
||||
})
|
||||
.required(),
|
||||
});
|
||||
|
||||
@@ -37,11 +37,11 @@ const schema = yup.object<Partial<UserEntityV1alpha1>>({
|
||||
// element and there is no simple workaround -_-
|
||||
// the cast is there to convince typescript that the array itself is
|
||||
// required without using .required()
|
||||
memberOf: yup.array(yup.string().required()).test({
|
||||
name: 'isDefined',
|
||||
message: 'memberOf must be defined',
|
||||
test: v => Boolean(v),
|
||||
}) as yup.ArraySchema<string, object>,
|
||||
// memberOf: yup.array(yup.string().required()).test({
|
||||
// name: 'isDefined',
|
||||
// message: 'memberOf must be defined',
|
||||
// test: v => Boolean(v),
|
||||
// }) as yup.ArraySchema<string, object>,
|
||||
})
|
||||
.required(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user