Skip to content

Commit

Permalink
Addressed reviews
Browse files Browse the repository at this point in the history
Signed-off-by: Parajuli Kiran <[email protected]>
  • Loading branch information
kiranparajuli589 committed Mar 29, 2022
1 parent 2b456dc commit 53d2a38
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 144 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,17 @@ Feature: a default expiration date can be specified for shares with users or gro
| expireDate | +15 days |
When the administrator sets parameter "shareapi_default_expire_date_user_share" of app "core" to "no"
Then the info about the last share by user "Alice" with user "Brian" should include
| share_type | user |
| file_target | /FOLDER |
| uid_owner | %username% |
| expiration | +15 days |
| share_with | %username% |
| ocs_status_code | <ocs_status_code> |
| http_status_code | <http_status_code> |
| share_type | user |
| file_target | /FOLDER |
| uid_owner | %username% |
| expiration | +15 days |
| share_with | %username% |
And the response when user "Brian" gets the info of the last share should include
| expiration | +15 days |
Examples:
| ocs_api_version | ocs_status_code | http_status_code |
| 1 | 100 | 200 |
| 2 | 200 | 200 |
| ocs_api_version |
| 1 |
| 2 |

@skipOnOcV10.3
Scenario Outline: sharing with default expiration date enabled and enforced for users, user shares with expiration date and then disables
Expand All @@ -115,21 +113,19 @@ Feature: a default expiration date can be specified for shares with users or gro
| shareType | user |
| shareWith | Brian |
| permissions | read,share |
When parameter "shareapi_default_expire_date_user_share" of app "core" has been set to "no"
When the administrator sets parameter "shareapi_default_expire_date_user_share" of app "core" to "no"
Then the info about the last share by user "Alice" with user "Brian" should include
| share_type | user |
| file_target | /FOLDER |
| uid_owner | %username% |
| share_with | %username% |
| expiration | +7 days |
| ocs_status_code | <ocs_status_code> |
| http_status_code | <http_status_code> |
| share_type | user |
| file_target | /FOLDER |
| uid_owner | %username% |
| share_with | %username% |
| expiration | +7 days |
And the response when user "Brian" gets the info of the last share should include
| expiration | +7 days |
Examples:
| ocs_api_version | ocs_status_code | http_status_code |
| 1 | 100 | 200 |
| 2 | 200 | 200 |
| ocs_api_version |
| 1 |
| 2 |

@skipOnOcV10.3
Scenario Outline: sharing with default expiration date enabled but not enforced for groups, user shares without specifying expireDate
Expand Down Expand Up @@ -194,7 +190,7 @@ Feature: a default expiration date can be specified for shares with users or gro
| permissions | read,share |
| expireDate | +15 days |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "<http_status_code>"
And the HTTP status code should be "200"
And the fields of the last response to user "Alice" sharing with group "grp1" should include
| share_type | group |
| file_target | /FOLDER |
Expand All @@ -204,9 +200,9 @@ Feature: a default expiration date can be specified for shares with users or gro
And the response when user "Brian" gets the info of the last share should include
| expiration | +15 days |
Examples:
| ocs_api_version | ocs_status_code | http_status_code |
| 1 | 100 | 200 |
| 2 | 200 | 200 |
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |

@skipOnOcV10.3
Scenario Outline: sharing with default expiration date enabled but not enforced for groups, user shares with expiration date and then disables
Expand All @@ -224,19 +220,17 @@ Feature: a default expiration date can be specified for shares with users or gro
| expireDate | +15 days |
When the administrator sets parameter "shareapi_default_expire_date_group_share" of app "core" to "no"
Then the info about the last share by user "Alice" with group "grp1" should include
| share_type | group |
| file_target | /FOLDER |
| uid_owner | %username% |
| share_with | grp1 |
| expiration | +15 days |
| ocs_status_code | <ocs_status_code> |
| http_status_code | <http_status_code> |
| share_type | group |
| file_target | /FOLDER |
| uid_owner | %username% |
| share_with | grp1 |
| expiration | +15 days |
And the response when user "Brian" gets the info of the last share should include
| expiration | +15 days |
Examples:
| ocs_api_version | ocs_status_code | http_status_code |
| 1 | 100 | 200 |
| 2 | 200 | 200 |
| ocs_api_version |
| 1 |
| 2 |

@skipOnOcV10.3
Scenario Outline: sharing with default expiration date enabled and enforced for groups, user shares with expiration date and then disables
Expand All @@ -255,19 +249,17 @@ Feature: a default expiration date can be specified for shares with users or gro
| expireDate | +3 days |
When the administrator sets parameter "shareapi_default_expire_date_group_share" of app "core" to "no"
Then the info about the last share by user "Alice" with group "grp1" should include
| share_type | group |
| file_target | /FOLDER |
| uid_owner | %username% |
| share_with | grp1 |
| expiration | +3 days |
| ocs_status_code | <ocs_status_code> |
| http_status_code | <http_status_code> |
| share_type | group |
| file_target | /FOLDER |
| uid_owner | %username% |
| share_with | grp1 |
| expiration | +3 days |
And the response when user "Brian" gets the info of the last share should include
| expiration | +3 days |
Examples:
| ocs_api_version | ocs_status_code | http_status_code |
| 1 | 100 | 200 |
| 2 | 200 | 200 |
| ocs_api_version |
| 1 |
| 2 |

@skipOnOcV10.3
Scenario Outline: sharing with default expiration date enabled and enforced for users, user shares without setting expiration date
Expand All @@ -278,7 +270,7 @@ Feature: a default expiration date can be specified for shares with users or gro
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
When user "Alice" shares file "textfile0.txt" with user "Brian" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "<http_status_code>"
And the HTTP status code should be "200"
And the fields of the last response to user "Alice" sharing with user "Brian" should include
| share_type | user |
| file_target | /textfile0.txt |
Expand All @@ -288,9 +280,9 @@ Feature: a default expiration date can be specified for shares with users or gro
And the response when user "Brian" gets the info of the last share should include
| expiration | +7 days |
Examples:
| ocs_api_version | ocs_status_code | http_status_code |
| 1 | 100 | 200 |
| 2 | 200 | 200 |
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |

@skipOnOcV10.3
Scenario Outline: sharing with default expiration date enabled and enforced for users, user shares with expiration date more than the default
Expand Down Expand Up @@ -372,13 +364,11 @@ Feature: a default expiration date can be specified for shares with users or gro
And user "Alice" has shared file "textfile0.txt" with user "Brian" with permissions "read,share"
When the administrator sets parameter "shareapi_expire_after_n_days_user_share" of app "core" to "40"
Then the info about the last share by user "Alice" with user "Brian" should include
| expiration | +30 days |
| http_status_code | 200 |
| ocs_status_code | <ocs_status_code> |
| expiration | +30 days |
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
| ocs_api_version |
| 1 |
| 2 |

@skipOnOcV10.3
Scenario Outline: sharing with default expiration date enabled for users/max expire date is set, user shares and changes max expire date less than the previous one
Expand All @@ -391,13 +381,11 @@ Feature: a default expiration date can be specified for shares with users or gro
And user "Alice" has shared file "textfile0.txt" with user "Brian" with permissions "read,share"
When the administrator sets parameter "shareapi_expire_after_n_days_user_share" of app "core" to "15"
Then the info about the last share by user "Alice" with user "Brian" should include
| expiration | +30 days |
| http_status_code | 200 |
| ocs_status_code | <ocs_status_code> |
| expiration | +30 days |
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
| ocs_api_version |
| 1 |
| 2 |

@skipOnOcV10.3
Scenario Outline: sharing with default expiration date enabled and enforced for groups, user shares without setting expiration date
Expand Down Expand Up @@ -512,15 +500,13 @@ Feature: a default expiration date can be specified for shares with users or gro
And user "Alice" has shared file "textfile0.txt" with group "grp1" with permissions "read,share"
When the administrator sets parameter "shareapi_expire_after_n_days_group_share" of app "core" to "40"
Then the info about the last share by user "Alice" with user "Brian" should include
| expiration | +30 days |
| http_status_code | 200 |
| ocs_status_code | <ocs_status_code> |
| expiration | +30 days |
And the response when user "Brian" gets the info of the last share should include
| expiration | +30 days |
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
| ocs_api_version |
| 1 |
| 2 |

@skipOnOcV10.3
Scenario Outline: sharing with default expiration date enabled for groups/max expire date is set, user shares and changes max expire date less than the previous one
Expand All @@ -534,17 +520,14 @@ Feature: a default expiration date can be specified for shares with users or gro
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
And user "Alice" has shared file "textfile0.txt" with group "grp1" with permissions "read,share"
When the administrator sets parameter "shareapi_expire_after_n_days_group_share" of app "core" to "15"
And user "Alice" gets the info of the last share using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the fields of the last response to user "Alice" should include
Then the response when user "Alice" gets the info of the last share should include
| expiration | +30 days |
And the response when user "Brian" gets the info of the last share should include
| expiration | +30 days |
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
| ocs_api_version |
| 1 |
| 2 |

@skipOnOcV10.3
Scenario Outline: sharing with default expiration date enforced for users, user shares to a group without setting an expiration date
Expand All @@ -557,15 +540,13 @@ Feature: a default expiration date can be specified for shares with users or gro
And user "Alice" has created folder "FOLDER"
When user "Alice" shares file "FOLDER" with group "grp1" with permissions "read,share" using the sharing API
Then the info about the last share by user "Alice" with group "grp1" should include
| expiration | |
| http_status_code | 200 |
| ocs_status_code | <ocs_status_code> |
| expiration | |
And the response when user "Brian" gets the info of the last share should include
| expiration | |
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
| ocs_api_version |
| 1 |
| 2 |

@skipOnOcV10.3
Scenario Outline: sharing with default expiration date enforced for groups, user shares to another user
Expand All @@ -576,15 +557,13 @@ Feature: a default expiration date can be specified for shares with users or gro
And user "Alice" has created folder "FOLDER"
When user "Alice" shares file "/FOLDER" with user "Brian" with permissions "read,share" using the sharing API
Then the info about the last share by user "Alice" with user "Brian" should include
| expiration | |
| http_status_code | 200 |
| ocs_status_code | <ocs_status_code> |
| expiration | |
And the response when user "Brian" gets the info of the last share should include
| expiration | |
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
| ocs_api_version |
| 1 |
| 2 |

@skipOnOcV10.3
Scenario Outline: sharing with default expiration date enforced for users, user shares with invalid expiration date set
Expand Down Expand Up @@ -708,17 +687,17 @@ Feature: a default expiration date can be specified for shares with users or gro
| permissions | read,share |
| expireDateAsString | 123 |
Then the HTTP status code should be "<http_status_code>"
And the OCS status code should be "<ocs_status_code>"
And the OCS status code should be "404"
And the OCS status message should be "Invalid date, date format must be YYYY-MM-DD"
And user "Brian" should not have any received shares
Examples:
| ocs_api_version | ocs_status_code | http_status_code | default | enforce |
| 1 | 404 | 200 | yes | yes |
| 2 | 404 | 404 | yes | yes |
| 1 | 404 | 200 | yes | no |
| 2 | 404 | 404 | yes | no |
| 1 | 404 | 200 | no | no |
| 2 | 404 | 404 | no | no |
| ocs_api_version | http_status_code | default | enforce |
| 1 | 200 | yes | yes |
| 2 | 404 | yes | yes |
| 1 | 200 | yes | no |
| 2 | 404 | yes | no |
| 1 | 200 | no | no |
| 2 | 404 | no | no |

@skipOnOcV10.3
Scenario Outline: sharing with default expiration date enforced for users, user shares with past expiration date set
Expand All @@ -734,13 +713,13 @@ Feature: a default expiration date can be specified for shares with users or gro
| permissions | read,share |
| expireDateAsString | -10 days |
Then the HTTP status code should be "<http_status_code>"
And the OCS status code should be "<ocs_status_code>"
And the OCS status code should be "404"
And the OCS status message should be "Expiration date is in the past"
And user "Brian" should not have any received shares
Examples:
| ocs_api_version | ocs_status_code | http_status_code |
| 1 | 404 | 200 |
| 2 | 404 | 404 |
| ocs_api_version | http_status_code |
| 1 | 200 |
| 2 | 404 |

@skipOnOcV10.3 @issue-36569
Scenario Outline: sharing with default expiration date enforced for users, max expire date is 0, user shares without specifying expiration date
Expand Down
Loading

0 comments on commit 53d2a38

Please sign in to comment.