Skip to content

Commit

Permalink
Merge pull request #9080 from owncloud/use-sharingNG-in-given-steps-a…
Browse files Browse the repository at this point in the history
…piSpacesShares-suite

[full-ci] [tests-only] Used sharing-ng in given steps
  • Loading branch information
grgprarup authored May 7, 2024
2 parents 571689a + 3795a95 commit ee1eccb
Show file tree
Hide file tree
Showing 6 changed files with 409 additions and 207 deletions.
1 change: 1 addition & 0 deletions tests/acceptance/config/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ default:
- ArchiverContext:
- GraphContext:
- OcisConfigContext:
- SharingNgContext:

apiContract:
paths:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,10 @@ The expected failures in this file are from features in the owncloud/ocis repo.
- [apiArchiver/downloadById.feature:165](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiArchiver/downloadById.feature#L165)
- [apiArchiver/downloadById.feature:166](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiArchiver/downloadById.feature#L166)

### [PROPFIND on accepted shares with identical names containing brackets exit with 404](https://github.com/owncloud/ocis/issues/4421)

- [apiSpacesShares/changingFilesShare.feature:14](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/changingFilesShare.feature#L14)

### [Shared mount folder gets deleted when overwritten by a file from personal space](https://github.com/owncloud/ocis/issues/7208)

- [apiSpacesShares/copySpaces.feature:512](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/copySpaces.feature#L512)
- [apiSpacesShares/copySpaces.feature:525](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/copySpaces.feature#L525)
- [apiSpacesShares/copySpaces.feature:629](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/copySpaces.feature#L629)
- [apiSpacesShares/copySpaces.feature:647](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/copySpaces.feature#L647)

#### [PATCH request for TUS upload with wrong checksum gives incorrect response](https://github.com/owncloud/ocis/issues/1755)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,36 @@ Feature: change shared resource
And user "Alice" has created folder "/PARENT"
And user "Brian" has created folder "/PARENT"
And user "Alice" has moved file "textfile0.txt" to "PARENT/from_alice.txt" in space "Personal"
And user "Alice" has shared folder "/PARENT" with user "Carol"
And user "Brian" has shared folder "/PARENT" with user "Carol"
And user "Alice" has sent the following share invitation:
| resource | PARENT |
| space | Personal |
| sharee | Carol |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has sent the following share invitation:
| resource | PARENT |
| space | Personal |
| sharee | Carol |
| shareType | user |
| permissionsRole | Editor |
When user "Carol" moves file "PARENT/from_alice.txt" to "PARENT (1)/from_alice.txt" in space "Shares" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Carol" folder "PARENT" of the space "Shares" should not contain these entries:
Then the HTTP status code should be "502"
And for user "Carol" folder "PARENT" of the space "Shares" should contain these entries:
| from_alice.txt |
And for user "Carol" folder "PARENT (1)" of the space "Shares" should contain these entries:
And for user "Carol" folder "PARENT (1)" of the space "Shares" should not contain these entries:
| from_alice.txt |


Scenario Outline: overwrite a received file share
Given the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
And user "Alice" has uploaded file with content "old content version 1" to "/textfile1.txt"
And user "Alice" has uploaded file with content "old content version 2" to "/textfile1.txt"
And user "Alice" has shared file "/textfile1.txt" with user "Brian"
And user "Alice" has sent the following share invitation:
| resource | textfile1.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
When user "Brian" uploads a file inside space "Shares" with content "this is a new content" to "textfile1.txt" using the WebDAV API
Then the HTTP status code should be "204"
And for user "Brian" the space "Shares" should contain these entries:
Expand Down
14 changes: 12 additions & 2 deletions tests/acceptance/features/apiSpacesShares/checksum.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,25 @@ Feature: checksums
@issue-1291
Scenario: sharing a file with checksum should return the checksum in the propfind using new DAV path
Given user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
And user "Alice" has shared file "/myChecksumFile.txt" with user "Brian"
And user "Alice" has sent the following share invitation:
| resource | myChecksumFile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
When user "Brian" requests the checksum of file "/myChecksumFile.txt" in space "Shares" via propfind using the WebDAV API
Then the HTTP status code should be "207"
And the webdav checksum should match "SHA1:3ee962b839762adb0ad8ba6023a4690be478de6f MD5:d70b40f177b14b470d1756a3c12b963a ADLER32:8ae90960"

@issue-1291
Scenario: modifying a shared file should return correct checksum in the propfind using new DAV path
Given user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
And user "Alice" has shared file "/myChecksumFile.txt" with user "Brian"
And user "Alice" has sent the following share invitation:
| resource | myChecksumFile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
When user "Brian" uploads file with checksum "SHA1:ce5582148c6f0c1282335b87df5ed4be4b781399" and content "Some Text" to "/myChecksumFile.txt" in space "Shares" using the WebDAV API
Then the HTTP status code should be "204"
And as user "Alice" the webdav checksum of "/myChecksumFile.txt" via propfind should match "SHA1:ce5582148c6f0c1282335b87df5ed4be4b781399 MD5:56e57920c3c8c727bfe7a5288cdf61c4 ADLER32:1048035a"
Loading

0 comments on commit ee1eccb

Please sign in to comment.