changing given step of creating link share in feature file (#9019)

This commit is contained in:
Sabin Panta
2024-05-03 09:36:14 +05:45
committed by GitHub
parent 947c56196c
commit db281c4257
3 changed files with 21 additions and 4 deletions

View File

@@ -168,6 +168,7 @@ default:
- PublicWebDavContext:
- TrashbinContext:
- OcisConfigContext:
- SharingNgContext:
apiAsyncUpload:
paths:

View File

@@ -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"

View File

@@ -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,
'/',