From 424fe864ddca0ee61d93aaf9a7864c0587f6f8a0 Mon Sep 17 00:00:00 2001 From: Prarup Gurung Date: Fri, 17 May 2024 12:52:34 +0545 Subject: [PATCH 1/5] deleteFileFolder.feature: Used sharingNG for sharing in given step --- tests/acceptance/config/behat-core.yml | 4 ++ .../deleteFileFolder.feature | 48 ++++++++++++++----- 2 files changed, 40 insertions(+), 12 deletions(-) diff --git a/tests/acceptance/config/behat-core.yml b/tests/acceptance/config/behat-core.yml index 1d44780f1a..135a1d58cb 100644 --- a/tests/acceptance/config/behat-core.yml +++ b/tests/acceptance/config/behat-core.yml @@ -301,6 +301,8 @@ default: - TrashbinContext: - PublicWebDavContext: - FilesVersionsContext: + - SpacesContext: + - SharingNgContext: - WebDavPropertiesContext: coreApiWebdavEtagPropagation2: @@ -314,6 +316,8 @@ default: - FilesVersionsContext: - WebDavPropertiesContext: - OcisConfigContext: + - SpacesContext: + - SharingNgContext: extensions: rdx\behatvars\BehatVariablesExtension: ~ diff --git a/tests/acceptance/features/coreApiWebdavEtagPropagation1/deleteFileFolder.feature b/tests/acceptance/features/coreApiWebdavEtagPropagation1/deleteFileFolder.feature index e76f9f9e9a..2d54e1b7d1 100644 --- a/tests/acceptance/features/coreApiWebdavEtagPropagation1/deleteFileFolder.feature +++ b/tests/acceptance/features/coreApiWebdavEtagPropagation1/deleteFileFolder.feature @@ -89,7 +89,12 @@ Feature: propagation of etags when deleting a file or folder And using DAV path And user "Alice" has created folder "/upload/sub" And user "Alice" has uploaded file with content "uploaded content" to "/upload/sub/file.txt" - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/upload" And user "Alice" has stored etag of element "/upload/sub" @@ -119,7 +124,12 @@ Feature: propagation of etags when deleting a file or folder And using DAV path And user "Alice" has created folder "/upload/sub" And user "Alice" has uploaded file with content "uploaded content" to "/upload/sub/file.txt" - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/upload" And user "Alice" has stored etag of element "/upload/sub" @@ -149,7 +159,12 @@ Feature: propagation of etags when deleting a file or folder And using DAV path And user "Alice" has created folder "/upload/sub" And user "Alice" has created folder "/upload/sub/toDelete" - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/upload" And user "Alice" has stored etag of element "/upload/sub" @@ -179,7 +194,12 @@ Feature: propagation of etags when deleting a file or folder And using DAV path And user "Alice" has created folder "/upload/sub" And user "Alice" has created folder "/upload/sub/toDelete" - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/upload" And user "Alice" has stored etag of element "/upload/sub" @@ -207,10 +227,12 @@ Feature: propagation of etags when deleting a file or folder Scenario Outline: deleting a file in a publicly shared folder changes its etag for the sharer Given using DAV path And user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" - And user "Alice" has created a public link share with settings - | path | upload | - | permissions | change | - | password | %public% | + And using SharingNG + And user "Alice" has created the following resource link share: + | resource | upload | + | space | Personal | + | permissionsRole | edit | + | password | %public% | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/upload" When the public deletes file "file.txt" from the last public link share using the password "%public%" and new public WebDAV API @@ -233,10 +255,12 @@ Feature: propagation of etags when deleting a file or folder Scenario Outline: deleting a folder in a publicly shared folder changes its etag for the sharer Given using DAV path And user "Alice" has created folder "/upload/sub" - And user "Alice" has created a public link share with settings - | path | upload | - | permissions | change | - | password | %public% | + And using SharingNG + And user "Alice" has created the following resource link share: + | resource | upload | + | space | Personal | + | permissionsRole | edit | + | password | %public% | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/upload" When the public deletes folder "sub" from the last public link share using the password "%public%" and new public WebDAV API From 92a18989ac32aca524f05a224b206f98c412f5cb Mon Sep 17 00:00:00 2001 From: Prarup Gurung Date: Fri, 17 May 2024 12:56:44 +0545 Subject: [PATCH 2/5] moveFileFolder.feature: Used sharingNG for sharing in given step --- .../moveFileFolder.feature | 62 ++++++++++++++----- 1 file changed, 48 insertions(+), 14 deletions(-) diff --git a/tests/acceptance/features/coreApiWebdavEtagPropagation1/moveFileFolder.feature b/tests/acceptance/features/coreApiWebdavEtagPropagation1/moveFileFolder.feature index e18095df33..56b68677ed 100644 --- a/tests/acceptance/features/coreApiWebdavEtagPropagation1/moveFileFolder.feature +++ b/tests/acceptance/features/coreApiWebdavEtagPropagation1/moveFileFolder.feature @@ -162,7 +162,12 @@ Feature: propagation of etags when moving files or folders And using DAV path And user "Alice" has created folder "/upload" And user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/upload" And user "Brian" has stored etag of element "/" @@ -188,7 +193,12 @@ Feature: propagation of etags when moving files or folders And using DAV path And user "Alice" has created folder "/upload" And user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/upload" And user "Brian" has stored etag of element "/" @@ -215,8 +225,18 @@ Feature: propagation of etags when moving files or folders And user "Alice" has created folder "/src" And user "Alice" has created folder "/dst" And user "Alice" has uploaded file with content "uploaded content" to "/src/file.txt" - And user "Alice" has shared folder "/src" with user "Brian" - And user "Alice" has shared folder "/dst" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | src | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | + And user "Alice" has sent the following resource share invitation: + | resource | dst | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/src" And user "Alice" has stored etag of element "/dst" @@ -247,8 +267,18 @@ Feature: propagation of etags when moving files or folders And user "Alice" has created folder "/src" And user "Alice" has created folder "/dst" And user "Alice" has created folder "/src/toMove" - And user "Alice" has shared folder "/src" with user "Brian" - And user "Alice" has shared folder "/dst" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | src | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | + And user "Alice" has sent the following resource share invitation: + | resource | dst | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/src" And user "Alice" has stored etag of element "/dst" @@ -277,10 +307,12 @@ Feature: propagation of etags when moving files or folders Given using DAV path And user "Alice" has created folder "/upload" And user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" - And user "Alice" has created a public link share with settings - | path | upload | - | permissions | change | - | password | %public% | + And using SharingNG + And user "Alice" has created the following resource link share: + | resource | upload | + | space | Personal | + | permissionsRole | edit | + | password | %public% | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/upload" When the public renames file "file.txt" to "renamed.txt" from the last public link share using the password "%public%" and the new public WebDAV API @@ -304,10 +336,12 @@ Feature: propagation of etags when moving files or folders Given using DAV path And user "Alice" has created folder "/upload" And user "Alice" has created folder "/upload/sub" - And user "Alice" has created a public link share with settings - | path | upload | - | permissions | change | - | password | %public% | + And using SharingNG + And user "Alice" has created the following resource link share: + | resource | upload | + | space | Personal | + | permissionsRole | edit | + | password | %public% | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/upload" When the public renames folder "sub" to "renamed" from the last public link share using the password "%public%" and the new public WebDAV API From b3210daaf16d46e677cf6ff625fec4cca3acd254 Mon Sep 17 00:00:00 2001 From: Prarup Gurung Date: Fri, 17 May 2024 13:04:17 +0545 Subject: [PATCH 3/5] copyFileFolder.feature: Used sharingNG for sharing in given step --- tests/acceptance/config/behat-core.yml | 4 ++-- .../copyFileFolder.feature | 22 ++++++++++++++----- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/tests/acceptance/config/behat-core.yml b/tests/acceptance/config/behat-core.yml index 135a1d58cb..e59aaf615c 100644 --- a/tests/acceptance/config/behat-core.yml +++ b/tests/acceptance/config/behat-core.yml @@ -314,10 +314,10 @@ default: - TrashbinContext: - PublicWebDavContext: - FilesVersionsContext: - - WebDavPropertiesContext: - - OcisConfigContext: - SpacesContext: - SharingNgContext: + - WebDavPropertiesContext: + - OcisConfigContext: extensions: rdx\behatvars\BehatVariablesExtension: ~ diff --git a/tests/acceptance/features/coreApiWebdavEtagPropagation2/copyFileFolder.feature b/tests/acceptance/features/coreApiWebdavEtagPropagation2/copyFileFolder.feature index d222784c71..a7c95c43ff 100644 --- a/tests/acceptance/features/coreApiWebdavEtagPropagation2/copyFileFolder.feature +++ b/tests/acceptance/features/coreApiWebdavEtagPropagation2/copyFileFolder.feature @@ -126,9 +126,11 @@ Feature: propagation of etags when copying files or folders And using DAV path And user "Alice" has created folder "/upload" And user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" - And user "Alice" has created a public link share with settings - | path | upload | - | permissions | change | + And using SharingNG + And user "Alice" has created the following resource link share: + | resource | upload | + | space | Personal | + | permissionsRole | edit | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/upload" And user "Alice" has stored etag of element "/upload/file.txt" @@ -160,7 +162,12 @@ Feature: propagation of etags when copying files or folders And using DAV path And user "Alice" has created folder "/upload" And user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/upload" And user "Alice" has stored etag of element "/upload/file.txt" @@ -196,7 +203,12 @@ Feature: propagation of etags when copying files or folders And using DAV path And user "Alice" has created folder "/upload" And user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/upload" And user "Alice" has stored etag of element "/upload/file.txt" From 4bca7c6eb2a31235ac3af1f422f898ca402cff89 Mon Sep 17 00:00:00 2001 From: Prarup Gurung Date: Fri, 17 May 2024 13:04:46 +0545 Subject: [PATCH 4/5] createFolder.feature: Used sharingNG for sharing in given step --- .../createFolder.feature | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/tests/acceptance/features/coreApiWebdavEtagPropagation2/createFolder.feature b/tests/acceptance/features/coreApiWebdavEtagPropagation2/createFolder.feature index 523d3eb03d..5880d6cfdf 100644 --- a/tests/acceptance/features/coreApiWebdavEtagPropagation2/createFolder.feature +++ b/tests/acceptance/features/coreApiWebdavEtagPropagation2/createFolder.feature @@ -58,7 +58,12 @@ Feature: propagation of etags when creating folders Given user "Brian" has been created with default attributes and without skeleton files And using DAV path And user "Alice" has created folder "/folder" - And user "Alice" has shared folder "/folder" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | folder | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/folder" And user "Brian" has stored etag of element "/" @@ -83,7 +88,12 @@ Feature: propagation of etags when creating folders Given user "Brian" has been created with default attributes and without skeleton files And using DAV path And user "Alice" has created folder "/folder" - And user "Alice" has shared folder "/folder" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | folder | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/folder" And user "Brian" has stored etag of element "/" @@ -108,9 +118,11 @@ Feature: propagation of etags when creating folders Given the config "OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false" And using DAV path And user "Alice" has created folder "/folder" - And user "Alice" has created a public link share with settings - | path | folder | - | permissions | create | + And using SharingNG + And user "Alice" has created the following resource link share: + | resource | folder | + | space | Personal | + | permissionsRole | createOnly | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/folder" When the public creates folder "created-by-public" using the new public WebDAV API From 81f6670910377e4a2f03fa208378196f332ef689 Mon Sep 17 00:00:00 2001 From: Prarup Gurung Date: Fri, 17 May 2024 14:08:18 +0545 Subject: [PATCH 5/5] upload.feature: Used sharingNG for sharing in given step --- tests/acceptance/config/behat-core.yml | 2 - .../upload.feature | 38 +++++++++++++++---- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/tests/acceptance/config/behat-core.yml b/tests/acceptance/config/behat-core.yml index e59aaf615c..a71a7dd3f7 100644 --- a/tests/acceptance/config/behat-core.yml +++ b/tests/acceptance/config/behat-core.yml @@ -301,7 +301,6 @@ default: - TrashbinContext: - PublicWebDavContext: - FilesVersionsContext: - - SpacesContext: - SharingNgContext: - WebDavPropertiesContext: @@ -314,7 +313,6 @@ default: - TrashbinContext: - PublicWebDavContext: - FilesVersionsContext: - - SpacesContext: - SharingNgContext: - WebDavPropertiesContext: - OcisConfigContext: diff --git a/tests/acceptance/features/coreApiWebdavEtagPropagation2/upload.feature b/tests/acceptance/features/coreApiWebdavEtagPropagation2/upload.feature index f154eb96f2..020a056780 100644 --- a/tests/acceptance/features/coreApiWebdavEtagPropagation2/upload.feature +++ b/tests/acceptance/features/coreApiWebdavEtagPropagation2/upload.feature @@ -56,7 +56,12 @@ Feature: propagation of etags when uploading data Scenario Outline: sharee uploading a file inside a received shared folder should update etags for all collaborators Given user "Brian" has been created with default attributes and without skeleton files And using DAV path - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/upload" And user "Brian" has stored etag of element "/" @@ -80,7 +85,12 @@ Feature: propagation of etags when uploading data Scenario Outline: sharer uploading a file inside a shared folder should update etags for all collaborators Given user "Brian" has been created with default attributes and without skeleton files And using DAV path - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/upload" And user "Brian" has stored etag of element "/" @@ -105,7 +115,12 @@ Feature: propagation of etags when uploading data Given user "Brian" has been created with default attributes and without skeleton files And using DAV path And user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/upload" And user "Brian" has stored etag of element "/" @@ -130,7 +145,12 @@ Feature: propagation of etags when uploading data Given user "Brian" has been created with default attributes and without skeleton files And using DAV path And user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" - And user "Alice" has shared folder "/upload" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | upload | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/upload" And user "Brian" has stored etag of element "/" @@ -153,10 +173,12 @@ Feature: propagation of etags when uploading data @issue-4251 Scenario Outline: uploading a file into a publicly shared folder changes its etag for the sharer Given using DAV path - And user "Alice" has created a public link share with settings - | path | upload | - | permissions | create | - | password | %public% | + And using SharingNG + And user "Alice" has created the following resource link share: + | resource | upload | + | space | Personal | + | permissionsRole | createOnly | + | password | %public% | And user "Alice" has stored etag of element "/" And user "Alice" has stored etag of element "/upload" When the public uploads file "file.txt" with password "%public%" and content "new content" using the new public WebDAV API