Skip to content

Commit

Permalink
Improve Then step in apiShareReshareToShares3 suite
Browse files Browse the repository at this point in the history
  • Loading branch information
amrita-shrestha committed Apr 19, 2022
1 parent e98e41f commit 3675d80
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ Feature: sharing
| permissions | create,update,read |
When user "Brian" deletes 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 user "Carol" should not have any received shares
Examples:
| ocs_api_version | ocs_status_code |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ Feature: resharing a resource with an expiration date
| expireDate | +3 days |
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
When user "Carol" accepts share "/textfile0.txt" offered by user "Brian" using the sharing API
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
And user "Carol" should be able to accept pending share "/textfile0.txt" offered by user "Brian"
And the information of the last share of user "Brian" should include
| expiration | +3 days |
And the response when user "Carol" gets the info of the last share should include
Expand All @@ -52,9 +50,7 @@ Feature: resharing a resource with an expiration date
| expireDate | +3 days |
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
When user "Carol" accepts share "/textfile0.txt" offered by user "Brian" using the sharing API
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
And user "Carol" should be able to accept pending share "/textfile0.txt" offered by user "Brian"
And the information of the last share of user "Brian" should include
| expiration | +3 days |
And the response when user "Carol" gets the info of the last share should include
Expand All @@ -80,9 +76,7 @@ Feature: resharing a resource with an expiration date
| shareWith | Carol |
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
When user "Carol" accepts share "/textfile0.txt" offered by user "Brian" using the sharing API
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
And user "Carol" should be able to accept pending share "/textfile0.txt" offered by user "Brian"
And the information of the last share of user "Brian" should include
| expiration | <expected-expire-date> |
And the response when user "Carol" gets the info of the last share should include
Expand Down Expand Up @@ -112,9 +106,7 @@ Feature: resharing a resource with an expiration date
| shareWith | grp1 |
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
When user "Carol" accepts share "/textfile0.txt" offered by user "Brian" using the sharing API
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
And user "Carol" should be able to accept pending share "/textfile0.txt" offered by user "Brian"
And the information of the last share of user "Brian" should include
| expiration | <expected-expire-date> |
And the response when user "Carol" gets the info of the last share should include
Expand All @@ -141,9 +133,7 @@ Feature: resharing a resource with an expiration date
| shareWith | Carol |
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
When user "Carol" accepts share "/textfile0.txt" offered by user "Brian" using the sharing API
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
And user "Carol" should be able to accept pending share "/textfile0.txt" offered by user "Brian"
And the information of the last share of user "Brian" should include
| expiration | <expected-expire-date> |
And the response when user "Carol" gets the info of the last share should include
Expand Down Expand Up @@ -172,9 +162,7 @@ Feature: resharing a resource with an expiration date
| shareWith | grp1 |
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
When user "Carol" accepts share "/textfile0.txt" offered by user "Brian" using the sharing API
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
And user "Carol" should be able to accept pending share "/textfile0.txt" offered by user "Brian"
And the information of the last share of user "Brian" should include
| expiration | <expected-expire-date> |
And the response when user "Carol" gets the info of the last share should include
Expand Down Expand Up @@ -203,9 +191,7 @@ Feature: resharing a resource with an expiration date
| expireDate | +20 days |
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
When user "Carol" accepts share "/textfile0.txt" offered by user "Brian" using the sharing API
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
And user "Carol" should be able to accept pending share "/textfile0.txt" offered by user "Brian"
And the information of the last share of user "Brian" should include
| expiration | +20 days |
And the response when user "Carol" gets the info of the last share should include
Expand Down Expand Up @@ -236,9 +222,7 @@ Feature: resharing a resource with an expiration date
| expireDate | +20 days |
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
When user "Carol" accepts share "/textfile0.txt" offered by user "Brian" using the sharing API
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
And user "Carol" should be able to accept pending share "/textfile0.txt" offered by user "Brian"
And the information of the last share of user "Brian" should include
| expiration | +20 days |
And the response when user "Carol" gets the info of the last share should include
Expand Down Expand Up @@ -293,9 +277,7 @@ Feature: resharing a resource with an expiration date
| shareWith | Carol |
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
When user "Carol" accepts share "/textfile0.txt" offered by user "Brian" using the sharing API
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
And user "Carol" should be able to accept pending share "/textfile0.txt" offered by user "Brian"
And the information of the last share of user "Brian" should include
| expiration | <expected-expire-date> |
And the response when user "Carol" gets the info of the last share should include
Expand Down Expand Up @@ -326,9 +308,7 @@ Feature: resharing a resource with an expiration date
| expireDate | +20 days |
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
When user "Carol" accepts share "/textfile0.txt" offered by user "Brian" using the sharing API
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
And user "Carol" should be able to accept pending share "/textfile0.txt" offered by user "Brian"
And the information of the last share of user "Brian" should include
| expiration | <expected-expire-date> |
And the response when user "Carol" gets the info of the last share should include
Expand Down Expand Up @@ -356,9 +336,7 @@ Feature: resharing a resource with an expiration date
| shareWith | Carol |
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
When user "Carol" accepts share "/textfile0.txt" offered by user "Brian" using the sharing API
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
And user "Carol" should be able to accept pending share "/textfile0.txt" offered by user "Brian"
And the information of the last share of user "Brian" should include
| expiration | |
And the response when user "Carol" gets the info of the last share should include
Expand Down Expand Up @@ -391,9 +369,7 @@ Feature: resharing a resource with an expiration date
| shareWith | Carol |
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
When user "Carol" accepts share "/textfile0.txt" offered by user "Brian" using the sharing API
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
And user "Carol" should be able to accept pending share "/textfile0.txt" offered by user "Brian"
And the information of the last share of user "Alice" should include
| expiration | +20 days |
And the response when user "Carol" gets the info of the last share should include
Expand All @@ -408,7 +384,7 @@ Feature: resharing a resource with an expiration date
| 2 | no | no | 200 |

@skipOnOcV10 @skipOnOcV10.3 @issue-37013
Scenario Outline: reshare can extend the received expiry date further into the future
Scenario Outline: reshare cannot extend the received expiry date further into the future
Given using OCS API version "<ocs_api_version>"
And parameter "shareapi_default_expire_date_user_share" of app "core" has been set to "<default-expire-date>"
And parameter "shareapi_enforce_expire_date_user_share" of app "core" has been set to "no"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ Feature: resharing a resource with an expiration date
| shareWith | Carol |
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
When user "Carol" accepts share "/textfile0.txt" offered by user "Brian" using the sharing API
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
And user "Carol" should be able to accept pending share "/textfile0.txt" offered by user "Brian"
And the information of the last share of user "Alice" should include
| expiration | +20 days |
And the response when user "Carol" gets the info of the last share should include
Expand Down Expand Up @@ -69,9 +67,7 @@ Feature: resharing a resource with an expiration date
| expireDate | +40 days |
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
When user "Carol" accepts share "/textfile0.txt" offered by user "Brian" using the sharing API
Then the HTTP status code should be "200"
And the OCS status code should be "<ocs_status_code>"
And user "Carol" should be able to accept pending share "/textfile0.txt" offered by user "Brian"
And the information of the last share of user "Alice" should include
| expiration | +20 days |
And the response when user "Carol" gets the info of the last share should include
Expand Down Expand Up @@ -105,6 +101,7 @@ Feature: resharing a resource with an expiration date
| expireDate | +40 days |
Then the HTTP status code should be "<http_status_code>"
And the OCS status code should be "404"
And the sharing API should report to user "Carol" that no shares are in the pending state
And the information of the last share of user "Alice" should include
| expiration | +20 days |
Examples:
Expand Down

0 comments on commit 3675d80

Please sign in to comment.