From b00e7b804a6aee2ae3497de42b13d184a0f3fba1 Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 2 May 2025 09:32:29 +0530 Subject: [PATCH] revert: tests. --- .../e2e/Services/Databases/DatabasesBase.php | 39 +++---------------- 1 file changed, 5 insertions(+), 34 deletions(-) diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index 7128e4fc00..0c7e1d386e 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -4179,12 +4179,7 @@ trait DatabasesBase $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $personCollection . '/documents/' . $person2['body']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'queries' => [ - // explicitly select the nested document - Query::select(['libraries.*'])->toString() - ] - ]); + ], $this->getHeaders())); $this->assertEquals(200, $response['headers']['status-code']); $this->assertArrayNotHasKey('$collection', $response['body']); @@ -4194,12 +4189,7 @@ trait DatabasesBase $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $libraryCollection . '/documents/library11', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'queries' => [ - // explicitly select the nested document - Query::select(['person_one_to_many.$id'])->toString() - ] - ]); + ], $this->getHeaders())); $this->assertEquals(200, $response['headers']['status-code']); $this->assertArrayHasKey('person_one_to_many', $response['body']); @@ -4349,37 +4339,19 @@ trait DatabasesBase $album = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $albums['body']['$id'] . '/documents/album1', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'queries' => [ - Query::select([ - '$id', - 'name', - '$permissions', - // explicitly select the nested document - 'artist.$id', - 'artist.name', - 'artist.$permissions' - ])->toString() - ] - ]); + ], $this->getHeaders())); $this->assertEquals(200, $album['headers']['status-code']); $this->assertEquals('album1', $album['body']['$id']); $this->assertEquals('Album 1', $album['body']['name']); - $this->assertEquals($permissions, $album['body']['$permissions']); $this->assertEquals('Artist 1', $album['body']['artist']['name']); + $this->assertEquals($permissions, $album['body']['$permissions']); $this->assertEquals($permissions, $album['body']['artist']['$permissions']); $artist = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $artists['body']['$id'] . '/documents/' . $album['body']['artist']['$id'], array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'queries' => [ - // explicitly select the nested document - // Query::select(['albums'])->toString() - // TODO: using query on this side doesn't return the related doc as its not found - ] - ]); + ], $this->getHeaders())); $this->assertEquals(200, $artist['headers']['status-code']); $this->assertEquals('Artist 1', $artist['body']['name']); @@ -4561,7 +4533,6 @@ trait DatabasesBase 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'queries' => [ - Query::select(['libraries.*'])->toString(), Query::isNotNull('$id')->toString(), Query::startsWith('fullName', 'Stevie')->toString(), Query::endsWith('fullName', 'Wonder')->toString(),