From ec8a4a044b514809c6dadd432bc891c82aa26718 Mon Sep 17 00:00:00 2001 From: Sagar Gurung <46086950+SagarGi@users.noreply.github.com> Date: Thu, 21 Mar 2024 12:05:20 +0545 Subject: [PATCH] [tests-only][full-ci] check same name resources shared by different users (#8630) * list resources and check resource name with same name shared from different users Signed-off-by: sagargurung1001@gmail.com * PR address --------- Signed-off-by: sagargurung1001@gmail.com --- .../apiSharingNg/sharedWithMe.feature | 92 ++++++++++++++++++- 1 file changed, 91 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/features/apiSharingNg/sharedWithMe.feature b/tests/acceptance/features/apiSharingNg/sharedWithMe.feature index 895d3c2633..2a91a3745c 100755 --- a/tests/acceptance/features/apiSharingNg/sharedWithMe.feature +++ b/tests/acceptance/features/apiSharingNg/sharedWithMe.feature @@ -4691,4 +4691,94 @@ Feature: an user gets the resources shared to them } } } - """ \ No newline at end of file + """ + + @issue-8471 + Scenario: user list resources with same name shared from different users + Given using spaces DAV path + And user "Carol" has been created with default attributes and without skeleton files + And user "Brian" has created folder "folder" + And user "Brian" has uploaded file with content "hello world" to "/textfile.txt" + And user "Carol" has created folder "folder" + And user "Carol" has uploaded file with content "hello world" to "/textfile.txt" + And user "Brian" has sent the following share invitation: + | resource | textfile.txt | + | space | Personal | + | sharee | Alice | + | shareType | user | + | permissionsRole | Viewer | + And user "Brian" has sent the following share invitation: + | resource | folder | + | space | Personal | + | sharee | Alice | + | shareType | user | + | permissionsRole | Viewer | + And user "Carol" has sent the following share invitation: + | resource | textfile.txt | + | space | Personal | + | sharee | Alice | + | shareType | user | + | permissionsRole | Viewer | + And user "Carol" has sent the following share invitation: + | resource | folder | + | space | Personal | + | sharee | Alice | + | shareType | user | + | permissionsRole | Viewer | + When user "Alice" lists the shares shared with him using the Graph API + Then the HTTP status code should be "200" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "maxItems": 4, + "minItems": 4, + "uniqueItems": true, + "items": { + "oneOf": [ + { + "type": "object", + "required": ["name"], + "properties": { + "name": { + "const": "folder" + } + } + }, + { + "type": "object", + "required": ["name"], + "properties": { + "name": { + "const": "folder (1)" + } + } + }, + { + "type": "object", + "required": ["name"], + "properties": { + "name": { + "const": "textfile.txt" + } + } + }, + { + "type": "object", + "required": ["name"], + "properties": { + "name": { + "const": "textfile (1).txt" + } + } + } + ] + } + } + } + } + """