From 83ffee31947284cf2b0bf7e7df2500ef26ce506c Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 16 Oct 2024 12:33:19 +0200 Subject: [PATCH] Fix tests --- .../src/api/routes/tests/search.spec.ts | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/packages/server/src/api/routes/tests/search.spec.ts b/packages/server/src/api/routes/tests/search.spec.ts index ece84435bf..5d778ed6d2 100644 --- a/packages/server/src/api/routes/tests/search.spec.ts +++ b/packages/server/src/api/routes/tests/search.spec.ts @@ -2614,16 +2614,6 @@ describe.each([ related1: [], related2: [], }), - config.api.row.save(tableOrViewId, { - name: "test4", - related1: [relatedRows[1]._id!], - related2: [], - }), - config.api.row.save(tableOrViewId, { - name: "test5", - related1: [], - related2: [relatedRows[1]._id!], - }), ]) }) @@ -2644,19 +2634,11 @@ describe.each([ { name: "test3", }, - { - name: "test4", - related1: [{ _id: relatedRows[1]._id }], - }, - { - name: "test5", - related2: [{ _id: relatedRows[1]._id! }], - }, ]) }) isSqs && - it("should be able to filter down to second row with equal", async () => { + it("should be able to filter via the first relation field with equal", async () => { await expectSearch({ query: { equal: { @@ -2672,11 +2654,11 @@ describe.each([ }) isSqs && - it("should be able to filter down to first row with not equal", async () => { + it("should be able to filter via the second relation field with not equal", async () => { await expectSearch({ query: { notEqual: { - ["1:related2.name"]: "bar", + ["1:related2.name"]: "foo", ["2:related2.name"]: "baz", ["3:related2.name"]: "boo", }, @@ -2684,7 +2666,6 @@ describe.each([ }).toContainExactly([ { name: "test", - related1: [{ _id: relatedRows[0]._id }], }, ]) })