Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only] [full-ci] Added Then steps to improve checks in tests for apiFavorites suite #39811

Merged
merged 1 commit into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions tests/acceptance/features/apiFavorites/favorites.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ Feature: favorite
When user "Alice" gets the following properties of folder "/FOLDER" using the WebDAV API
| propertyName |
| oc:favorite |
Then the single response should contain a property "oc:favorite" with value "1"
Then the HTTP status code should be "207"
And the single response should contain a property "oc:favorite" with value "1"
Examples:
| dav_version |
| old |
Expand All @@ -34,16 +35,17 @@ Feature: favorite
| spaces |

@issue-ocis-reva-276
Scenario Outline: Favorite and unfavorite a folder
Scenario Outline: Unfavorite a folder
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
And user "Alice" has favorited element "/FOLDER"
When user "Alice" unfavorites element "/FOLDER" using the WebDAV API
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 |
Then the single response should contain a property "oc:favorite" with value "0"
Then the HTTP status code should be "207"
And the single response should contain a property "oc:favorite" with value "0"
Examples:
| dav_version |
| old |
Expand All @@ -63,7 +65,8 @@ Feature: favorite
When user "Alice" gets the following properties of file "/textfile0.txt" using the WebDAV API
| propertyName |
| oc:favorite |
Then the single response should contain a property "oc:favorite" with value "1"
Then the HTTP status code should be "207"
And the single response should contain a property "oc:favorite" with value "1"
Examples:
| dav_version |
| old |
Expand All @@ -75,16 +78,17 @@ Feature: favorite
| spaces |

@smokeTest @issue-ocis-reva-276
Scenario Outline: Favorite and unfavorite a file
Scenario Outline: Unfavorite a file
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
And user "Alice" has favorited element "/textfile0.txt"
When user "Alice" unfavorites element "/textfile0.txt" using the WebDAV API
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 |
Then the single response should contain a property "oc:favorite" with value "0"
Then the HTTP status code should be "207"
And the single response should contain a property "oc:favorite" with value "0"
Examples:
| dav_version |
| old |
Expand Down Expand Up @@ -229,6 +233,7 @@ Feature: favorite
And user "Alice" has shared file "/favoriteFile.txt" with user "Brian"
When user "Alice" favorites element "/favoriteFile.txt" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Alice" file "/favoriteFile.txt" should be favorited
And as user "Brian" file "/favoriteFile.txt" should not be favorited
Examples:
| dav_version |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ Feature: current oC10 behavior for issue-33840
And user "Alice" has favorited element "/textfile4.txt"
When user "Alice" lists the favorites and limits the result to 3 elements using the WebDAV API
#Then the search result should contain any "3" of these entries:
Then the search result should contain any "0" of these entries:
Then the HTTP status code should be "207"
And the search result should contain any "0" of these entries:
| /textfile0.txt |
| /textfile1.txt |
| /textfile2.txt |
Expand Down Expand Up @@ -52,7 +53,8 @@ Feature: current oC10 behavior for issue-33840
And user "Alice" has favorited element "/subfolder/textfile5.txt"
When user "Alice" lists the favorites and limits the result to 3 elements using the WebDAV API
#Then the search result should contain any "3" of these entries:
Then the search result should contain any "0" of these entries:
Then the HTTP status code should be "207"
And the search result should contain any "0" of these entries:
| /subfolder/textfile0.txt |
| /subfolder/textfile1.txt |
| /subfolder/textfile2.txt |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Feature: favorite
And user "Alice" has shared folder "/PARENT" with user "Brian"
And user "Brian" has accepted share "/PARENT" offered by user "Alice"
When user "Brian" favorites element "/Shares/PARENT/parent.txt" using the WebDAV API
Then as user "Brian" file "/Shares/PARENT/parent.txt" should be favorited
Then the HTTP status code should be "207"
And as user "Brian" file "/Shares/PARENT/parent.txt" should be favorited
Examples:
| dav_version |
| old |
Expand All @@ -34,7 +35,8 @@ Feature: favorite
And user "Alice" has shared folder "/PARENT" with user "Brian"
And user "Brian" has accepted share "/PARENT" offered by user "Alice"
When user "Brian" favorites element "/Shares/PARENT/sub-folder" using the WebDAV API
Then as user "Brian" folder "/Shares/PARENT/sub-folder" should be favorited
Then the HTTP status code should be "207"
And as user "Brian" folder "/Shares/PARENT/sub-folder" should be favorited
Examples:
| dav_version |
| old |
Expand All @@ -52,7 +54,8 @@ Feature: favorite
And user "Alice" has shared folder "/PARENT" with user "Brian"
And user "Brian" has accepted share "/PARENT" offered by user "Alice"
When user "Brian" favorites element "/Shares/PARENT" using the WebDAV API
Then as user "Brian" folder "/Shares/PARENT" should be favorited
Then the HTTP status code should be "207"
And as user "Brian" folder "/Shares/PARENT" should be favorited
Examples:
| dav_version |
| old |
Expand All @@ -71,7 +74,9 @@ Feature: favorite
And user "Brian" has accepted share "/PARENT" offered by user "Alice"
And user "Brian" has favorited element "/Shares/PARENT/parent.txt"
When user "Brian" moves file "/Shares/PARENT/parent.txt" to "/taken_out.txt" using the WebDAV API
Then as user "Brian" file "/taken_out.txt" should be favorited
Then the HTTP status code should be "201"
And as "Brian" file "/taken_out.txt" should exist
And as user "Brian" file "/taken_out.txt" should be favorited
Examples:
| dav_version |
| old |
Expand All @@ -90,6 +95,7 @@ Feature: favorite
And user "Brian" has accepted share "/parent.txt" offered by user "Alice"
When user "Brian" favorites element "/Shares/parent.txt" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" file "/Shares/parent.txt" should be favorited
And as user "Alice" file "/PARENT/parent.txt" should not be favorited
Examples:
| dav_version |
Expand Down