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)
|
||||
|
||||
let enrichedQuery: SearchFilters = await utils.enrichSearchContext(
|
||||
{ ...ctx.request.body.query },
|
||||
{
|
||||
user: sdk.users.getUserContextBindings(ctx.user),
|
||||
}
|
||||
)
|
||||
|
||||
let { query } = ctx.request.body
|
||||
if (!isPlainObject(query)) {
|
||||
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 = {
|
||||
...ctx.request.body,
|
||||
|
|
|
@ -2567,7 +2567,8 @@ describe.each([
|
|||
expect(response.rows[0].productCat).toBeArrayOfSize(11)
|
||||
})
|
||||
})
|
||||
;(isSqs || isLucene) &&
|
||||
|
||||
isSql &&
|
||||
describe("relations to same table", () => {
|
||||
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 () => {
|
||||
await expectSearch({
|
||||
query: {
|
||||
|
@ -2653,7 +2653,6 @@ describe.each([
|
|||
])
|
||||
})
|
||||
|
||||
isSqs &&
|
||||
it("should be able to filter via the second relation field with not equal", async () => {
|
||||
await expectSearch({
|
||||
query: {
|
||||
|
|
Loading…
Reference in New Issue