Run tests for all
This commit is contained in:
parent
83ffee3194
commit
7266fb3c1b
|
@ -216,15 +216,15 @@ export async function search(ctx: Ctx<SearchRowRequest, SearchRowResponse>) {
|
||||||
|
|
||||||
await context.ensureSnippetContext(true)
|
await context.ensureSnippetContext(true)
|
||||||
|
|
||||||
let enrichedQuery: SearchFilters = await utils.enrichSearchContext(
|
let { query } = ctx.request.body
|
||||||
{ ...ctx.request.body.query },
|
if (!isPlainObject(query)) {
|
||||||
{
|
|
||||||
user: sdk.users.getUserContextBindings(ctx.user),
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
const allTables = await sdk.tables.getAllTables()
|
const allTables = await sdk.tables.getAllTables()
|
||||||
enrichedQuery = replaceTableNamesInFilters(tableId, enrichedQuery, allTables)
|
query = replaceTableNamesInFilters(tableId, query, allTables)
|
||||||
|
}
|
||||||
|
|
||||||
|
let enrichedQuery: SearchFilters = await utils.enrichSearchContext(query, {
|
||||||
|
user: sdk.users.getUserContextBindings(ctx.user),
|
||||||
|
})
|
||||||
|
|
||||||
const searchParams: RowSearchParams = {
|
const searchParams: RowSearchParams = {
|
||||||
...ctx.request.body,
|
...ctx.request.body,
|
||||||
|
|
|
@ -2567,7 +2567,8 @@ describe.each([
|
||||||
expect(response.rows[0].productCat).toBeArrayOfSize(11)
|
expect(response.rows[0].productCat).toBeArrayOfSize(11)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
;(isSqs || isLucene) &&
|
|
||||||
|
isSql &&
|
||||||
describe("relations to same table", () => {
|
describe("relations to same table", () => {
|
||||||
let relatedTable: string, relatedRows: Row[]
|
let relatedTable: string, relatedRows: Row[]
|
||||||
|
|
||||||
|
@ -2637,7 +2638,6 @@ describe.each([
|
||||||
])
|
])
|
||||||
})
|
})
|
||||||
|
|
||||||
isSqs &&
|
|
||||||
it("should be able to filter via the first relation field with equal", async () => {
|
it("should be able to filter via the first relation field with equal", async () => {
|
||||||
await expectSearch({
|
await expectSearch({
|
||||||
query: {
|
query: {
|
||||||
|
@ -2653,7 +2653,6 @@ describe.each([
|
||||||
])
|
])
|
||||||
})
|
})
|
||||||
|
|
||||||
isSqs &&
|
|
||||||
it("should be able to filter via the second relation field with not equal", async () => {
|
it("should be able to filter via the second relation field with not equal", async () => {
|
||||||
await expectSearch({
|
await expectSearch({
|
||||||
query: {
|
query: {
|
||||||
|
|
Loading…
Reference in New Issue