From 815912d93ce691fb1ebeffd4774f94cf2e63e9cf Mon Sep 17 00:00:00 2001 From: Salipa-Gurung Date: Mon, 20 May 2024 17:00:00 +0545 Subject: [PATCH] update given step using sharingNg in updateShare.feature --- tests/acceptance/config/behat-core.yml | 1 + .../expected-failures-API-on-OCIS-storage.md | 5 +- .../updateShare.feature | 62 ++++++++++++++++--- 3 files changed, 57 insertions(+), 11 deletions(-) diff --git a/tests/acceptance/config/behat-core.yml b/tests/acceptance/config/behat-core.yml index 182e7170e1..b0f4baace3 100644 --- a/tests/acceptance/config/behat-core.yml +++ b/tests/acceptance/config/behat-core.yml @@ -164,6 +164,7 @@ default: - PublicWebDavContext: - TrashbinContext: - WebDavPropertiesContext: + - SharingNgContext: coreApiTrashbin: paths: diff --git a/tests/acceptance/expected-failures-API-on-OCIS-storage.md b/tests/acceptance/expected-failures-API-on-OCIS-storage.md index a7e5431415..3d685a1038 100644 --- a/tests/acceptance/expected-failures-API-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-API-on-OCIS-storage.md @@ -138,9 +138,8 @@ cannot share a folder with create permission #### [Edit user share response has a "name" field](https://github.com/owncloud/ocis/issues/1225) -- [coreApiShareUpdateToShares/updateShare.feature:161](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature#L161) -- [coreApiShareUpdateToShares/updateShare.feature:162](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature#L162) - +- [coreApiShareUpdateToShares/updateShare.feature:201](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature#L201) +- [coreApiShareUpdateToShares/updateShare.feature:202](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature#L202) #### [deleting a share with wrong authentication returns OCS status 996 / HTTP 500](https://github.com/owncloud/ocis/issues/1229) diff --git a/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature b/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature index 389a1bc2ca..f048d7aa35 100644 --- a/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature +++ b/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature @@ -16,7 +16,13 @@ Feature: sharing And group "grp1" has been created And user "Brian" has been added to group "grp1" And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt" - And user "Alice" has shared file "textfile0.txt" with group "grp1" + And user "Alice" has sent the following resource share invitation: + | resource | textfile0.txt | + | space | Personal | + | sharee | grp1 | + | shareType | group | + | permissionsRole | File Editor | + And using SharingNG And user "Brian" has moved file "/Shares/textfile0.txt" to "/Shares/textfile_new.txt" When user "Alice" updates the last share using the sharing API with | permissions | read | @@ -46,7 +52,13 @@ Feature: sharing Given using OCS API version "" And group "grp1" has been created And user "Alice" has created folder "/FOLDER" - And user "Alice" has shared folder "/FOLDER" with group "grp1" + And user "Alice" has sent the following resource share invitation: + | resource | FOLDER | + | space | Personal | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Viewer | + And using SharingNG When user "Alice" updates the last share using the sharing API with | permissions | 0 | Then the OCS status code should be "400" @@ -61,7 +73,13 @@ Feature: sharing Given using OCS API version "" And user "Brian" has been created with default attributes and without skeleton files And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt" - And user "Alice" has shared file "textfile0.txt" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | textfile0.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And using SharingNG When user "Alice" updates the last share using the sharing API with | permissions | | Then the OCS status code should be "400" @@ -84,7 +102,13 @@ Feature: sharing And group "grp1" has been created And user "Brian" has been added to group "grp1" And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt" - And user "Alice" has shared file "textfile0.txt" with group "grp1" + And user "Alice" has sent the following resource share invitation: + | resource | textfile0.txt | + | space | Personal | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Viewer | + And using SharingNG When user "Alice" updates the last share using the sharing API with | permissions | | Then the OCS status code should be "400" @@ -109,8 +133,18 @@ Feature: sharing And user "Alice" has created folder "/Alice-folder" And user "Alice" has created folder "/Alice-folder/folder2" And user "Carol" has created folder "/Carol-folder" - And user "Alice" has shared folder "/Alice-folder" with user "Brian" with permissions "all" - And user "Carol" has shared folder "/Carol-folder" with user "Brian" with permissions "all" + And user "Alice" has sent the following resource share invitation: + | resource | Alice-folder | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | + And user "Carol" has sent the following resource share invitation: + | resource | Carol-folder | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | When user "Brian" moves folder "/Shares/Alice-folder/folder2" to "/Shares/Carol-folder/folder2" using the WebDAV API Then the HTTP status code should be "502" @@ -120,7 +154,13 @@ Feature: sharing Given using OCS API version "" And user "Brian" has been created with default attributes and without skeleton files And user "Alice" has created folder "/Alice-folder" - And user "Alice" has shared folder "/Alice-folder" with user "Brian" with permissions "read" + And user "Alice" has sent the following resource share invitation: + | resource | Alice-folder | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And using SharingNG When user "Alice" updates the last share using the sharing API with | permissions | all | Then the OCS status code should be "" @@ -170,7 +210,13 @@ Feature: sharing And user "Brian" has been added to group "grp1" And user "Carol" has been added to group "grp1" And user "Carol" has created folder "/FOLDER" - And user "Carol" has shared folder "/FOLDER" with group "grp1" + And user "Carol" has sent the following resource share invitation: + | resource | FOLDER | + | space | Personal | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Editor | + And using SharingNG And user "Carol" has updated the last share with | permissions | read | When user "Carol" updates the last share using the sharing API with