Skip to content

Commit

Permalink
[tests-only][full-ci]added then steps for apiShareCreateSpecialToRoot…
Browse files Browse the repository at this point in the history
…1 suite (#39861)

* added then steps for apiShareCreateSpecialToRoot1 suite

fixed php style

addressed review

* Addressed reviews

Signed-off-by: Parajuli Kiran <[email protected]>

* Adjust reviews in apiShareCreateSpecialToShares1/createShareReceivedInMultipleWays.feature

Signed-off-by: Parajuli Kiran <[email protected]>
Signed-off-by: Kiran Parajuli <[email protected]>

Co-authored-by: Parajuli Kiran <[email protected]>
  • Loading branch information
sushmita56 and kiranparajuli589 authored Apr 6, 2022
1 parent a0f849e commit 906c79a
Show file tree
Hide file tree
Showing 7 changed files with 470 additions and 297 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Feature: share resources where the sharee receives the share in multiple ways
And the fields of the last response to user "Alice" sharing with user "Brian" should include
| share_with | %username% |
| share_with_displayname | %displayname% |
| file_target | /textfile0.txt |
| path | /textfile0.txt |
| file_target | /textfile0.txt |
| path | /textfile0.txt |
| permissions | share,read,update |
| uid_owner | %username% |
| displayname_owner | %displayname% |
Expand All @@ -43,13 +43,13 @@ Feature: share resources where the sharee receives the share in multiple ways
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/PARENT/CHILD/child.txt"
When user "Alice" shares folder "/PARENT" with user "Brian" using the sharing API
And user "Alice" shares folder "/PARENT/CHILD" with group "grp4" using the sharing API
Then user "Brian" should see the following elements
| /PARENT/ |
| /PARENT/parent.txt |
| /CHILD/ |
| /CHILD/child.txt |
And the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
Then the OCS status code of responses on all endpoints should be "<ocs_status_code>"
And the HTTP status code of responses on all endpoints should be "200"
And user "Brian" should see the following elements
| /PARENT/ |
| /PARENT/parent.txt |
| /CHILD/ |
| /CHILD/child.txt |
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
Expand Down Expand Up @@ -100,16 +100,16 @@ Feature: share resources where the sharee receives the share in multiple ways
And user "Brian" has uploaded file with content "First data" to "/randomfile.txt"
And user "Carol" has uploaded file with content "Second data" to "/randomfile.txt"
When user "Brian" shares file "randomfile.txt" with user "Alice" with permissions "read" using the sharing API
And user "Alice" gets the info of the last share using the sharing API
Then the fields of the last response about user "Brian" sharing with user "Alice" should include
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And as "Alice" the info about the last share by user "Brian" with user "Alice" should include
| uid_owner | %username% |
| share_with | %username% |
| file_target | /randomfile.txt |
| item_type | file |
| permissions | read |
When user "Carol" shares file "randomfile.txt" with user "Alice" with permissions "read,update" using the sharing API
And user "Alice" gets the info of the last share using the sharing API
Then the fields of the last response about user "Carol" sharing with user "Alice" should include
And as "Alice" the info about the last share by user "Carol" with user "Alice" should include
| uid_owner | %username% |
| share_with | %username% |
| file_target | /randomfile (2).txt |
Expand All @@ -118,9 +118,9 @@ Feature: share resources where the sharee receives the share in multiple ways
And the content of file "randomfile.txt" for user "Alice" should be "First data"
And the content of file "randomfile (2).txt" for user "Alice" should be "Second data"
Examples:
| ocs_api_version |
| 1 |
| 2 |
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |

@issue-ocis-2131
Scenario Outline: multiple users share a folder with the same name to a user
Expand All @@ -134,16 +134,14 @@ Feature: share resources where the sharee receives the share in multiple ways
And user "Carol" has created folder "/zzzfolder"
And user "Carol" has created folder "zzzfolder/Carol"
When user "Brian" shares folder "zzzfolder" with user "Alice" with permissions "read,delete" using the sharing API
And user "Alice" gets the info of the last share using the sharing API
Then the fields of the last response about user "Brian" sharing with user "Alice" should include
And as "Alice" the info about the last share by user "Brian" with user "Alice" should include
| uid_owner | %username% |
| share_with | %username% |
| file_target | /zzzfolder |
| item_type | folder |
| permissions | read,delete |
When user "Carol" shares folder "zzzfolder" with user "Alice" with permissions "read,share" using the sharing API
And user "Alice" gets the info of the last share using the sharing API
Then the fields of the last response about user "Carol" sharing with user "Alice" should include
And as "Alice" the info about the last share by user "Carol" with user "Alice" should include
| uid_owner | %username% |
| share_with | %username% |
| file_target | /zzzfolder (2) |
Expand Down Expand Up @@ -171,10 +169,12 @@ Feature: share resources where the sharee receives the share in multiple ways
And user "Carol" has uploaded file with content "My content" to "lorem.txt"
When user "Alice" shares file "lorem.txt" with group "grp1" using the sharing API
And the administrator adds user "Carol" to group "grp1" using the provisioning API
Then the content of file "lorem.txt" for user "Brian" should be "Shared content"
Then the OCS status code of responses on all endpoints should be "<ocs_status_code>"
And the HTTP status code of responses on all endpoints should be "200"
And the content of file "lorem.txt" for user "Brian" should be "Shared content"
And the content of file "lorem.txt" for user "Carol" should be "My content"
And the content of file "lorem (2).txt" for user "Carol" should be "Shared content"
Examples:
| ocs_api_version |
| 1 |
| 2 |
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Feature: Sharing resources with different case names with the sharee and checkin
| 123textfile.txt |
| textfile.XYZ.txt |
And user "Brian" has uploaded the following files with content "some data"
| path |
| path |
| TEXTFILE.txt |
| TEXT_FILE.txt |
| 123TEXTFILE.txt |
Expand All @@ -28,8 +28,10 @@ Feature: Sharing resources with different case names with the sharee and checkin
| text_file.txt |
| 123textfile.txt |
| textfile.XYZ.txt |
Then as "Brian" the following files should exist
| path |
Then the OCS status code of responses on all endpoints should be "100"
And the HTTP status code of responses on all endpoints should be "200"
And as "Brian" the following files should exist
| path |
| TEXTFILE.txt |
| TEXT_FILE.txt |
| 123TEXTFILE.txt |
Expand Down Expand Up @@ -59,7 +61,9 @@ Feature: Sharing resources with different case names with the sharee and checkin
| /F_O/ |
| /123FO/ |
| /FO.XYZ/ |
Then as "Brian" the following folders should exist
Then the OCS status code of responses on all endpoints should be "100"
And the HTTP status code of responses on all endpoints should be "200"
And as "Brian" the following folders should exist
| path |
| /FO/ |
| /F_O/ |
Expand Down Expand Up @@ -90,12 +94,14 @@ Feature: Sharing resources with different case names with the sharee and checkin
| case_sensitive.txt |
| 123CASE_SENSITIVE.txt |
| casesensitive.xyz.txt |
Then as "Brian" the following folders should exist
| path |
| /CASESENSITIVE/ |
| /CASE_SENSITIVE/ |
| /123case_sensitive/ |
| /CASESENSITIVE.xyz/ |
Then the OCS status code of responses on all endpoints should be "100"
And the HTTP status code of responses on all endpoints should be "200"
And as "Brian" the following folders should exist
| path |
| /CASESENSITIVE/ |
| /CASE_SENSITIVE/ |
| /123case_sensitive/ |
| /CASESENSITIVE.xyz/ |
And as "Brian" the following files should exist
| path |
| casesensitive.txt |
Expand Down Expand Up @@ -123,18 +129,20 @@ Feature: Sharing resources with different case names with the sharee and checkin
| /CASE_SENSITIVE/ |
| /123case_sensitive/ |
| /CASESENSITIVE.xyz/ |
Then as "Brian" the following files should exist
Then the OCS status code of responses on all endpoints should be "100"
And the HTTP status code of responses on all endpoints should be "200"
And as "Brian" the following files should exist
| path |
| casesensitive.txt |
| case_sensitive.txt |
| 123CASE_SENSITIVE.txt |
| casesensitive.xyz.txt |
And as "Brian" the following folders should exist
| path |
| /CASESENSITIVE/ |
| /CASE_SENSITIVE/ |
| /123case_sensitive/ |
| /CASESENSITIVE.xyz/ |
| path |
| /CASESENSITIVE/ |
| /CASE_SENSITIVE/ |
| /123case_sensitive/ |
| /CASESENSITIVE.xyz/ |


Scenario: sharing file with group members that has existing files with different case names
Expand All @@ -147,7 +155,7 @@ Feature: Sharing resources with different case names with the sharee and checkin
| 123textfile.txt |
| textfile.XYZ.txt |
And user "Brian" has uploaded the following files with content "some data"
| path |
| path |
| TEXTFILE.txt |
| TEXT_FILE.txt |
| 123TEXTFILE.txt |
Expand All @@ -158,8 +166,10 @@ Feature: Sharing resources with different case names with the sharee and checkin
| text_file.txt |
| 123textfile.txt |
| textfile.XYZ.txt |
Then as "Brian" the following files should exist
| path |
Then the OCS status code of responses on all endpoints should be "100"
And the HTTP status code of responses on all endpoints should be "200"
And as "Brian" the following files should exist
| path |
| TEXTFILE.txt |
| TEXT_FILE.txt |
| 123TEXTFILE.txt |
Expand Down Expand Up @@ -191,7 +201,9 @@ Feature: Sharing resources with different case names with the sharee and checkin
| /F_O/ |
| /123FO/ |
| /FO.XYZ/ |
Then as "Brian" the following folders should exist
Then the OCS status code of responses on all endpoints should be "100"
And the HTTP status code of responses on all endpoints should be "200"
And as "Brian" the following folders should exist
| path |
| /fo/ |
| /f_o/ |
Expand Down Expand Up @@ -224,12 +236,14 @@ Feature: Sharing resources with different case names with the sharee and checkin
| case_sensitive.txt |
| 123CASE_SENSITIVE.txt |
| casesensitive.xyz.txt |
Then as "Brian" the following folders should exist
| path |
| /CASESENSITIVE/ |
| /CASE_SENSITIVE/ |
| /123case_sensitive/ |
| /CASESENSITIVE.xyz/ |
Then the OCS status code of responses on all endpoints should be "100"
And the HTTP status code of responses on all endpoints should be "200"
And as "Brian" the following folders should exist
| path |
| /CASESENSITIVE/ |
| /CASE_SENSITIVE/ |
| /123case_sensitive/ |
| /CASESENSITIVE.xyz/ |
And as "Brian" the following files should exist
| path |
| casesensitive.txt |
Expand Down Expand Up @@ -258,15 +272,17 @@ Feature: Sharing resources with different case names with the sharee and checkin
| /CASE_SENSITIVE/ |
| /123case_sensitive/ |
| /CASESENSITIVE.xyz/ |
Then as "Brian" the following files should exist
Then the OCS status code of responses on all endpoints should be "100"
And the HTTP status code of responses on all endpoints should be "200"
And as "Brian" the following files should exist
| path |
| casesensitive.txt |
| case_sensitive.txt |
| 123CASE_SENSITIVE.txt |
| casesensitive.xyz.txt |
And as "Brian" the following folders should exist
| path |
| /CASESENSITIVE/ |
| /CASE_SENSITIVE/ |
| /123case_sensitive/ |
| /CASESENSITIVE.xyz/ |
| path |
| /CASESENSITIVE/ |
| /CASE_SENSITIVE/ |
| /123case_sensitive/ |
| /CASESENSITIVE.xyz/ |
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Feature: resources shared with the same name are received with unique names
And user "Brian" has created folder "/foo"
When user "Alice" shares folder "/foo" with user "Carol" using the sharing API
And user "Brian" shares folder "/foo" with user "Carol" using the sharing API
Then user "Carol" should see the following elements
| /foo/ |
Then the OCS status code of responses on all endpoints should be "100"
And the HTTP status code of responses on all endpoints should be "200"
And user "Carol" should see the following elements
| /foo/ |
| /foo (2)/ |
Loading

0 comments on commit 906c79a

Please sign in to comment.