fix: (Hotfix)any group of rules in routing (#17869)
This commit is contained in:
1 parent
471f5bd7eb
commit
afd730e1c8
2 files changed
+15
No files matched your search
@@ -247,4 +247,17 @@ describe("queryValueValidationSchema", () => {
|
||||
});
|
||||
expect(result.success).toBe(false);
|
||||
});
|
||||
|
||||
it("should allow properties in the query that has rule grouping details", () => {
|
||||
const result = raqbQueryValueSchema.parse({
|
||||
id: "8",
|
||||
type: "group",
|
||||
properties: {
|
||||
not: false,
|
||||
conjunction: "OR",
|
||||
},
|
||||
});
|
||||
expect(result.properties.not).toBe(false);
|
||||
expect(result.properties.conjunction).toBe("OR");
|
||||
});
|
||||
});
|
||||
@@ -88,11 +88,13 @@ export const raqbQueryValueSchema = z.union([
|
||||
id: z.string().optional(),
|
||||
type: z.literal("group"),
|
||||
children1: raqbChildren1Schema.optional(),
|
||||
properties: z.any(),
|
||||
}),
|
||||
z.object({
|
||||
id: z.string().optional(),
|
||||
type: z.literal("switch_group"),
|
||||
children1: raqbChildren1Schema.optional(),
|
||||
properties: z.any(),
|
||||
}),
|
||||
]);
|
||||
|
||||
|
||||
Reference in new issue
Block a user