mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-02 08:49:29 -05:00
listFiles.feature: Used sharingNG for sharing in given step
This commit is contained in:
@@ -253,6 +253,8 @@ default:
|
||||
- FeatureContext: *common_feature_context_params
|
||||
- SearchContext:
|
||||
- PublicWebDavContext:
|
||||
- SpacesContext:
|
||||
- SharingNgContext:
|
||||
- WebDavPropertiesContext:
|
||||
- TrashbinContext:
|
||||
- OcisConfigContext:
|
||||
|
||||
@@ -5463,16 +5463,12 @@ trait WebDav {
|
||||
* @throws Exception
|
||||
*/
|
||||
public function theLastPublicDavResponseShouldContainTheseNodes(TableNode $table):void {
|
||||
if ($this->isUsingSharingNG()) {
|
||||
$user = $this->shareNgGetLastCreatedLinkShareToken();
|
||||
} else {
|
||||
$user = $this->getLastCreatedPublicShareToken();
|
||||
}
|
||||
$token = ($this->isUsingSharingNG()) ? $this->shareNgGetLastCreatedLinkShareToken() : $this->getLastCreatedPublicShareToken();
|
||||
$this->verifyTableNodeColumns($table, ["name"]);
|
||||
$type = $this->usingOldDavPath ? "public-files" : "public-files-new";
|
||||
foreach ($table->getHash() as $row) {
|
||||
$path = $this->substituteInLineCodes($row['name']);
|
||||
$res = $this->findEntryFromPropfindResponse($path, $user, $type);
|
||||
$res = $this->findEntryFromPropfindResponse($path, $token, $type);
|
||||
Assert::assertNotFalse($res, "expected $path to be in DAV response but was not found");
|
||||
}
|
||||
}
|
||||
@@ -5486,12 +5482,12 @@ trait WebDav {
|
||||
* @throws Exception
|
||||
*/
|
||||
public function theLastPublicDavResponseShouldNotContainTheseNodes(TableNode $table):void {
|
||||
$user = $this->getLastCreatedPublicShareToken();
|
||||
$token = ($this->isUsingSharingNG()) ? $this->shareNgGetLastCreatedLinkShareToken() : $this->getLastCreatedPublicShareToken();
|
||||
$this->verifyTableNodeColumns($table, ["name"]);
|
||||
$type = $this->usingOldDavPath ? "public-files" : "public-files-new";
|
||||
foreach ($table->getHash() as $row) {
|
||||
$path = $this->substituteInLineCodes($row['name']);
|
||||
$res = $this->findEntryFromPropfindResponse($path, $user, $type);
|
||||
$res = $this->findEntryFromPropfindResponse($path, $token, $type);
|
||||
Assert::assertFalse($res, "expected $path to not be in DAV response but was found");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,7 +132,11 @@ Feature: list files
|
||||
| path |
|
||||
| /simple-folder/simple-folder1/simple-folder2/simple-folder3 |
|
||||
| /simple-folder/simple-folder1/simple-folder2/simple-folder3/simple-folder4 |
|
||||
And user "Alice" has created a public link share of folder "simple-folder"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | simple-folder |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
When the public lists the resources in the last created public link with depth "0" using the WebDAV API
|
||||
Then the HTTP status code should be "207"
|
||||
And the last public link DAV response should not contain these nodes
|
||||
@@ -156,7 +160,11 @@ Feature: list files
|
||||
| path |
|
||||
| /simple-folder/simple-folder1/simple-folder2/simple-folder3 |
|
||||
| /simple-folder/simple-folder1/simple-folder2/simple-folder3/simple-folder4 |
|
||||
And user "Alice" has created a public link share of folder "simple-folder"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | simple-folder |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
When the public lists the resources in the last created public link with depth "1" using the WebDAV API
|
||||
Then the HTTP status code should be "207"
|
||||
And the last public link DAV response should contain these nodes
|
||||
|
||||
Reference in New Issue
Block a user