Run tests for lucene as well

This commit is contained in:
Adria Navarro 2024-08-21 13:40:17 +02:00
parent 8c3f1c39c8
commit 7c06f1a407
1 changed files with 93 additions and 97 deletions

View File

@ -1492,7 +1492,6 @@ describe.each([
) )
}) })
!isLucene &&
it("can query on top of the view filters", async () => { it("can query on top of the view filters", async () => {
await config.api.row.save(table._id!, { await config.api.row.save(table._id!, {
one: "foo", one: "foo",
@ -1513,21 +1512,21 @@ describe.each([
query: [ query: [
{ {
operator: BasicOperator.NOT_EQUAL, operator: BasicOperator.NOT_EQUAL,
field: "two", field: "one",
value: "bar2", value: "foo2",
}, },
], ],
schema: { schema: {
id: { visible: true }, id: { visible: true },
one: { visible: false }, one: { visible: true },
two: { visible: true }, two: { visible: true },
}, },
}) })
const response = await config.api.viewV2.search(view.id, { const response = await config.api.viewV2.search(view.id, {
query: { query: {
[BasicOperator.NOT_EQUAL]: { [BasicOperator.EQUAL]: {
two: "bar", two: "bar3",
}, },
[BasicOperator.NOT_EMPTY]: { [BasicOperator.NOT_EMPTY]: {
two: null, two: null,
@ -1536,13 +1535,10 @@ describe.each([
}) })
expect(response.rows).toHaveLength(1) expect(response.rows).toHaveLength(1)
expect(response.rows).toEqual( expect(response.rows).toEqual(
expect.arrayContaining([ expect.arrayContaining([expect.objectContaining({ _id: three._id })])
expect.objectContaining({ _id: three._id }),
])
) )
}) })
!isLucene &&
it("can query on top of the view filters (using or filters)", async () => { it("can query on top of the view filters (using or filters)", async () => {
const one = await config.api.row.save(table._id!, { const one = await config.api.row.save(table._id!, {
one: "foo", one: "foo",