Merge pull request #8674 from owncloud/add-profind-test-new-davpath
[full-ci] [tests-only] sharee PROPFINDs same name shares shared by multiple users
This commit is contained in:
@@ -83,6 +83,7 @@ Feature: CORS headers
|
|||||||
|
|
||||||
@issue-8231
|
@issue-8231
|
||||||
Scenario: CORS headers should be returned when setting CORS domain sending origin header in the Webdav api
|
Scenario: CORS headers should be returned when setting CORS domain sending origin header in the Webdav api
|
||||||
|
Given using spaces DAV path
|
||||||
When user "Alice" sends PROPFIND request to space "Alice Hansen" with headers using the WebDAV API
|
When user "Alice" sends PROPFIND request to space "Alice Hansen" with headers using the WebDAV API
|
||||||
| header | value |
|
| header | value |
|
||||||
| Origin | https://aphno.badal |
|
| Origin | https://aphno.badal |
|
||||||
|
|||||||
@@ -12,36 +12,79 @@ Feature: propfind a shares
|
|||||||
|
|
||||||
@issue-4421
|
@issue-4421
|
||||||
Scenario Outline: sharee PROPFIND same name shares shared by multiple users
|
Scenario Outline: sharee PROPFIND same name shares shared by multiple users
|
||||||
Given user "Alice" has uploaded file with content "to share" to "textfile.txt"
|
Given using spaces DAV path
|
||||||
|
And user "Alice" has uploaded file with content "to share" to "textfile.txt"
|
||||||
And user "Alice" has created folder "folderToShare"
|
And user "Alice" has created folder "folderToShare"
|
||||||
And user "Carol" has uploaded file with content "to share" to "textfile.txt"
|
And user "Carol" has uploaded file with content "to share" to "textfile.txt"
|
||||||
And user "Carol" has created folder "folderToShare"
|
And user "Carol" has created folder "folderToShare"
|
||||||
And user "Alice" has sent the following share invitation:
|
And user "Alice" has sent the following share invitation:
|
||||||
| resource | <path> |
|
| resource | <resource> |
|
||||||
| space | Personal |
|
| space | Personal |
|
||||||
| sharee | Brian |
|
| sharee | Brian |
|
||||||
| shareType | user |
|
| shareType | user |
|
||||||
| permissionsRole | Viewer |
|
| permissionsRole | Viewer |
|
||||||
And user "Carol" has sent the following share invitation:
|
And user "Carol" has sent the following share invitation:
|
||||||
| resource | <path> |
|
| resource | <resource> |
|
||||||
| space | Personal |
|
| space | Personal |
|
||||||
| sharee | Brian |
|
| sharee | Brian |
|
||||||
| shareType | user |
|
| shareType | user |
|
||||||
| permissionsRole | Viewer |
|
| permissionsRole | Viewer |
|
||||||
When user "Brian" sends PROPFIND request to space "Shares" using the WebDAV API
|
When user "Brian" sends PROPFIND request to space "Shares" using the WebDAV API
|
||||||
Then the HTTP status code should be "207"
|
Then the HTTP status code should be "207"
|
||||||
And the "PROPFIND" response to user "Brian" should contain a space "Shares" with these key and value pairs:
|
And the "PROPFIND" response to user "Brian" should contain a space "Shares" with these key and value pairs:
|
||||||
| key | value |
|
| key | value |
|
||||||
| oc:fileid | UUIDof:Shares |
|
| oc:fileid | UUIDof:Shares |
|
||||||
And the "PROPFIND" response to user "Brian" should contain a mountpoint "Shares" with these key and value pairs:
|
And the "PROPFIND" response to user "Brian" should contain a mountpoint "Shares" with these key and value pairs:
|
||||||
| key | value |
|
| key | value |
|
||||||
| oc:name | <path> |
|
| oc:name | <resource> |
|
||||||
| oc:permissions | SR |
|
| oc:permissions | SR |
|
||||||
And the "PROPFIND" response to user "Brian" should contain a mountpoint "Shares" with these key and value pairs:
|
And the "PROPFIND" response to user "Brian" should contain a mountpoint "Shares" with these key and value pairs:
|
||||||
| key | value |
|
| key | value |
|
||||||
| oc:name | <path2> |
|
| oc:name | <resource-2> |
|
||||||
| oc:permissions | SR |
|
| oc:permissions | SR |
|
||||||
Examples:
|
Examples:
|
||||||
| path | path2 |
|
| resource | resource-2 |
|
||||||
| textfile.txt | textfile (1).txt |
|
| textfile.txt | textfile (1).txt |
|
||||||
| folderToShare | folderToShare (1) |
|
| folderToShare | folderToShare (1) |
|
||||||
|
|
||||||
|
@issue-4421
|
||||||
|
Scenario Outline: sharee PROPFIND same name shares shared by multiple users using new dav path
|
||||||
|
Given using <dav-path-version> DAV path
|
||||||
|
And user "Alice" has uploaded file with content "to share" to "textfile.txt"
|
||||||
|
And user "Alice" has created folder "folderToShare"
|
||||||
|
And user "Carol" has uploaded file with content "to share" to "textfile.txt"
|
||||||
|
And user "Carol" has created folder "folderToShare"
|
||||||
|
And user "Alice" has sent the following share invitation:
|
||||||
|
| resource | <resource> |
|
||||||
|
| space | Personal |
|
||||||
|
| sharee | Brian |
|
||||||
|
| shareType | user |
|
||||||
|
| permissionsRole | Viewer |
|
||||||
|
And user "Carol" has sent the following share invitation:
|
||||||
|
| resource | <resource> |
|
||||||
|
| space | Personal |
|
||||||
|
| sharee | Brian |
|
||||||
|
| shareType | user |
|
||||||
|
| permissionsRole | Viewer |
|
||||||
|
When user "Brian" sends PROPFIND request from the space "Shares" to the resource "Shares" using the WebDAV API
|
||||||
|
Then the HTTP status code should be "207"
|
||||||
|
And the "PROPFIND" response to user "Brian" should contain a space "Shares" with these key and value pairs:
|
||||||
|
| key | value |
|
||||||
|
| oc:fileid | UUIDof:Shares |
|
||||||
|
| oc:name | Shares |
|
||||||
|
And the "PROPFIND" response to user "Brian" should contain a mountpoint "Shares" with these key and value pairs:
|
||||||
|
| key | value |
|
||||||
|
| oc:fileid | UUIDof:<resource> |
|
||||||
|
| oc:name | <resource> |
|
||||||
|
| oc:permissions | SR |
|
||||||
|
And the "PROPFIND" response to user "Brian" should contain a mountpoint "Shares" with these key and value pairs:
|
||||||
|
| key | value |
|
||||||
|
| oc:fileid | UUIDof:<resource-2> |
|
||||||
|
| oc:name | <resource-2> |
|
||||||
|
| oc:permissions | SR |
|
||||||
|
Examples:
|
||||||
|
| dav-path-version | resource | resource-2 |
|
||||||
|
| old | textfile.txt | textfile (1).txt |
|
||||||
|
| old | folderToShare | folderToShare (1) |
|
||||||
|
| new | textfile.txt | textfile (1).txt |
|
||||||
|
| new | folderToShare | folderToShare (1) |
|
||||||
|
|||||||
@@ -3617,11 +3617,12 @@ class SpacesContext implements Context {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @When /^user "([^"]*)" sends PROPFIND request from the space "([^"]*)" to the resource "([^"]*)" with depth "([^"]*)" using the WebDAV API$/
|
* @When /^user "([^"]*)" sends PROPFIND request from the space "([^"]*)" to the resource "([^"]*)" with depth "([^"]*)" using the WebDAV API$/
|
||||||
|
* @When user :user sends PROPFIND request from the space :spaceName to the resource :resource using the WebDAV API
|
||||||
*
|
*
|
||||||
* @param string $user
|
* @param string $user
|
||||||
* @param string $spaceName
|
* @param string $spaceName
|
||||||
* @param string $resource
|
* @param string $resource
|
||||||
* @param string $folderDepth
|
* @param string|null $folderDepth
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
@@ -3629,7 +3630,7 @@ class SpacesContext implements Context {
|
|||||||
*
|
*
|
||||||
* @throws GuzzleException
|
* @throws GuzzleException
|
||||||
*/
|
*/
|
||||||
public function userSendsPropfindRequestFromTheSpaceToTheResourceWithDepthUsingTheWebdavApi(string $user, string $spaceName, string $resource, string $folderDepth): void {
|
public function userSendsPropfindRequestFromTheSpaceToTheResourceWithDepthUsingTheWebdavApi(string $user, string $spaceName, string $resource, ?string $folderDepth = "1"): void {
|
||||||
$this->featureContext->setResponse(
|
$this->featureContext->setResponse(
|
||||||
$this->sendPropfindRequestToSpace($user, $spaceName, $resource, null, $folderDepth)
|
$this->sendPropfindRequestToSpace($user, $spaceName, $resource, null, $folderDepth)
|
||||||
);
|
);
|
||||||
@@ -3705,7 +3706,7 @@ class SpacesContext implements Context {
|
|||||||
$this->featureContext->getStepLineRef(),
|
$this->featureContext->getStepLineRef(),
|
||||||
$folderDepth,
|
$folderDepth,
|
||||||
"files",
|
"files",
|
||||||
WebDavHelper::DAV_VERSION_SPACES,
|
$this->featureContext->getDavPathVersion(),
|
||||||
null,
|
null,
|
||||||
$headers
|
$headers
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user