refactor scenario example table (#6694)

This commit is contained in:
Prajwol Amatya
2023-07-04 15:54:16 +05:45
committed by GitHub
parent 6535e689a2
commit 941ef59cc9
27 changed files with 353 additions and 420 deletions
@@ -21,13 +21,13 @@ Feature: a subfolder of a received share can be reshared
When user "Brian" shares folder "/Shares/TMP/SUB" with user "Carol" with permissions "share,read" 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 be able to accept pending share "<pending_sub_share_path>" offered by user "Brian"
And user "Carol" should be able to accept pending share "/SUB" offered by user "Brian"
And as "Carol" folder "/Shares/SUB" should exist
And as "Brian" folder "/Shares/TMP/SUB" should exist
Examples:
| ocs_api_version | ocs_status_code | pending_sub_share_path |
| 1 | 100 | /SUB |
| 2 | 200 | /SUB |
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
Scenario Outline: user is not allowed to reshare a sub-folder with more permissions
@@ -89,7 +89,7 @@ Feature: a subfolder of a received share can be reshared
And user "Alice" has shared folder "/TMP" with user "Brian" with permissions "share,create,update,read"
And user "Brian" has accepted share "/TMP" offered by user "Alice"
And user "Brian" has shared folder "/Shares/TMP/SUB" with user "Carol" with permissions "share,create,update,read"
And user "Carol" has accepted share "<pending_sub_share_path>" offered by user "Brian"
And user "Carol" has accepted share "/SUB" offered by user "Brian"
When user "Brian" updates the last share using the sharing API with
| permissions | share,read |
Then the OCS status code should be "<ocs_status_code>"
@@ -99,9 +99,9 @@ Feature: a subfolder of a received share can be reshared
And as "Brian" folder "/Shares/TMP/SUB" should exist
And user "Brian" should be able to upload file "filesForUpload/textfile.txt" to "/Shares/TMP/SUB/textfile.txt"
Examples:
| ocs_api_version | ocs_status_code | pending_sub_share_path |
| 1 | 100 | /SUB |
| 2 | 200 | /SUB |
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
@issue-2214
Scenario Outline: user is allowed to update reshare of a sub-folder to the maximum allowed permissions
@@ -109,7 +109,7 @@ Feature: a subfolder of a received share can be reshared
And user "Alice" has shared folder "/TMP" with user "Brian" with permissions "share,create,update,read"
And user "Brian" has accepted share "/TMP" offered by user "Alice"
And user "Brian" has shared folder "/Shares/TMP/SUB" with user "Carol" with permissions "share,read"
And user "Carol" has accepted share "<pending_sub_share_path>" offered by user "Brian"
And user "Carol" has accepted share "/SUB" offered by user "Brian"
When user "Brian" updates the last share using the sharing API with
| permissions | share,create,update,read |
Then the OCS status code should be "<ocs_status_code>"
@@ -119,9 +119,9 @@ Feature: a subfolder of a received share can be reshared
And as "Brian" folder "/Shares/TMP/SUB" should exist
And user "Brian" should be able to upload file "filesForUpload/textfile.txt" to "/Shares/TMP/SUB/textfile.txt"
Examples:
| ocs_api_version | ocs_status_code | pending_sub_share_path |
| 1 | 100 | /SUB |
| 2 | 200 | /SUB |
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
@issue-2214
Scenario Outline: user is not allowed to update reshare of a sub-folder with more permissions
@@ -129,7 +129,7 @@ Feature: a subfolder of a received share can be reshared
And user "Alice" has shared folder "/TMP" with user "Brian" with permissions "share,read"
And user "Brian" has accepted share "/TMP" offered by user "Alice"
And user "Brian" has shared folder "/Shares/TMP/SUB" with user "Carol" with permissions "share,read"
And user "Carol" has accepted share "<pending_sub_share_path>" offered by user "Brian"
And user "Carol" has accepted share "/SUB" offered by user "Brian"
When user "Brian" updates the last share using the sharing API with
| permissions | all |
Then the OCS status code should be "404"
@@ -139,6 +139,6 @@ Feature: a subfolder of a received share can be reshared
And as "Brian" folder "/Shares/TMP/SUB" should exist
But user "Brian" should not be able to upload file "filesForUpload/textfile.txt" to "/Shares/TMP/SUB/textfile.txt"
Examples:
| ocs_api_version | http_status_code | pending_sub_share_path |
| 1 | 200 | /SUB |
| 2 | 404 | /SUB |
| ocs_api_version | http_status_code |
| 1 | 200 |
| 2 | 404 |