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 8, 2022
1 parent e9a7b14 commit 05841b3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 42 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 Down Expand Up @@ -430,6 +406,7 @@ Feature: resharing a resource with an expiration date
#The action of changing the expiration date while resharing should be forbidden
Then the HTTP status code should be "403"
And the OCS status code should be "403"
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 Expand Up @@ -461,6 +438,7 @@ Feature: resharing a resource with an expiration date
| expireDate | +40 days |
Then the HTTP status code should be "403"
And the OCS status code should be "403"
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
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 05841b3

Please sign in to comment.