From 453c1928ee5345c25829caf584455e56997fad0d Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Mon, 11 Dec 2023 20:56:59 +0000 Subject: [PATCH] fix: teams tests --- app/config/roles.php | 2 +- tests/e2e/Scopes/ProjectCustom.php | 3 ++- tests/e2e/Services/Teams/TeamsBaseClient.php | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/config/roles.php b/app/config/roles.php index 9b43543026..e4c06cda0f 100644 --- a/app/config/roles.php +++ b/app/config/roles.php @@ -99,6 +99,6 @@ return [ ], Auth::USER_ROLE_APPS => [ 'label' => 'Applications', - 'scopes' => ['global', 'sessions', 'health.read', 'graphql'], + 'scopes' => ['global', 'health.read', 'graphql'], ], ]; diff --git a/tests/e2e/Scopes/ProjectCustom.php b/tests/e2e/Scopes/ProjectCustom.php index 5f7bf85d0e..0f38b4ca71 100644 --- a/tests/e2e/Scopes/ProjectCustom.php +++ b/tests/e2e/Scopes/ProjectCustom.php @@ -82,7 +82,8 @@ trait ProjectCustom 'avatars.read', 'health.read', 'rules.read', - 'rules.write' + 'rules.write', + 'sessions' ], ]); diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php index 2c2ff02c41..8fa1f973d0 100644 --- a/tests/e2e/Services/Teams/TeamsBaseClient.php +++ b/tests/e2e/Services/Teams/TeamsBaseClient.php @@ -223,10 +223,10 @@ trait TeamsBaseClient */ $secondEmail = uniqid() . 'foe@localhost.test'; $secondName = 'Another Foe'; - $response = $this->client->call(Client::METHOD_POST, '/account', array_merge([ + $response = $this->client->call(Client::METHOD_POST, '/account', [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ + ], [ 'userId' => 'unique()', 'email' => $secondEmail, 'password' => 'password',