1
0
Fork 0
mirror of synced 2024-09-10 06:26:02 +12:00

Add tests

This commit is contained in:
Adria Navarro 2024-05-27 14:11:50 +02:00
parent ae36a79f8c
commit 9bac192cf9

View file

@ -313,8 +313,7 @@ describe.each([
it("required fields cannot be marked as readonly", async () => { it("required fields cannot be marked as readonly", async () => {
const isRequiredSpy = jest.spyOn(schemaUtils, "isRequired") const isRequiredSpy = jest.spyOn(schemaUtils, "isRequired")
isRequiredSpy.mockReturnValueOnce(true)
isRequiredSpy.mockReturnValue(true)
const table = await config.api.table.save( const table = await config.api.table.save(
saveTableRequest({ saveTableRequest({
@ -410,6 +409,10 @@ describe.each([
Category: { Category: {
visible: false, visible: false,
}, },
Price: {
visible: true,
readonly: true,
},
}, },
} }
await config.api.viewV2.update(updatedData) await config.api.viewV2.update(updatedData)
@ -426,7 +429,8 @@ describe.each([
visible: false, visible: false,
}), }),
Price: expect.objectContaining({ Price: expect.objectContaining({
visible: false, visible: true,
readonly: true,
}), }),
}, },
}, },