Add tests
This commit is contained in:
parent
ae36a79f8c
commit
9bac192cf9
|
@ -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,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue