Skip to content

Commit

Permalink
review addressed
Browse files Browse the repository at this point in the history
  • Loading branch information
SwikritiT committed Aug 27, 2021
1 parent db715bd commit 149a66f
Showing 1 changed file with 36 additions and 86 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,39 +115,8 @@ Feature: share resources where the sharee receives the share in multiple ways
| 1 | 100 |
| 2 | 200 |

@skipOnOcis
Scenario Outline: multiple users share a file with the same name but different permissions to a user
Given using OCS API version "<ocs_api_version>"
And user "Carol" has been created with default attributes and without skeleton files
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" accepts share "/randomfile.txt" offered by user "Brian" 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
| uid_owner | %username% |
| share_with | %username% |
| file_target | /Shares/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" accepts share "/randomfile.txt" offered by user "Carol" 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
| uid_owner | %username% |
| share_with | %username% |
| file_target | /Shares/randomfile (2).txt |
| item_type | file |
| permissions | read,update |
And the content of file "/Shares/randomfile.txt" for user "Alice" should be "First data"
And the content of file "/Shares/randomfile (2).txt" for user "Alice" should be "Second data"
Examples:
| ocs_api_version |
| 1 |
| 2 |

@skipOnOcV10 @issue-ocis-2131
Scenario Outline: multiple users share a file with the same name but different permissions to a user in ocis
Scenario Outline: multiple users share a file with the same name but different permissions to a user
Given using OCS API version "<ocs_api_version>"
And user "Carol" has been created with default attributes and without skeleton files
And user "Brian" has uploaded file with content "First data" to "/randomfile.txt"
Expand All @@ -158,26 +127,33 @@ Feature: share resources where the sharee receives the share in multiple ways
Then the fields of the last response about user "Brian" sharing with user "Alice" should include
| uid_owner | %username% |
| share_with | %username% |
| file_target | /randomfile.txt |
| file_target | <file_target_1> |
| 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" accepts share "/randomfile.txt" offered by user "Carol" 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
| uid_owner | %username% |
| share_with | %username% |
| file_target | /randomfile (2).txt |
| item_type | file |
| permissions | read,update |
| uid_owner | %username% |
| share_with | %username% |
| file_target | <file_target_2> |
| item_type | file |
| permissions | read,update |
And the content of file "/Shares/randomfile.txt" for user "Alice" should be "First data"
And the content of file "/Shares/randomfile (2).txt" for user "Alice" should be "Second data"
@skipOnOcis
Examples:
| ocs_api_version |
| 1 |
| 2 |
| ocs_api_version | file_target_1 | file_target_2 |
| 1 | /Shares/randomfile.txt | /Shares/randomfile (2).txt |
| 2 | /Shares/randomfile.txt | /Shares/randomfile (2).txt |

@skipOnOcV10 @issue-ocis-2131
Examples:
| ocs_api_version | file_target_1 | file_target_2 |
| 1 | /randomfile.txt | /randomfile (2).txt |
| 2 | /randomfile.txt | /randomfile (2).txt |


@skipOnOcis
Scenario Outline: multiple users share a folder with the same name to a user
Given using OCS API version "<ocs_api_version>"
And user "Carol" has been created with default attributes and without skeleton files
Expand All @@ -189,59 +165,33 @@ Feature: share resources where the sharee receives the share in multiple ways
And user "Alice" accepts share "/zzzfolder" offered by user "Brian" 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
| uid_owner | %username% |
| share_with | %username% |
| file_target | /Shares/zzzfolder |
| item_type | folder |
| permissions | read,delete |
| uid_owner | %username% |
| share_with | %username% |
| file_target | <file_target_1> |
| 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" accepts share "/zzzfolder" offered by user "Carol" 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
| uid_owner | %username% |
| share_with | %username% |
| file_target | /Shares/zzzfolder (2) |
| item_type | folder |
| permissions | read,share |
| uid_owner | %username% |
| share_with | %username% |
| file_target | <file_target_2> |
| item_type | folder |
| permissions | read,share |
And as "Alice" folder "/Shares/zzzfolder/Brian" should exist
And as "Alice" folder "/Shares/zzzfolder (2)/Carol" should exist
@skipOnOcis
Examples:
| ocs_api_version |
| 1 |
| 2 |
| ocs_api_version | file_target_1 | file_target_2 |
| 1 | /Shares/zzzfolder | /Shares/zzzfolder (2) |
| 2 | /Shares/zzzfolder | /Shares/zzzfolder (2) |

@skipOnOcV10 @issue-ocis-2131
Scenario Outline: multiple users share a folder with the same name to a user in ocis
Given using OCS API version "<ocs_api_version>"
And user "Carol" has been created with default attributes and without skeleton files
And user "Brian" has created folder "/zzzfolder"
And user "Brian" has created folder "zzzfolder/Brian"
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" accepts share "/zzzfolder" offered by user "Brian" 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
| 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" accepts share "/zzzfolder" offered by user "Carol" 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
| uid_owner | %username% |
| share_with | %username% |
| file_target | /zzzfolder (2) |
| item_type | folder |
| permissions | read,share |
And as "Alice" folder "/Shares/zzzfolder/Brian" should exist
And as "Alice" folder "/Shares/zzzfolder (2)/Carol" should exist
@skipOnOcV10 @issue-ocis-2131
Examples:
| ocs_api_version |
| 1 |
| 2 |
| ocs_api_version | file_target_1 | file_target_2 |
| 1 | /zzzfolder | /zzzfolder (2) |
| 2 | /zzzfolder | /zzzfolder (2) |

@skipOnEncryptionType:user-keys @encryption-issue-132 @skipOnLDAP
Scenario Outline: share with a group and then add a user to that group that already has a file with the shared name
Expand Down

0 comments on commit 149a66f

Please sign in to comment.