Fix test for external

This commit is contained in:
Adria Navarro 2024-09-02 18:36:44 +02:00
parent 2365a6ecd5
commit ae0e3cdb59
1 changed files with 9 additions and 4 deletions

View File

@ -1199,18 +1199,25 @@ describe.each([
const table = await config.api.table.save( const table = await config.api.table.save(
saveTableRequest({ saveTableRequest({
schema: {},
})
)
await config.api.table.save({
...table,
schema: { schema: {
...table.schema,
aux: { aux: {
name: "aux", name: "aux",
relationshipType: RelationshipType.ONE_TO_MANY, relationshipType: RelationshipType.ONE_TO_MANY,
type: FieldType.LINK, type: FieldType.LINK,
tableId: auxTable._id!, tableId: auxTable._id!,
fieldName: "fk_aux", fieldName: "fk_aux",
constraints: { presence: true }, constraints: { type: "array" },
}, },
}, },
}) })
) // Refetch auxTable
auxTable = await config.api.table.get(auxTable._id!)
const view = await config.api.viewV2.create({ const view = await config.api.viewV2.create({
name: "view a", name: "view a",
@ -1226,8 +1233,6 @@ describe.each([
}, },
}) })
// Refetch autTable
auxTable = await config.api.table.get(auxTable._id!)
await config.api.table.save({ await config.api.table.save({
...auxTable, ...auxTable,
schema: { schema: {