diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml index f4c7aebd0..276f57e41 100644 --- a/tests/acceptance/config/behat.yml +++ b/tests/acceptance/config/behat.yml @@ -168,6 +168,7 @@ default: - PublicWebDavContext: - TrashbinContext: - OcisConfigContext: + - SharingNgContext: apiAsyncUpload: paths: diff --git a/tests/acceptance/features/apiDepthInfinity/propfind.feature b/tests/acceptance/features/apiDepthInfinity/propfind.feature index 00b6d3cc1..64b3ec327 100644 --- a/tests/acceptance/features/apiDepthInfinity/propfind.feature +++ b/tests/acceptance/features/apiDepthInfinity/propfind.feature @@ -73,11 +73,15 @@ Feature: PROPFIND with depth:infinity Scenario: get the list of resources in a folder shared through public link with depth infinity Given using new DAV path + And using SharingNG And the following configs have been set: | config | value | | OCDAV_ALLOW_PROPFIND_DEPTH_INFINITY | true | | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false | - And user "Alice" has created a public link share of folder "simple-folder" + And user "Alice" has created the following link share: + | resource | simple-folder | + | space | Personal | + | permissionsRole | view | When the public lists the resources in the last created public link with depth "infinity" using the WebDAV API Then the HTTP status code should be "207" And the last public link DAV response should contain these nodes @@ -124,7 +128,11 @@ Feature: PROPFIND with depth:infinity | OCDAV_ALLOW_PROPFIND_DEPTH_INFINITY | false | | OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD | false | And using new DAV path - And user "Alice" has created a public link share of folder "simple-folder" + And using SharingNG + And user "Alice" has created the following link share: + | resource | simple-folder | + | space | Personal | + | permissionsRole | view | When the public lists the resources in the last created public link with depth "infinity" using the WebDAV API Then the HTTP status code should be "400" diff --git a/tests/acceptance/features/bootstrap/WebDav.php b/tests/acceptance/features/bootstrap/WebDav.php index 451a952d2..9eb6e7e14 100644 --- a/tests/acceptance/features/bootstrap/WebDav.php +++ b/tests/acceptance/features/bootstrap/WebDav.php @@ -5464,7 +5464,11 @@ trait WebDav { * @throws Exception */ public function theLastPublicDavResponseShouldContainTheseNodes(TableNode $table):void { - $user = $this->getLastCreatedPublicShareToken(); + if ($this->isUsingSharingNG()) { + $user = $this->shareNgGetLastCreatedLinkShareToken(); + } else { + $user = $this->getLastCreatedPublicShareToken(); + } $this->verifyTableNodeColumns($table, ["name"]); $type = $this->usingOldDavPath ? "public-files" : "public-files-new"; foreach ($table->getHash() as $row) { @@ -5502,7 +5506,11 @@ trait WebDav { * @throws Exception */ public function thePublicListsTheResourcesInTheLastCreatedPublicLinkWithDepthUsingTheWebdavApi(string $depth):void { - $user = $this->getLastCreatedPublicShareToken(); + if ($this->isUsingSharingNG()) { + $user = $this->shareNgGetLastCreatedLinkShareToken(); + } else { + $user = $this->getLastCreatedPublicShareToken(); + } $response = $this->listFolder( $user, '/',