Disabling for old/in-memory search.
This commit is contained in:
parent
aab120b9ca
commit
8847a5b146
|
@ -2762,55 +2762,56 @@ describe.each([
|
|||
})
|
||||
})
|
||||
|
||||
describe("primaryDisplay", () => {
|
||||
beforeAll(async () => {
|
||||
let toRelateTable = await createTable({
|
||||
name: {
|
||||
name: "name",
|
||||
type: FieldType.STRING,
|
||||
},
|
||||
})
|
||||
table = await config.api.table.save(
|
||||
tableForDatasource(datasource, {
|
||||
schema: {
|
||||
name: {
|
||||
name: "name",
|
||||
type: FieldType.STRING,
|
||||
},
|
||||
link: {
|
||||
name: "link",
|
||||
type: FieldType.LINK,
|
||||
relationshipType: RelationshipType.MANY_TO_ONE,
|
||||
tableId: toRelateTable._id!,
|
||||
fieldName: "link",
|
||||
},
|
||||
isSql &&
|
||||
describe("primaryDisplay", () => {
|
||||
beforeAll(async () => {
|
||||
let toRelateTable = await createTable({
|
||||
name: {
|
||||
name: "name",
|
||||
type: FieldType.STRING,
|
||||
},
|
||||
})
|
||||
)
|
||||
toRelateTable = await config.api.table.get(toRelateTable._id!)
|
||||
await config.api.table.save({
|
||||
...toRelateTable,
|
||||
primaryDisplay: "link",
|
||||
table = await config.api.table.save(
|
||||
tableForDatasource(datasource, {
|
||||
schema: {
|
||||
name: {
|
||||
name: "name",
|
||||
type: FieldType.STRING,
|
||||
},
|
||||
link: {
|
||||
name: "link",
|
||||
type: FieldType.LINK,
|
||||
relationshipType: RelationshipType.MANY_TO_ONE,
|
||||
tableId: toRelateTable._id!,
|
||||
fieldName: "link",
|
||||
},
|
||||
},
|
||||
})
|
||||
)
|
||||
toRelateTable = await config.api.table.get(toRelateTable._id!)
|
||||
await config.api.table.save({
|
||||
...toRelateTable,
|
||||
primaryDisplay: "link",
|
||||
})
|
||||
const relatedRows = await Promise.all([
|
||||
config.api.row.save(toRelateTable._id!, { name: "test" }),
|
||||
])
|
||||
await Promise.all([
|
||||
config.api.row.save(table._id!, {
|
||||
name: "test",
|
||||
link: relatedRows.map(row => row._id),
|
||||
}),
|
||||
])
|
||||
})
|
||||
const relatedRows = await Promise.all([
|
||||
config.api.row.save(toRelateTable._id!, { name: "test" }),
|
||||
])
|
||||
await Promise.all([
|
||||
config.api.row.save(table._id!, {
|
||||
name: "test",
|
||||
link: relatedRows.map(row => row._id),
|
||||
}),
|
||||
])
|
||||
})
|
||||
|
||||
it("should be able to query, primary display on related table shouldn't be used", async () => {
|
||||
// this test makes sure that if a relationship has been specified as the primary display on a table
|
||||
// it is ignored and another column is used instead
|
||||
await expectQuery({}).toContain([
|
||||
{ name: "test", link: [{ primaryDisplay: "test" }] },
|
||||
])
|
||||
it("should be able to query, primary display on related table shouldn't be used", async () => {
|
||||
// this test makes sure that if a relationship has been specified as the primary display on a table
|
||||
// it is ignored and another column is used instead
|
||||
await expectQuery({}).toContain([
|
||||
{ name: "test", link: [{ primaryDisplay: "test" }] },
|
||||
])
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
!isLucene &&
|
||||
describe("$and", () => {
|
||||
|
|
Loading…
Reference in New Issue