diff --git a/tests/e2e/Services/GraphQL/AccountTest.php b/tests/e2e/Services/GraphQL/AccountTest.php index 9dd224f1a1..76f98ce02f 100644 --- a/tests/e2e/Services/GraphQL/AccountTest.php +++ b/tests/e2e/Services/GraphQL/AccountTest.php @@ -116,7 +116,6 @@ class AccountTest extends Scope } /** - * @depends testUpdateAccountPhone * @return array * @throws \Exception */ @@ -124,6 +123,21 @@ class AccountTest extends Scope { $projectId = $this->getProject()['$id']; + // Ensure phone is set up for this test to be self-contained + $phoneQuery = $this->getQuery(self::UPDATE_ACCOUNT_PHONE); + $phonePayload = [ + 'query' => $phoneQuery, + 'variables' => [ + 'phone' => '+123456789', + 'password' => 'password', + ] + ]; + + $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + ], $this->getHeaders()), $phonePayload); + $query = $this->getQuery(self::CREATE_PHONE_VERIFICATION); $graphQLPayload = [ 'query' => $query,