Skip to content

Commit

Permalink
Merge pull request #37543 from owncloud/check-http-status-code-fav
Browse files Browse the repository at this point in the history
[tests-only] check HTTP status code in favorite tests
  • Loading branch information
phil-davis authored Jun 17, 2020
2 parents 05bf8c8 + c9dcff5 commit e09aab4
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions tests/acceptance/features/apiFavorites/favorites.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ Feature: favorite
Scenario Outline: Favorite a folder
Given using <dav_version> DAV path
When user "Alice" favorites element "/FOLDER" using the WebDAV API
Then as user "Alice" folder "/FOLDER" should be favorited
Then the HTTP status code should be "207"
And as user "Alice" folder "/FOLDER" should be favorited
When user "Alice" gets the following properties of folder "/FOLDER" using the WebDAV API
| propertyName |
| oc:favorite |
Expand All @@ -30,7 +31,8 @@ Feature: favorite
Given using <dav_version> DAV path
When user "Alice" favorites element "/FOLDER" using the WebDAV API
And user "Alice" unfavorites element "/FOLDER" using the WebDAV API
Then as user "Alice" folder "/FOLDER" should not be favorited
Then the HTTP status code should be "207"
And as user "Alice" folder "/FOLDER" should not be favorited
When user "Alice" gets the following properties of folder "/FOLDER" using the WebDAV API
| propertyName |
| oc:favorite |
Expand All @@ -44,7 +46,8 @@ Feature: favorite
Scenario Outline: Favorite a file
Given using <dav_version> DAV path
When user "Alice" favorites element "/textfile0.txt" using the WebDAV API
Then as user "Alice" file "/textfile0.txt" should be favorited
Then the HTTP status code should be "207"
And as user "Alice" file "/textfile0.txt" should be favorited
When user "Alice" gets the following properties of file "/textfile0.txt" using the WebDAV API
| propertyName |
| oc:favorite |
Expand All @@ -59,7 +62,8 @@ Feature: favorite
Given using <dav_version> DAV path
When user "Alice" favorites element "/textfile0.txt" using the WebDAV API
And user "Alice" unfavorites element "/textfile0.txt" using the WebDAV API
Then as user "Alice" file "/textfile0.txt" should not be favorited
Then the HTTP status code should be "207"
And as user "Alice" file "/textfile0.txt" should not be favorited
When user "Alice" gets the following properties of file "/textfile0.txt" using the WebDAV API
| propertyName |
| oc:favorite |
Expand All @@ -76,7 +80,8 @@ Feature: favorite
When user "Alice" favorites element "/FOLDER" using the WebDAV API
And user "Alice" favorites element "/textfile0.txt" using the WebDAV API
And user "Alice" favorites element "/textfile1.txt" using the WebDAV API
Then user "Alice" in folder "/" should have favorited the following elements
Then the HTTP status code should be "207"
And user "Alice" in folder "/" should have favorited the following elements
| /FOLDER |
| /textfile0.txt |
| /textfile1.txt |
Expand All @@ -96,7 +101,8 @@ Feature: favorite
And user "Alice" favorites element "/subfolder/textfile1.txt" using the WebDAV API
And user "Alice" favorites element "/subfolder/textfile2.txt" using the WebDAV API
And user "Alice" unfavorites element "/subfolder/textfile1.txt" using the WebDAV API
Then user "Alice" in folder "/subfolder" should have favorited the following elements
Then the HTTP status code should be "207"
And user "Alice" in folder "/subfolder" should have favorited the following elements
| /subfolder/textfile0.txt |
| /subfolder/textfile2.txt |
And user "Alice" in folder "/subfolder" should not have favorited the following elements
Expand Down Expand Up @@ -183,7 +189,8 @@ Feature: favorite
And user "Alice" has moved file "/textfile0.txt" to "/favoriteFile.txt"
And user "Alice" has shared file "/favoriteFile.txt" with user "Brian"
When user "Alice" favorites element "/favoriteFile.txt" using the WebDAV API
Then as user "Brian" file "/favoriteFile.txt" should not be favorited
Then the HTTP status code should be "207"
And as user "Brian" file "/favoriteFile.txt" should not be favorited
Examples:
| dav_version |
| old |
Expand All @@ -197,7 +204,8 @@ Feature: favorite
And user "Alice" has moved file "/textfile0.txt" to "/favoriteFile.txt"
And user "Alice" has shared file "/favoriteFile.txt" with user "Brian"
When user "Brian" favorites element "/favoriteFile.txt" using the WebDAV API
Then as user "Alice" file "/favoriteFile.txt" should not be favorited
Then the HTTP status code should be "207"
And as user "Alice" file "/favoriteFile.txt" should not be favorited
Examples:
| dav_version |
| old |
Expand All @@ -208,7 +216,8 @@ Feature: favorite
Given using <dav_version> DAV path
When user "Alice" favorites element "/PARENT/parent.txt" using the WebDAV API
And user "Alice" favorites element "/PARENT" using the WebDAV API
Then user "Alice" in folder "/" should have favorited the following elements
Then the HTTP status code should be "207"
And user "Alice" in folder "/" should have favorited the following elements
| /PARENT |
| /PARENT/parent.txt |
Examples:
Expand Down

0 comments on commit e09aab4

Please sign in to comment.