From 168996ad4191568401753d50e39a1a339e19c030 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 14 Sep 2026 10:15:46 +0100 Subject: [PATCH] test(organization): give the projects select test its own project The select test still read the shared fixture project and asserted its original name. testUpdateProject renames that same fixture project, and when both methods land in one ParaTest process the update runs first, so the list returned 'Updated Organization Project' and the assertion failed again right after #13654 merged. Create a dedicated project with a unique name inside the test so the assertion depends on nothing another test method does. Co-Authored-By: Claude --- .../e2e/Services/Organization/ProjectsBase.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tests/e2e/Services/Organization/ProjectsBase.php b/tests/e2e/Services/Organization/ProjectsBase.php index cde386bc98..1ae5cd9e82 100644 --- a/tests/e2e/Services/Organization/ProjectsBase.php +++ b/tests/e2e/Services/Organization/ProjectsBase.php @@ -463,8 +463,19 @@ trait ProjectsBase public function testListProjectsQuerySelect(): void { - $data = $this->setupOrganizationProject(); - $projectId = $data['projectId']; + $name = 'Select Organization Project ' . ID::unique(); + + $project = $this->client->call(Client::METHOD_POST, '/organization/projects', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getOrganizationHeaders()), [ + 'projectId' => ID::unique(), + 'name' => $name, + 'region' => System::getEnv('_APP_REGION', 'default'), + ]); + + $this->assertEquals(201, $project['headers']['status-code']); + $projectId = $project['body']['$id']; $response = $this->client->call(Client::METHOD_GET, '/organization/projects', array_merge([ 'content-type' => 'application/json', @@ -479,7 +490,7 @@ trait ProjectsBase $this->assertEquals(200, $response['headers']['status-code']); $this->assertCount(1, $response['body']['projects']); $this->assertSame($projectId, $response['body']['projects'][0]['$id']); - $this->assertSame('Organization Project Test', $response['body']['projects'][0]['name']); + $this->assertSame($name, $response['body']['projects'][0]['name']); $this->assertArrayNotHasKey('teamId', $response['body']['projects'][0]); } }