copyFromPublicLink.feature: Used sharingNG for sharing in given step

This commit is contained in:
Prarup Gurung
2024-05-20 09:26:53 +05:45
parent 2204496444
commit 6ab255b141
4 changed files with 69 additions and 43 deletions
+2
View File
@@ -152,6 +152,8 @@ default:
- TrashbinContext:
- WebDavPropertiesContext:
- OcisConfigContext:
- SpacesContext:
- SharingNgContext:
coreApiShareUpdateToShares:
paths:
@@ -94,12 +94,12 @@ cannot share a folder with create permission
#### [copying a folder within a public link folder to folder with same name as an already existing file overwrites the parent file](https://github.com/owncloud/ocis/issues/1232)
- [coreApiSharePublicLink2/copyFromPublicLink.feature:67](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L67)
- [coreApiSharePublicLink2/copyFromPublicLink.feature:93](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L93)
- [coreApiSharePublicLink2/copyFromPublicLink.feature:177](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L177)
- [coreApiSharePublicLink2/copyFromPublicLink.feature:178](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L178)
- [coreApiSharePublicLink2/copyFromPublicLink.feature:193](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L193)
- [coreApiSharePublicLink2/copyFromPublicLink.feature:194](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L194)
- [coreApiSharePublicLink2/copyFromPublicLink.feature:75](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L75)
- [coreApiSharePublicLink2/copyFromPublicLink.feature:105](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L105)
- [coreApiSharePublicLink2/copyFromPublicLink.feature:199](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L199)
- [coreApiSharePublicLink2/copyFromPublicLink.feature:200](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L200)
- [coreApiSharePublicLink2/copyFromPublicLink.feature:217](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L217)
- [coreApiSharePublicLink2/copyFromPublicLink.feature:218](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L218)
#### [d:quota-available-bytes in dprop of PROPFIND give wrong response value](https://github.com/owncloud/ocis/issues/8197)
@@ -482,7 +482,7 @@ class PublicWebDavContext implements Context {
* @return void
*/
public function thePublicCopiesFileUsingTheWebDAVApi(string $source, string $destination, string $publicWebDAVAPIVersion):void {
$token = $this->featureContext->getLastCreatedPublicShareToken();
$token = ($this->featureContext->isUsingSharingNG()) ? $this->featureContext->shareNgGetLastCreatedLinkShareToken() : $this->featureContext->getLastCreatedPublicShareToken();
$davPath = WebDavHelper::getDavPath(
$token,
0,
@@ -12,9 +12,11 @@ Feature: copying from public link share
Scenario: copy file within a public link folder new public WebDAV API
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
And user "Alice" has created a public link share with settings
| path | /PARENT |
| permissions | read,update,create,delete |
And using SharingNG
And user "Alice" has created the following resource link share:
| resource | PARENT |
| space | Personal |
| permissionsRole | edit |
When the public copies file "/testfile.txt" to "/copy1.txt" using the new public WebDAV API
Then the HTTP status code should be "201"
And as "Alice" file "/PARENT/testfile.txt" should exist
@@ -26,9 +28,11 @@ Feature: copying from public link share
Scenario: copy folder within a public link folder new public WebDAV API
Given user "Alice" has created folder "/PARENT/testFolder"
And user "Alice" has uploaded file with content "some data" to "/PARENT/testFolder/testfile.txt"
And user "Alice" has created a public link share with settings
| path | /PARENT |
| permissions | read,update,create,delete |
And using SharingNG
And user "Alice" has created the following resource link share:
| resource | PARENT |
| space | Personal |
| permissionsRole | edit |
When the public copies folder "/testFolder" to "/testFolder-copy" using the new public WebDAV API
Then the HTTP status code should be "201"
And as "Alice" folder "/PARENT/testFolder" should exist
@@ -40,9 +44,11 @@ Feature: copying from public link share
Scenario: copy file within a public link folder to a new folder
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
And user "Alice" has created folder "/PARENT/testFolder"
And user "Alice" has created a public link share with settings
| path | /PARENT |
| permissions | read,update,create,delete |
And using SharingNG
And user "Alice" has created the following resource link share:
| resource | PARENT |
| space | Personal |
| permissionsRole | edit |
When the public copies file "/testfile.txt" to "/testFolder/copy1.txt" using the new public WebDAV API
Then the HTTP status code should be "201"
And as "Alice" file "/PARENT/testfile.txt" should exist
@@ -54,9 +60,11 @@ Feature: copying from public link share
Scenario: copy file within a public link folder to same file name as already existing one
Given user "Alice" has uploaded file with content "some data 0" to "/PARENT/testfile.txt"
And user "Alice" has uploaded file with content "some data 1" to "/PARENT/copy1.txt"
And user "Alice" has created a public link share with settings
| path | /PARENT |
| permissions | read,update,create,delete |
And using SharingNG
And user "Alice" has created the following resource link share:
| resource | PARENT |
| space | Personal |
| permissionsRole | edit |
When the public copies file "/testfile.txt" to "/copy1.txt" using the new public WebDAV API
Then the HTTP status code should be "204"
And as "Alice" file "/PARENT/testfile.txt" should exist
@@ -68,9 +76,11 @@ Feature: copying from public link share
Given user "Alice" has created folder "/PARENT/testFolder"
And user "Alice" has uploaded file with content "some data" to "/PARENT/testFolder/testfile.txt"
And user "Alice" has uploaded file with content "some data 1" to "/PARENT/copy1.txt"
And user "Alice" has created a public link share with settings
| path | /PARENT |
| permissions | read,update,create,delete |
And using SharingNG
And user "Alice" has created the following resource link share:
| resource | PARENT |
| space | Personal |
| permissionsRole | edit |
When the public copies folder "/testFolder" to "/copy1.txt" using the new public WebDAV API
Then the HTTP status code should be "403"
And as "Alice" folder "/PARENT/testFolder" should exist
@@ -81,9 +91,11 @@ Feature: copying from public link share
Scenario: copy file within a public link folder and delete file
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
And user "Alice" has created a public link share with settings
| path | /PARENT |
| permissions | read,update,create,delete |
And using SharingNG
And user "Alice" has created the following resource link share:
| resource | PARENT |
| space | Personal |
| permissionsRole | edit |
When the public copies file "/testfile.txt" to "/copy1.txt" using the new public WebDAV API
And user "Alice" deletes file "/PARENT/copy1.txt" using the WebDAV API
Then the HTTP status code should be "204"
@@ -94,9 +106,11 @@ Feature: copying from public link share
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
And user "Alice" has created folder "/PARENT/new-folder"
And user "Alice" has uploaded file with content "some data 1" to "/PARENT/new-folder/testfile1.txt"
And user "Alice" has created a public link share with settings
| path | /PARENT |
| permissions | read,update,create,delete |
And using SharingNG
And user "Alice" has created the following resource link share:
| resource | PARENT |
| space | Personal |
| permissionsRole | edit |
When the public copies file "/testfile.txt" to "/new-folder" using the new public WebDAV API
Then the HTTP status code should be "403"
And as "Alice" file "/PARENT/testfile.txt" should exist
@@ -107,9 +121,11 @@ Feature: copying from public link share
Scenario Outline: copy file with special characters in it's name within a public link folder
Given user "Alice" has uploaded file with content "some data" to "/PARENT/<file-name>"
And user "Alice" has created a public link share with settings
| path | /PARENT |
| permissions | read,update,create,delete |
And using SharingNG
And user "Alice" has created the following resource link share:
| resource | PARENT |
| space | Personal |
| permissionsRole | edit |
When the public copies file "/<file-name>" to "/copy1.txt" using the new public WebDAV API
Then the HTTP status code should be "201"
And as "Alice" file "/PARENT/<file-name>" should exist
@@ -126,9 +142,11 @@ Feature: copying from public link share
Scenario Outline: copy file within a public link folder to a file with special characters in it's name
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
And user "Alice" has created a public link share with settings
| path | /PARENT |
| permissions | read,update,create,delete |
And using SharingNG
And user "Alice" has created the following resource link share:
| resource | PARENT |
| space | Personal |
| permissionsRole | edit |
When the public copies file "/testfile.txt" to "/<destination-file-name>" using the new public WebDAV API
Then the HTTP status code should be "201"
And as "Alice" file "/PARENT/testfile.txt" should exist
@@ -146,9 +164,11 @@ Feature: copying from public link share
Scenario Outline: copy file within a public link folder into a folder with special characters
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
And user "Alice" has created folder "/PARENT/<destination-folder-name>"
And user "Alice" has created a public link share with settings
| path | /PARENT |
| permissions | read,update,create,delete |
And using SharingNG
And user "Alice" has created the following resource link share:
| resource | PARENT |
| space | Personal |
| permissionsRole | edit |
When the public copies file "/testfile.txt" to "/<destination-folder-name>/copy1.txt" using the new public WebDAV API
Then the HTTP status code should be "201"
And as "Alice" file "/PARENT/testfile.txt" should exist
@@ -165,9 +185,11 @@ Feature: copying from public link share
@issue-1230
Scenario Outline: copy file within a public link folder to a file with unusual destination names
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
And user "Alice" has created a public link share with settings
| path | /PARENT |
| permissions | read,update,create,delete |
And using SharingNG
And user "Alice" has created the following resource link share:
| resource | PARENT |
| space | Personal |
| permissionsRole | edit |
When the public copies file "/testfile.txt" to "/<destination-file-name>" using the new public WebDAV API
Then the HTTP status code should be "403"
And as "Alice" file "/PARENT/testfile.txt" should exist
@@ -181,9 +203,11 @@ Feature: copying from public link share
Scenario Outline: copy folder within a public link folder to a folder with unusual destination names
Given user "Alice" has created folder "/PARENT/testFolder"
And user "Alice" has uploaded file with content "some data" to "/PARENT/testFolder/testfile.txt"
And user "Alice" has created a public link share with settings
| path | /PARENT |
| permissions | read,update,create,delete |
And using SharingNG
And user "Alice" has created the following resource link share:
| resource | PARENT |
| space | Personal |
| permissionsRole | edit |
When the public copies folder "/testFolder" to "/<destination-file-name>" using the new public WebDAV API
Then the HTTP status code should be "403"
And as "Alice" folder "/PARENT/testFolder" should exist