From 881a7c1092508105496b7bd7fe206c99571b3df4 Mon Sep 17 00:00:00 2001 From: nabim777 Date: Mon, 9 Dec 2024 16:16:30 +0545 Subject: [PATCH] change the file Signed-off-by: nabim777 --- tests/acceptance/bootstrap/TUSContext.php | 3 +- .../createLinkShare.feature | 53 ------------------- .../features/apiSpaces/tusUpload.feature | 50 ----------------- .../features/apiSpaces/uploadSpaces.feature | 46 ++++++++++++++++ .../apiSpacesShares/shareUploadTUS.feature | 47 ++++++++++++++++ 5 files changed, 94 insertions(+), 105 deletions(-) diff --git a/tests/acceptance/bootstrap/TUSContext.php b/tests/acceptance/bootstrap/TUSContext.php index 35d1fcd48f..98a68ae437 100644 --- a/tests/acceptance/bootstrap/TUSContext.php +++ b/tests/acceptance/bootstrap/TUSContext.php @@ -366,8 +366,7 @@ class TUSContext implements Context { 'Authorization' => 'Basic ' . \base64_encode("public" . ':' . $password), ]; $sourceFile = $this->featureContext->acceptanceTestsDirLocation() . $source; - $davPath = WebdavHelper::getDavPath(WebDavHelper::DAV_VERSION_SPACES, $token, "public-files"); - $url = $davPath; + $url = WebdavHelper::getDavPath(WebDavHelper::DAV_VERSION_SPACES, $token, "public-files"); $client = new Client( $this->featureContext->getBaseUrl(), diff --git a/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature b/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature index fd1f40b921..8415a4c89c 100644 --- a/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature +++ b/tests/acceptance/features/apiSharingNgLinkSharePermission/createLinkShare.feature @@ -2764,56 +2764,3 @@ Feature: Create a link share for a resource | Space Viewer | | Space Editor | | Manager | - - @issue-10649 - Scenario: public uploads a zero byte file to a public share folder - Given using spaces DAV path - And using SharingNG - And user "Alice" has created folder "/uploadFolder" - And user "Alice" has created the following resource link share: - | resource | uploadFolder | - | space | Personal | - | permissionsRole | createOnly | - | password | %public% | - When the public uploads file "filesForUpload/zerobyte.txt" to "textfile.txt" inside last link shared folder with password "%public%" using the public WebDAV API - Then the HTTP status code should be "201" - And for user "Alice" folder "uploadFolder" of the space "Personal" should contain these files: - | textfile.txt | - And for user "Alice" folder "uploadFolder" of the space "Personal" should not contain these files: - | textfile (1).txt | - - @issue-10649 - Scenario: public uploads a zero byte file to a public share folder inside project space - Given using spaces DAV path - And using SharingNG - And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API - And user "Alice" has created a space "Project" with the default quota using the Graph API - And user "Alice" has created a folder "/uploadFolder" in space "Project" - And user "Alice" has created the following resource link share: - | resource | uploadFolder | - | space | Project | - | permissionsRole | createOnly | - | password | %public% | - When the public uploads file "filesForUpload/zerobyte.txt" to "textfile.txt" inside last link shared folder with password "%public%" using the public WebDAV API - Then the HTTP status code should be "201" - And for user "Alice" folder "uploadFolder" of the space "Project" should contain these files: - | textfile.txt | - And for user "Alice" folder "uploadFolder" of the space "Project" should not contain these files: - | textfile (1).txt | - - @issue-10649 - Scenario: public uploads a zero byte file to a public share project space - Given using spaces DAV path - And using SharingNG - And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API - And user "Alice" has created a space "Project" with the default quota using the Graph API - And user "Alice" has created the following space link share: - | space | Project | - | permissionsRole | createOnly | - | password | %public% | - When the public uploads file "filesForUpload/zerobyte.txt" to "textfile.txt" inside last link shared folder with password "%public%" using the public WebDAV API - Then the HTTP status code should be "201" - And for user "Alice" the space "Project" should contain these files: - | textfile.txt | - And for user "Alice" the space "Project" should not contain these files: - | textfile (1).txt | diff --git a/tests/acceptance/features/apiSpaces/tusUpload.feature b/tests/acceptance/features/apiSpaces/tusUpload.feature index eaa5acc9dd..34f561b841 100644 --- a/tests/acceptance/features/apiSpaces/tusUpload.feature +++ b/tests/acceptance/features/apiSpaces/tusUpload.feature @@ -144,53 +144,3 @@ Feature: upload resources using TUS protocol When user "Brian" uploads a file from "filesForUpload/zerobyte.txt" to "textfile.txt" via TUS inside of the space "new-space" using the WebDAV API Then for user "Brian" the content of the file "textfile.txt" of the space "new-space" should be "" And for user "Alice" the content of the file "textfile.txt" of the space "new-space" should be "" - - @issue-10649 - Scenario: public uploads a zero byte file to a public share folder - Given using spaces DAV path - And using SharingNG - And user "Alice" has created folder "/uploadFolder" - And user "Alice" has created the following resource link share: - | resource | uploadFolder | - | space | Personal | - | permissionsRole | createOnly | - | password | %public% | - When the public uploads a file from "filesForUpload/zerobyte.txt" to "textfile.txt" via TUS inside last link shared folder with password "%public%" using the WebDAV API - And for user "Alice" folder "uploadFolder" of the space "Personal" should contain these files: - | textfile.txt | - And for user "Alice" folder "uploadFolder" of the space "Personal" should not contain these files: - | textfile (1).txt | - - @issue-10346 - Scenario: public uploads a zero-byte file to a shared folder inside project space - Given using spaces DAV path - And using SharingNG - And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API - And user "Alice" has created a space "Project" with the default quota using the Graph API - And user "Alice" has created a folder "/uploadFolder" in space "Project" - And user "Alice" has created the following resource link share: - | resource | uploadFolder | - | space | Project | - | permissionsRole | createOnly | - | password | %public% | - When the public uploads a file from "filesForUpload/zerobyte.txt" to "textfile.txt" via TUS inside last link shared folder with password "%public%" using the WebDAV API - And for user "Alice" folder "uploadFolder" of the space "Project" should contain these files: - | textfile.txt | - And for user "Alice" folder "uploadFolder" of the space "Project" should not contain these files: - | textfile (1).txt | - - @issue-10649 - Scenario: public uploads a zero-byte file to a public share project space - Given using spaces DAV path - And using SharingNG - And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API - And user "Alice" has created a space "Project" with the default quota using the Graph API - And user "Alice" has created the following space link share: - | space | Project | - | permissionsRole | createOnly | - | password | %public% | - When the public uploads a file from "filesForUpload/zerobyte.txt" to "textfile.txt" via TUS inside last link shared folder with password "%public%" using the WebDAV API - Then for user "Alice" the space "Project" should contain these files: - | textfile.txt | - And for user "Alice" the space "Project" should not contain these files: - | textfile (1).txt | diff --git a/tests/acceptance/features/apiSpaces/uploadSpaces.feature b/tests/acceptance/features/apiSpaces/uploadSpaces.feature index 8ed3964b2d..9814aae2b4 100644 --- a/tests/acceptance/features/apiSpaces/uploadSpaces.feature +++ b/tests/acceptance/features/apiSpaces/uploadSpaces.feature @@ -93,3 +93,49 @@ Feature: Upload files into a space | folder-name | | foo/bar | | foo/bar/baz | + + @issue-10649 + Scenario: public uploads a zero byte file to a public share folder + Given using SharingNG + And user "Alice" has created folder "/uploadFolder" + And user "Alice" has created the following resource link share: + | resource | uploadFolder | + | space | Personal | + | permissionsRole | createOnly | + | password | %public% | + When the public uploads file "filesForUpload/zerobyte.txt" to "textfile.txt" inside last link shared folder with password "%public%" using the public WebDAV API + Then the HTTP status code should be "201" + And for user "Alice" folder "uploadFolder" of the space "Personal" should contain these files: + | textfile.txt | + And for user "Alice" folder "uploadFolder" of the space "Personal" should not contain these files: + | textfile (1).txt | + + @issue-10649 + Scenario: public uploads a zero byte file to a public share folder inside project space + Given using SharingNG + And user "Alice" has created a folder "/uploadFolder" in space "Project Ceres" + And user "Alice" has created the following resource link share: + | resource | uploadFolder | + | space | Project Ceres | + | permissionsRole | createOnly | + | password | %public% | + When the public uploads file "filesForUpload/zerobyte.txt" to "textfile.txt" inside last link shared folder with password "%public%" using the public WebDAV API + Then the HTTP status code should be "201" + And for user "Alice" folder "uploadFolder" of the space "Project Ceres" should contain these files: + | textfile.txt | + And for user "Alice" folder "uploadFolder" of the space "Project Ceres" should not contain these files: + | textfile (1).txt | + + @issue-10649 + Scenario: public uploads a zero byte file to a public share project space + Given using SharingNG + And user "Alice" has created the following space link share: + | space | Project Ceres | + | permissionsRole | createOnly | + | password | %public% | + When the public uploads file "filesForUpload/zerobyte.txt" to "textfile.txt" inside last link shared folder with password "%public%" using the public WebDAV API + Then the HTTP status code should be "201" + And for user "Alice" the space "Project Ceres" should contain these files: + | textfile.txt | + And for user "Alice" the space "Project Ceres" should not contain these files: + | textfile (1).txt | diff --git a/tests/acceptance/features/apiSpacesShares/shareUploadTUS.feature b/tests/acceptance/features/apiSpacesShares/shareUploadTUS.feature index e17dcc24e8..e166256b09 100644 --- a/tests/acceptance/features/apiSpacesShares/shareUploadTUS.feature +++ b/tests/acceptance/features/apiSpacesShares/shareUploadTUS.feature @@ -402,3 +402,50 @@ Feature: upload resources on share using TUS protocol | Tus-Resumable | 1.0.0 | Then the HTTP status code should be "460" And for user "Alice" the content of the file "/textFile.txt" of the space "Personal" should be "original content" + + @issue-10649 + Scenario: public uploads a zero byte file to a public share folder + Given using SharingNG + And user "Alice" has created folder "/uploadFolder" + And user "Alice" has created the following resource link share: + | resource | uploadFolder | + | space | Personal | + | permissionsRole | createOnly | + | password | %public% | + When the public uploads a file from "filesForUpload/zerobyte.txt" to "textfile.txt" via TUS inside last link shared folder with password "%public%" using the WebDAV API + And for user "Alice" folder "uploadFolder" of the space "Personal" should contain these files: + | textfile.txt | + And for user "Alice" folder "uploadFolder" of the space "Personal" should not contain these files: + | textfile (1).txt | + + @issue-10649 + Scenario: public uploads a zero-byte file to a shared folder inside project space + Given using SharingNG + And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "Project" with the default quota using the Graph API + And user "Alice" has created a folder "/uploadFolder" in space "Project" + And user "Alice" has created the following resource link share: + | resource | uploadFolder | + | space | Project | + | permissionsRole | createOnly | + | password | %public% | + When the public uploads a file from "filesForUpload/zerobyte.txt" to "textfile.txt" via TUS inside last link shared folder with password "%public%" using the WebDAV API + And for user "Alice" folder "uploadFolder" of the space "Project" should contain these files: + | textfile.txt | + And for user "Alice" folder "uploadFolder" of the space "Project" should not contain these files: + | textfile (1).txt | + + @issue-10649 + Scenario: public uploads a zero-byte file to a public share project space + Given using SharingNG + And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "Project" with the default quota using the Graph API + And user "Alice" has created the following space link share: + | space | Project | + | permissionsRole | createOnly | + | password | %public% | + When the public uploads a file from "filesForUpload/zerobyte.txt" to "textfile.txt" via TUS inside last link shared folder with password "%public%" using the WebDAV API + Then for user "Alice" the space "Project" should contain these files: + | textfile.txt | + And for user "Alice" the space "Project" should not contain these files: + | textfile (1).txt |