From 16c412f870684983afd66d657c3572ca0be7a4e8 Mon Sep 17 00:00:00 2001 From: Nalem7 <61624650+nabim777@users.noreply.github.com> Date: Wed, 27 Mar 2024 15:37:23 +0545 Subject: [PATCH] add test for downloading resouces by user when auto sync is disabled (#8737) --- tests/acceptance/config/behat.yml | 2 + .../getFileByFileId.feature | 41 +++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml index aa7a496ebc..13f5b71aac 100644 --- a/tests/acceptance/config/behat.yml +++ b/tests/acceptance/config/behat.yml @@ -298,6 +298,8 @@ default: - FeatureContext: *common_feature_context_params - WebDavPropertiesContext: - FilesVersionsContext: + - SharingNgContext: + - SettingsContext: apiLocks: paths: diff --git a/tests/acceptance/features/apiSpacesDavOperation/getFileByFileId.feature b/tests/acceptance/features/apiSpacesDavOperation/getFileByFileId.feature index fa99e804f2..6d229a8318 100644 --- a/tests/acceptance/features/apiSpacesDavOperation/getFileByFileId.feature +++ b/tests/acceptance/features/apiSpacesDavOperation/getFileByFileId.feature @@ -104,3 +104,44 @@ Feature: accessing files using file id | dav-path | | /remote.php/dav/spaces/<> | | /dav/spaces/<> | + + + Scenario Outline: sharee gets content of a shared file when sync is disable + Given user "Brian" has been created with default attributes and without skeleton files + And user "Brian" has disabled the auto-sync share + And user "Alice" has uploaded file with content "some data" to "/textfile.txt" + And we save it into "FILEID" + And user "Alice" has sent the following share invitation: + | resource | textfile.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + When user "Brian" sends HTTP method "GET" to URL "" + Then the HTTP status code should be "200" + And the downloaded content should be "some data" + Examples: + | dav-path | + | /remote.php/dav/spaces/<> | + | /dav/spaces/<> | + + + Scenario Outline: sharee gets content of a file inside a shared folder when sync is disable + Given user "Brian" has been created with default attributes and without skeleton files + And user "Brian" has disabled the auto-sync share + And user "Alice" has created folder "uploadFolder" + And user "Alice" has uploaded file with content "some data" to "uploadFolder/textfile.txt" + And we save it into "FILEID" + And user "Alice" has sent the following share invitation: + | resource | uploadFolder | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + When user "Brian" sends HTTP method "GET" to URL "" + Then the HTTP status code should be "200" + And the downloaded content should be "some data" + Examples: + | dav-path | + | /remote.php/dav/spaces/<> | + | /dav/spaces/<> |