Add failing test
This commit is contained in:
parent
15f2aaf950
commit
b538125d1f
|
@ -55,7 +55,7 @@ if (descriptions.length) {
|
|||
let datasource: Datasource | undefined
|
||||
|
||||
function saveTableRequest(
|
||||
...overrides: Partial<Omit<SaveTableRequest, "name">>[]
|
||||
...overrides: Partial<SaveTableRequest>[]
|
||||
): SaveTableRequest {
|
||||
const req: SaveTableRequest = {
|
||||
name: generator.guid().replaceAll("-", "").substring(0, 16),
|
||||
|
@ -1898,6 +1898,36 @@ if (descriptions.length) {
|
|||
}
|
||||
expect(view.queryUI).toEqual(expected)
|
||||
})
|
||||
|
||||
it("tables and views can contain whitespaces", async () => {
|
||||
const table = await config.api.table.save(
|
||||
saveTableRequest({
|
||||
name: "table with spaces",
|
||||
schema: {
|
||||
name: {
|
||||
type: FieldType.STRING,
|
||||
name: "name",
|
||||
},
|
||||
},
|
||||
})
|
||||
)
|
||||
|
||||
const view = await config.api.viewV2.create({
|
||||
tableId: table._id!,
|
||||
name: `view name with spaces`,
|
||||
schema: {
|
||||
name: { visible: true },
|
||||
},
|
||||
})
|
||||
|
||||
expect(await getDelegate(view)).toEqual({
|
||||
...view,
|
||||
schema: {
|
||||
id: { ...table.schema["id"], visible: false },
|
||||
name: { ...table.schema["name"], visible: true },
|
||||
},
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe("updating table schema", () => {
|
||||
|
|
Loading…
Reference in New Issue