From dc0dd9b343438cad00ad4d7ff1b8917deb543d55 Mon Sep 17 00:00:00 2001 From: Salipa-Gurung Date: Wed, 15 May 2024 16:55:06 +0545 Subject: [PATCH] update given step using sharingNg in getWebDAVSharePermissions.feature --- tests/acceptance/config/behat-core.yml | 1 + .../getWebDAVSharePermissions.feature | 62 ++++++++++++++++--- 2 files changed, 55 insertions(+), 8 deletions(-) diff --git a/tests/acceptance/config/behat-core.yml b/tests/acceptance/config/behat-core.yml index 2ffb618aae..1d44780f1a 100644 --- a/tests/acceptance/config/behat-core.yml +++ b/tests/acceptance/config/behat-core.yml @@ -128,6 +128,7 @@ default: - PublicWebDavContext: - TrashbinContext: - WebDavPropertiesContext: + - SharingNgContext: coreApiSharePublicLink1: paths: diff --git a/tests/acceptance/features/coreApiShareOperationsToShares2/getWebDAVSharePermissions.feature b/tests/acceptance/features/coreApiShareOperationsToShares2/getWebDAVSharePermissions.feature index abc0874300..73f72cf265 100644 --- a/tests/acceptance/features/coreApiShareOperationsToShares2/getWebDAVSharePermissions.feature +++ b/tests/acceptance/features/coreApiShareOperationsToShares2/getWebDAVSharePermissions.feature @@ -34,7 +34,12 @@ Feature: sharing Scenario Outline: check webdav share-permissions for received file with edit Given using DAV path And user "Alice" has uploaded file with content "foo" to "/tmp.txt" - And user "Alice" has shared file "/tmp.txt" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | tmp.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | File Editor | When user "Brian" gets the following properties of file "/Shares/tmp.txt" using the WebDAV API | propertyName | | ocs:share-permissions | @@ -70,7 +75,13 @@ Feature: sharing Scenario Outline: check webdav share-permissions for received file with edit permissions but no reshare permissions Given using DAV path And user "Alice" has uploaded file with content "foo" to "/tmp.txt" - And user "Alice" has shared file "tmp.txt" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | tmp.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 | update,read | Then the HTTP status code should be "200" @@ -105,7 +116,13 @@ Feature: sharing Scenario Outline: check webdav share-permissions for received file without edit permissions Given using DAV path And user "Alice" has uploaded file with content "foo" to "/tmp.txt" - And user "Alice" has shared file "tmp.txt" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | tmp.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 | read | Then the HTTP status code should be "200" @@ -159,7 +176,12 @@ Feature: sharing Scenario Outline: check webdav share-permissions for received folder with all permissions Given using DAV path And user "Alice" has created folder "/tmp" - And user "Alice" has shared file "/tmp" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | tmp | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Editor | When user "Brian" gets the following properties of folder "/Shares/tmp" using the WebDAV API | propertyName | | ocs:share-permissions | @@ -194,7 +216,13 @@ Feature: sharing Scenario Outline: check webdav share-permissions for received folder with all permissions but edit Given using DAV path And user "Alice" has created folder "/tmp" - And user "Alice" has shared file "/tmp" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | tmp | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And using SharingNG When user "Alice" updates the last share using the sharing API with | permissions | delete,create,read | Then the HTTP status code should be "200" @@ -229,7 +257,13 @@ Feature: sharing Scenario Outline: check webdav share-permissions for received folder with all permissions but create Given using DAV path And user "Alice" has created folder "/tmp" - And user "Alice" has shared file "/tmp" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | tmp | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And using SharingNG When user "Alice" updates the last share using the sharing API with | permissions | delete,update,read | Then the HTTP status code should be "200" @@ -264,7 +298,13 @@ Feature: sharing Scenario Outline: check webdav share-permissions for received folder with all permissions but delete Given using DAV path And user "Alice" has created folder "/tmp" - And user "Alice" has shared file "/tmp" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | tmp | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And using SharingNG When user "Alice" updates the last share using the sharing API with | permissions | create,update,read | Then the HTTP status code should be "200" @@ -299,7 +339,13 @@ Feature: sharing Scenario Outline: check webdav share-permissions for received folder with all permissions but share Given using DAV path And user "Alice" has created folder "/tmp" - And user "Alice" has shared file "/tmp" with user "Brian" + And user "Alice" has sent the following resource share invitation: + | resource | tmp | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And using SharingNG When user "Alice" updates the last share using the sharing API with | permissions | change | Then the HTTP status code should be "200"