From 225309660934d8cd5569f7435d07ea2f16a07c07 Mon Sep 17 00:00:00 2001 From: Prajwol Amatya <83579989+PrajwolAmatya@users.noreply.github.com> Date: Tue, 16 Jan 2024 09:07:59 +0545 Subject: [PATCH] added test to send share invitation to user and group at once (#8168) --- .../apiSharingNg/shareInvitations.feature | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/tests/acceptance/features/apiSharingNg/shareInvitations.feature b/tests/acceptance/features/apiSharingNg/shareInvitations.feature index 9fdc189dd..331668114 100644 --- a/tests/acceptance/features/apiSharingNg/shareInvitations.feature +++ b/tests/acceptance/features/apiSharingNg/shareInvitations.feature @@ -1046,3 +1046,68 @@ Feature: Send a sharing invitations | Co Owner | folder | FolderToShare | | Uploader | folder | FolderToShare | | Manager | folder | FolderToShare | + + + Scenario Outline: try to send sharing invitation to user and group at once + Given these users have been created with default attributes and without skeleton files: + | username | + | Carol | + | Bob | + And group "grp1" has been created + And the following users have been added to the following groups + | username | groupname | + | Brian | grp1 | + | Carol | grp1 | + And user "Alice" has uploaded file with content "to share" to "/textfile1.txt" + And user "Alice" has created folder "FolderToShare" + When user "Alice" sends the following share invitation using the Graph API: + | resourceType | | + | resource | | + | space | Personal | + | sharee | grp1, Bob | + | shareType | group, user | + | permissionsRole | | + Then the HTTP status code should be "400" + And the JSON data of the response should match + """ + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "invalidRequest" + ] + }, + "message": { + "type": "string", + "enum": [ + "Key: 'DriveItemInvite.Recipients' Error:Field validation for 'Recipients' failed on the 'len' tag" + ] + } + } + } + } + } + """ + Examples: + | permissions-role | resource-type | path | + | Viewer | file | /textfile1.txt | + | File Editor | file | /textfile1.txt | + | Co Owner | file | /textfile1.txt | + | Manager | file | /textfile1.txt | + | Viewer | folder | FolderToShare | + | Editor | folder | FolderToShare | + | Co Owner | folder | FolderToShare | + | Uploader | folder | FolderToShare | + | Manager | folder | FolderToShare |