Skip to content

Commit

Permalink
Adjust listFiles.feature
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Jul 19, 2021
1 parent 54fa8c5 commit 88aeb4e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
46 changes: 23 additions & 23 deletions tests/acceptance/features/apiWebdavOperations/listFiles.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@api
Feature: download file
Feature: list files
As a user
I want to be able to list my files
I want to be able to list my files and folders (resources)
So that I can understand my file structure in owncloud

Background:
Expand All @@ -12,7 +12,7 @@ Feature: download file
| simple-folder/simple-folder1 |
| simple-folder/simple-empty-folder |
| simple-folder/simple-folder1/simple-folder2 |
And user "Alice" uploads the following files with content "simple-test-content"
And user "Alice" has uploaded the following files with content "simple-test-content"
| path |
| textfile0.txt |
| welcome.txt |
Expand All @@ -23,9 +23,10 @@ Feature: download file
| simple-folder/simple-folder1/simple-folder2/textfile0.txt |
| simple-folder/simple-folder1/simple-folder2/welcome.txt |

Scenario Outline: Get the list of all files on the root folder

Scenario Outline: Get the list of resources in the root folder
Given using <dav_version> DAV path
When user "Alice" gets all their files on "/" with depth "0" using the WebDAV API
When user "Alice" lists the resources in "/" with depth "0" using the WebDAV API
Then the HTTP status code should be "207"
And the last DAV response for user "Alice" should not contain these nodes
| name |
Expand All @@ -36,7 +37,7 @@ Feature: download file
| simple-folder/textfile0.txt |
| simple-folder/simple-empty-folder |
| simple-folder/simple-folder1 |
When user "Alice" gets all their files on "/" with depth 1 using the WebDAV API
When user "Alice" lists the resources in "/" with depth 1 using the WebDAV API
Then the HTTP status code should be "207"
And the last DAV response for user "Alice" should contain these nodes
| name |
Expand All @@ -49,7 +50,7 @@ Feature: download file
| simple-folder/textfile0.txt |
| simple-folder/simple-empty-folder |
| simple-folder/simple-folder1 |
When user "Alice" gets all their files on "/" with depth "infinity" using the WebDAV API
When user "Alice" lists the resources in "/" with depth "infinity" using the WebDAV API
Then the HTTP status code should be "207"
And the last DAV response for user "Alice" should contain these nodes
| name |
Expand All @@ -69,9 +70,10 @@ Feature: download file
| old |
| new |

Scenario Outline: Get the list of all files on a folder

Scenario Outline: Get the list of resources in a folder
Given using <dav_version> DAV path
When user "Alice" gets all their files on "/simple-folder" with depth "0" using the WebDAV API
When user "Alice" lists the resources in "/simple-folder" with depth "0" using the WebDAV API
Then the HTTP status code should be "207"
And the last DAV response for user "Alice" should contain these nodes
| name |
Expand All @@ -82,7 +84,7 @@ Feature: download file
| simple-folder/textfile0.txt |
| simple-folder/simple-empty-folder |
| simple-folder/simple-folder1 |
When user "Alice" gets all their files on "/simple-folder" with depth 1 using the WebDAV API
When user "Alice" lists the resources in "/simple-folder" with depth 1 using the WebDAV API
Then the HTTP status code should be "207"
And the last DAV response for user "Alice" should contain these nodes
| name |
Expand All @@ -97,7 +99,7 @@ Feature: download file
| simple-folder/simple-folder1/welcome.txt |
| simple-folder/simple-folder1/simple-folder2/textfile0.txt |
| simple-folder/simple-folder1/simple-folder2/welcome.txt |
When user "Alice" gets all their files on "/simple-folder" with depth "infinity" using the WebDAV API
When user "Alice" lists the resources in "/simple-folder" with depth "infinity" using the WebDAV API
Then the HTTP status code should be "207"
And the last DAV response for user "Alice" should contain these nodes
| name |
Expand All @@ -114,14 +116,15 @@ Feature: download file
| old |
| new |

Scenario Outline: Get the list of all files on a folder shared through public link

Scenario Outline: Get the list of resources in a folder shared through public link
Given using <dav_version> DAV path
And user "Alice" has created the following folders
| 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"
When the public gets all files on the last created public link with depth 0 using the WebDAV API
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
| name |
Expand All @@ -135,7 +138,7 @@ Feature: download file
| /simple-folder1/simple-folder2/welcome.txt |
| /simple-folder1/simple-folder2/simple-folder3 |
| /simple-folder1/simple-folder2/simple-folder3/simple-folder4 |
When the public gets all files on the last created public link with depth 1 using the WebDAV API
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
| name |
Expand All @@ -151,7 +154,7 @@ Feature: download file
| /simple-folder1/simple-folder2 |
| /simple-folder1/textfile0.txt |
| /simple-folder1/simple-folder2/simple-folder3/simple-folder4 |
When the public gets all files on the last created public link with depth infinity using the WebDAV API
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
| name |
Expand All @@ -170,14 +173,15 @@ Feature: download file
| old |
| new |

Scenario: Get the list of all files on a folder on trashbin

Scenario: Get the list of files in a folder in the trashbin
Given using new DAV path
And user "Alice" has deleted the following resources
| path |
| textfile0.txt |
| welcome.txt |
| simple-folder/ |
When user "Alice" gets files in the trashbin path "/" with depth 0 using the WebDAV API
When user "Alice" lists the resources in the trashbin path "/" with depth 0 using the WebDAV API
Then the HTTP status code should be "207"
And the trashbin DAV response should not contain these nodes
| name |
Expand All @@ -190,7 +194,7 @@ Feature: download file
| simple-folder/simple-folder1/welcome.txt |
| simple-folder/simple-folder1/simple-folder2/textfile0.txt |
| simple-folder/simple-folder1/simple-folder2/welcome.txt |
When user "Alice" gets files in the trashbin path "/" with depth 1 using the WebDAV API
When user "Alice" lists the resources in the trashbin path "/" with depth 1 using the WebDAV API
Then the HTTP status code should be "207"
And the trashbin DAV response should contain these nodes
| name |
Expand All @@ -205,7 +209,7 @@ Feature: download file
| simple-folder/simple-folder1/welcome.txt |
| simple-folder/simple-folder1/simple-folder2/textfile0.txt |
| simple-folder/simple-folder1/simple-folder2/welcome.txt |
When user "Alice" gets files in the trashbin path "/" with depth infinity using the WebDAV API
When user "Alice" lists the resources in the trashbin path "/" with depth infinity using the WebDAV API
Then the HTTP status code should be "207"
And the trashbin DAV response should contain these nodes
| name |
Expand All @@ -218,7 +222,3 @@ Feature: download file
| simple-folder/simple-folder1/welcome.txt |
| simple-folder/simple-folder1/simple-folder2/textfile0.txt |
| simple-folder/simple-folder1/simple-folder2/welcome.txt |
# Examples:
# | dav_version |
# | old |
# | new |
2 changes: 1 addition & 1 deletion tests/acceptance/features/bootstrap/TrashbinContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ static function ($element) use ($user, $path) {
}

/**
* @When user :user gets files in the trashbin path :path with depth :depth using the WebDAV API
* @When user :user lists the resources in the trashbin path :path with depth :depth using the WebDAV API
*
* @param $user
* @param $path
Expand Down
4 changes: 2 additions & 2 deletions tests/acceptance/features/bootstrap/WebDav.php
Original file line number Diff line number Diff line change
Expand Up @@ -4359,7 +4359,7 @@ function ($value) {
}

/**
* @When user :arg1 gets all their files on :path with depth :depth using the WebDAV API
* @When user :arg1 lists the resources in :path with depth :depth using the WebDAV API
*
* @param $user
* @param $path
Expand Down Expand Up @@ -4448,7 +4448,7 @@ public function theLastPublicDavResponseShouldNotContainTheseNodes(TableNode $ta
}

/**
* @When the public gets all files on the last created public link with depth :depth using the WebDAV API
* @When the public lists the resources in the last created public link with depth :depth using the WebDAV API
*
* @param $depth
*
Expand Down

0 comments on commit 88aeb4e

Please sign in to comment.