From 4e6bdc168854d6bb540638ef66cb2fc0273efb21 Mon Sep 17 00:00:00 2001 From: Viktor Scharf Date: Tue, 19 Dec 2023 23:28:52 +0100 Subject: [PATCH] apiTest. set recipient type in body --- tests/TestHelpers/GraphHelper.php | 6 +++++- tests/acceptance/features/bootstrap/SharingNgContext.php | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/TestHelpers/GraphHelper.php b/tests/TestHelpers/GraphHelper.php index 192a36d7e2..cd35e0ecd9 100644 --- a/tests/TestHelpers/GraphHelper.php +++ b/tests/TestHelpers/GraphHelper.php @@ -1579,7 +1579,8 @@ class GraphHelper { * @param string $spaceId * @param string $itemId * @param string $shareeId - * @param string|null $role + * @param string $shareType + * @param string|null $role * * @return ResponseInterface * @throws \JsonException @@ -1592,12 +1593,15 @@ class GraphHelper { string $spaceId, string $itemId, string $shareeId, + string $shareType, ?string $role ): ResponseInterface { $url = self::getBetaFullUrl($baseUrl, "drives/$spaceId/items/$itemId/invite"); $body = []; $recipients['objectId'] = $shareeId; + $recipients['@libre.graph.recipient.type'] = $shareType; + $body['recipients'] = [$recipients]; if ($role !== null) { diff --git a/tests/acceptance/features/bootstrap/SharingNgContext.php b/tests/acceptance/features/bootstrap/SharingNgContext.php index 8ab05cfb87..eb92be9a44 100644 --- a/tests/acceptance/features/bootstrap/SharingNgContext.php +++ b/tests/acceptance/features/bootstrap/SharingNgContext.php @@ -112,6 +112,7 @@ class SharingNgContext implements Context { $spaceId, $itemId, $shareeId, + $rows['shareType'], $rows['role'] ) );