Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ScharfViktor committed Mar 26, 2024
1 parent 7cc0c1f commit baf8ad9
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ Feature: checking file versions using file id
And user "Alice" has created a share inside of space "Project1" with settings:
| path | testFolder |
| shareWith | Brian |
| role | manager |
And user "Alice" has shared a space "Project1" with settings:
| shareWith | Brian |
| role | manager |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Feature: accept/decline shares coming from internal users
| share_type | user |
| uid_owner | %username% |
| displayname_owner | %displayname% |
| permissions | share,read,update |
| permissions | read,update |
| uid_file_owner | %username% |
| displayname_file_owner | %displayname% |
| state | 0 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Feature: accept/decline shares coming from internal users to the Shares folder
| share_with_displayname | %displayname% |
| file_target | /Shares/textfile0.txt |
| path | /Shares/textfile0.txt |
| permissions | share,read,update |
| permissions | read,update |
| uid_owner | %username% |
| displayname_owner | %displayname% |
| item_type | file |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Feature: sharing
And user "Brian" accepts share "/merge-test-outside-perms" offered by user "Alice" using the sharing API
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 user "Brian" folder "/Shares/merge-test-outside-perms" should contain a property "oc:permissions" with value "SRDNVCK"
And as user "Brian" folder "/Shares/merge-test-outside-perms" should contain a property "oc:permissions" with value "SDNVCK"
And as "Brian" folder "/Shares/merge-test-outside-perms (2)" should not exist


Expand All @@ -56,7 +56,7 @@ Feature: sharing
And user "Brian" accepts share "/merge-test-outside-twogroups-perms" offered by user "Alice" using the sharing API
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 user "Brian" folder "/Shares/merge-test-outside-twogroups-perms" should contain a property "oc:permissions" with value "SRDNVCK"
And as user "Brian" folder "/Shares/merge-test-outside-twogroups-perms" should contain a property "oc:permissions" with value "SDNVCK"
And as "Brian" folder "/Shares/merge-test-outside-twogroups-perms (2)" should not exist


Expand All @@ -70,7 +70,7 @@ Feature: sharing
And user "Brian" accepts share "/merge-test-outside-twogroups-member-perms" offered by user "Alice" using the sharing API
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 user "Brian" folder "/Shares/merge-test-outside-twogroups-member-perms" should contain a property "oc:permissions" with value "SRDNVCK"
And as user "Brian" folder "/Shares/merge-test-outside-twogroups-member-perms" should contain a property "oc:permissions" with value "SDNVCK"
And as "Brian" folder "/Shares/merge-test-outside-twogroups-member-perms (2)" should not exist


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,47 +59,6 @@ Feature: sharing
| 1 | 100 |
| 2 | 200 |

@smokeTest
Scenario Outline: getting all shares of a file with reshares
Given using OCS API version "<ocs-api-version>"
And these users have been created with default attributes and without skeleton files:
| username |
| Carol |
| David |
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Brian" has shared file "/Shares/textfile0.txt" with user "Carol"
When user "Alice" gets all the shares with reshares of the file "textfile0.txt" using the sharing API
Then the OCS status code should be "<ocs-status-code>"
And the HTTP status code should be "200"
And user "Brian" should be included in the response
And user "Carol" should be included in the response
And user "David" should not be included in the response
Examples:
| ocs-api-version | ocs-status-code |
| 1 | 100 |
| 2 | 200 |

@smokeTest
Scenario Outline: resource can be reshared to resource owner
Given using OCS API version "<ocs-api-version>"
And group "grp1" has been created
And user "Carol" has been created with default attributes and without skeleton files
And user "Carol" has been added to group "grp1"
And user "Carol" has created folder "/shared"
And user "Carol" has uploaded file with content "some data" to "/shared/shared_file.txt"
And user "Carol" has shared folder "/shared" with user "Brian"
And user "Brian" has shared folder "/Shares/shared" with group "grp1"
# no need to accept this share as it is Carol's file
When user "Carol" gets all the shares shared with her using the sharing API
Then the OCS status code should be "<ocs-status-code>"
And the HTTP status code should be "200"
And file "/Shares/shared" should be included in the response
Examples:
| ocs-api-version | ocs-status-code |
| 1 | 100 |
| 2 | 200 |

@smokeTest @issue-1226 @issue-1270 @issue-1271
Scenario Outline: getting share info of a share
Given using OCS API version "<ocs-api-version>"
Expand All @@ -117,7 +76,7 @@ Feature: sharing
| file_source | A_STRING |
| file_target | /Shares/file_to_share.txt |
| path | /file_to_share.txt |
| permissions | share,read,update |
| permissions | read,update |
| stime | A_NUMBER |
| storage | A_STRING |
| mail_send | 0 |
Expand Down Expand Up @@ -181,7 +140,7 @@ Feature: sharing
| file_source | A_STRING |
| file_target | /Shares/file_to_share.txt |
| path | /PARENT/file_to_share.txt |
| permissions | share,read,update |
| permissions | read,update |
| stime | A_NUMBER |
| storage | A_STRING |
| mail_send | 0 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ Feature: sharing
And user "Brian" has been added to group "grp1"
And user "Alice" has uploaded file with content "foo" to "/tmp.txt"
And user "Alice" has created a share with settings
| path | /tmp.txt |
| shareType | group |
| permissions | share,update,read |
| shareWith | grp1 |
| path | /tmp.txt |
| shareType | group |
| permissions | update,read |
| shareWith | grp1 |
When user "Brian" gets the following properties of file "/Shares/tmp.txt" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Expand Down Expand Up @@ -144,7 +144,7 @@ Feature: sharing
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "207"
And the single response should contain a property "ocs:share-permissions" with value "15"
And the single response should contain a property "ocs:share-permissions" with value "31"
Examples:
| dav-path-version |
| old |
Expand Down

0 comments on commit baf8ad9

Please sign in to comment.