Files
QSfera/tests/acceptance/features/coreApiWebdavOperations/propfind.feature
T
Sawjan Gurung de42e3e109 [tests-only] Run tests with default propfind depth infinity config (#7334)
* use default config for OCDAV_ALLOW_PROPFIND_DEPTH_INFINITY

* remove unnecessary steps

* use default propfind depth infinity value

* use correct step to check the resources

* use correct step to check the resources

* cover depth:infinity enabled test cases

* fix steps

* fix scenario steps

* update expected failure list

* add depth infinity test suite to ci

* update existing tests only

* remove test with depth:infinity
2023-10-05 09:56:01 +05:45

85 lines
4.1 KiB
Gherkin

Feature: PROPFIND
As a user
I want to retrieve all properties of a resource
So that I can get the information about a resource
@issue-751
Scenario Outline: send PROPFIND request to "/remote.php/dav/(files|spaces)"
Given user "Alice" has been created with default attributes and without skeleton files
When user "Alice" requests "<dav_path>" with "PROPFIND" using basic auth
Then the HTTP status code should be "405"
Examples:
| dav_path |
| /remote.php/dav/files |
@skipOnRevaMaster
Examples:
| dav_path |
| /remote.php/dav/spaces |
Scenario Outline: send PROPFIND request to "/remote.php/dav/(files|spaces)" with depth header
Given user "Alice" has been created with default attributes and without skeleton files
When user "Alice" requests "<dav_path>" with "PROPFIND" using basic auth and with headers
| header | value |
| depth | <depth> |
Then the HTTP status code should be "207"
Examples:
| dav_path | depth |
| /remote.php/dav/files/alice | 0 |
| /remote.php/dav/files/alice | infinity |
@skipOnRevaMaster
Examples:
| dav_path | depth |
| /remote.php/dav/spaces/%spaceid% | 0 |
Scenario: send PROPFIND request to a public link
Given user "Alice" has been created with default attributes and without skeleton files
And user "Alice" has created folder "/PARENT"
And user "Alice" has created a public link share with settings
| path | /PARENT |
| permissions | read |
When the public sends "PROPFIND" request to the last public link share using the new public WebDAV API
Then the HTTP status code should be "207"
And the value of the item "//d:href" in the response should match "/%base_path%\/remote.php\/dav\/public-files\/%public_token%\/$/"
And the value of the item "//oc:public-link-share-owner" in the response should be "Alice"
Scenario: send PROPFIND request to a public link shared with password
Given user "Alice" has been created with default attributes and without skeleton files
And user "Alice" has created folder "/PARENT"
And user "Alice" has created a public link share with settings
| path | /PARENT |
| permissions | read |
| password | 1111 |
When the public sends "PROPFIND" request to the last public link share using the new public WebDAV API with password "1111"
Then the HTTP status code should be "207"
And the value of the item "//d:href" in the response should match "/%base_path%\/remote.php\/dav\/public-files\/%public_token%\/$/"
And the value of the item "//oc:public-link-share-owner" in the response should be "Alice"
Scenario: send PROPFIND request to a public link shared with password (request without password)
Given user "Alice" has been created with default attributes and without skeleton files
And user "Alice" has created folder "/PARENT"
And user "Alice" has created a public link share with settings
| path | /PARENT |
| permissions | read |
| password | 1111 |
When the public sends "PROPFIND" request to the last public link share using the new public WebDAV API
Then the HTTP status code should be "401"
And the value of the item "/d:error/s:exception" in the response should be "Sabre\DAV\Exception\NotAuthenticated"
Scenario: send PROPFIND request to a public link shared with password (request with incorrect password)
Given user "Alice" has been created with default attributes and without skeleton files
And user "Alice" has created folder "/PARENT"
And user "Alice" has created a public link share with settings
| path | /PARENT |
| permissions | read |
| password | 1111 |
When the public sends "PROPFIND" request to the last public link share using the new public WebDAV API with password "1234"
Then the HTTP status code should be "401"
And the value of the item "/d:error/s:exception" in the response should be "Sabre\DAV\Exception\NotAuthenticated"