Add extra test (failing)

This commit is contained in:
Adria Navarro 2024-08-28 14:11:02 +02:00
parent d404d60c32
commit 0dba593bdb
1 changed files with 29 additions and 0 deletions

View File

@ -1009,6 +1009,35 @@ describe.each([
}, },
}) })
}) })
it("does not include columns hidden from the table", async () => {
const view = await config.api.viewV2.create({
tableId,
name: generator.guid(),
schema: {
id: { visible: true },
one: { visible: true },
two: { visible: true },
},
})
const table = await config.api.table.get(tableId)
await config.api.table.save({
...table,
schema: {
...table.schema,
two: { ...table.schema["two"], visible: false },
},
})
expect(await getDelegate(view)).toEqual({
...view,
schema: {
id: { ...table.schema["id"], visible: true },
one: { ...table.schema["one"], visible: true },
three: { ...table.schema["three"], visible: false },
},
})
})
}) })
describe("fetch view (through table)", () => { describe("fetch view (through table)", () => {