[test-only] fix tests after auto-accepting enabling (#7527)

* fix test

* fix preview test
This commit is contained in:
Viktor Scharf
2023-10-19 16:29:10 +02:00
committed by GitHub
parent fbfb1a041b
commit a9ddfec182
7 changed files with 75 additions and 80 deletions

View File

@@ -168,16 +168,18 @@ File and sync features in a shared scenario
#### [sharing the shares folder to users exits with different status code than in oc10 backend](https://github.com/owncloud/ocis/issues/2215)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:648](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L648)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:649](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L649)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:666](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L666)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:667](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L667)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:681](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L681)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:682](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L682)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:653](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L653)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:654](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L654)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:671](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L671)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:672](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L672)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:686](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L686)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:687](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L687)
#### [file_target of an auto-renamed file is not correct directly after sharing](https://github.com/owncloud/core/issues/32322)
- [coreApiShareManagementToShares/mergeShare.feature:112](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/mergeShare.feature#L112)
- [coreApiShareManagementToShares/mergeShare.feature:132](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/mergeShare.feature#L132)
#### [File deletion using dav gives unique string in filename in the trashbin](https://github.com/owncloud/product/issues/178)
@@ -251,7 +253,7 @@ cannot share a folder with create permission
- [coreApiShareOperationsToShares1/changingFilesShare.feature:66](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares1/changingFilesShare.feature#L66)
- [coreApiShareOperationsToShares1/changingFilesShare.feature:85](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares1/changingFilesShare.feature#L85)
- [coreApiShareOperationsToShares1/changingFilesShare.feature:86](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares1/changingFilesShare.feature#L86)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:468](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L468)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:473](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L473)
- [coreApiWebdavMove2/moveShareOnOcis.feature:28](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature#L28)
- [coreApiWebdavMove2/moveShareOnOcis.feature:30](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature#L30)
- [coreApiWebdavMove2/moveShareOnOcis.feature:93](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOcis.feature#L93)
@@ -295,8 +297,8 @@ cannot share a folder with create permission
#### [Share lists deleted user as 'user'](https://github.com/owncloud/ocis/issues/903)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:588](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L588)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:589](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L589)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:593](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L593)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:594](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L594)
#### [deleting a share with wrong authentication returns OCS status 996 / HTTP 500](https://github.com/owncloud/ocis/issues/1229)
@@ -430,8 +432,8 @@ And other missing implementation of favorites
#### [Sharing a same file twice to the same group](https://github.com/owncloud/ocis/issues/1710)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:632](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L632)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:633](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L633)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:637](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L637)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:638](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L638)
#### [PATCH request for TUS upload with wrong checksum gives incorrect response](https://github.com/owncloud/ocis/issues/1755)
@@ -499,8 +501,8 @@ And other missing implementation of favorites
#### [Shares to deleted group listed in the response](https://github.com/owncloud/ocis/issues/2441)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:464](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L464)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:465](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L465)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:469](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L469)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:470](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L470)
#### [copying the file inside Shares folder returns 404](https://github.com/owncloud/ocis/issues/3874)
@@ -608,19 +610,5 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers
- [coreApiShareCreateSpecialToShares2/createShareDefaultFolderForReceivedShares.feature:22](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareDefaultFolderForReceivedShares.feature#L22)
- [coreApiShareCreateSpecialToShares2/createShareDefaultFolderForReceivedShares.feature:23](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareDefaultFolderForReceivedShares.feature#L23)
#### [List of failed tests after enabling auto-accept] (https://github.com/owncloud/ocis/issues/7504)
- [coreApiWebdavPreviews/previews.feature:224](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L224)
- [coreApiShareManagementToShares/acceptShares.feature:217](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L217)
- [coreApiShareManagementToShares/mergeShare.feature:132](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/mergeShare.feature#L132)
- [coreApiShareOperationsToShares1/gettingShares.feature:99](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares1/gettingShares.feature#L99)
- [coreApiShareOperationsToShares1/gettingShares.feature:100](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares1/gettingShares.feature#L100)
- [coreApiShareOperationsToShares1/gettingSharesPendingFiltered.feature:41](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares1/gettingSharesPendingFiltered.feature#L41)
- [coreApiShareOperationsToShares1/gettingSharesPendingFiltered.feature:42](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares1/gettingSharesPendingFiltered.feature#L42)
- [coreApiShareOperationsToShares1/gettingSharesPendingFiltered.feature:54](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares1/gettingSharesPendingFiltered.feature#L54)
- [coreApiShareOperationsToShares1/gettingSharesPendingFiltered.feature:55](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares1/gettingSharesPendingFiltered.feature#L55)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:235](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L235)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:429](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L429)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:430](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L430)
Note: always have an empty line at the end of this file.
The bash script that processes this file requires that the last line has a newline on the end.

View File

@@ -459,48 +459,48 @@ Feature: share resources where the sharee receives the share in multiple ways
And as "Brian" file "Shares/sharedParent/child/lorem.txt" should exist
# Scenario Outline: share receiver renames a group share and receives same resource through user share with additional permissions
# Given using OCS API version "<ocs_api_version>"
# And group "grp" has been created
# And user "Brian" has been added to group "grp"
# And user "Alice" has been added to group "grp"
# And user "Alice" has created folder "parent"
# And user "Alice" has created folder "parent/child"
# And user "Alice" has uploaded file with content "Share content" to "parent/child/lorem.txt"
# And user "Alice" has created a share with settings
# | path | parent |
# | shareType | group |
# | shareWith | grp |
# | permissions | read |
# And user "Brian" has moved folder "/Shares/parent" to "/Shares/sharedParent"
# When user "Alice" shares folder "parent" with user "Brian" with permissions "all" using the sharing API
# # Note: Brian has already accepted the share of this resource as a member of "grp".
# # Now he has also received the same resource shared directly to "Brian".
# # The server should effectively "auto-accept" this new "copy" of the resource
# # and present to Brian only the single resource "Shares/sharedParent"
# Then as "Brian" folder "Shares/parent" should not exist
# And as "Brian" folder "Shares/sharedParent" should exist
# And as "Brian" file "Shares/sharedParent/child/lorem.txt" should exist
# Examples:
# | ocs_api_version |
# | 1 |
# | 2 |
Scenario Outline: share receiver renames a group share and receives same resource through user share with additional permissions
Given using OCS API version "<ocs_api_version>"
And group "grp" has been created
And user "Brian" has been added to group "grp"
And user "Alice" has been added to group "grp"
And user "Alice" has created folder "parent"
And user "Alice" has created folder "parent/child"
And user "Alice" has uploaded file with content "Share content" to "parent/child/lorem.txt"
And user "Alice" has created a share with settings
| path | parent |
| shareType | group |
| shareWith | grp |
| permissions | read |
And user "Brian" has moved folder "/Shares/parent" to "/Shares/sharedParent"
When user "Alice" shares folder "parent" with user "Brian" with permissions "all" using the sharing API
# Note: Brian has already accepted the share of this resource as a member of "grp".
# Now he has also received the same resource shared directly to "Brian".
# The server should effectively "auto-accept" this new "copy" of the resource
# and present to Brian only the single resource "Shares/sharedParent"
Then as "Brian" folder "Shares/parent" should not exist
And as "Brian" folder "Shares/sharedParent" should exist
And as "Brian" file "Shares/sharedParent/child/lorem.txt" should exist
Examples:
| ocs_api_version |
| 1 |
| 2 |
# Scenario: share receiver renames a group share and receives same resource through user share with less permissions
# Given group "grp" has been created
# And user "Brian" has been added to group "grp"
# And user "Alice" has been added to group "grp"
# And user "Alice" has created folder "parent"
# And user "Alice" has created folder "parent/child"
# And user "Alice" has uploaded file with content "Share content" to "parent/child/lorem.txt"
# And user "Alice" has shared folder "parent" with group "grp" with permissions "all"
# And user "Brian" should be able to rename folder "/Shares/parent" to "/Shares/sharedParent"
# And user "Alice" should be able to share folder "parent" with user "Brian" with permissions "read" using the sharing API
# # Note: Brian has already accepted the share of this resource as a member of "grp".
# # Now he has also received the same resource shared directly to "Brian".
# # The server should effectively "auto-accept" this new "copy" of the resource
# # and present to Brian only the single resource "Shares/sharedParent"
# And as "Brian" folder "Shares/parent" should not exist
# And as "Brian" folder "Shares/sharedParent" should exist
# And as "Brian" file "Shares/sharedParent/child/lorem.txt" should exist
Scenario: share receiver renames a group share and receives same resource through user share with less permissions
Given group "grp" has been created
And user "Brian" has been added to group "grp"
And user "Alice" has been added to group "grp"
And user "Alice" has created folder "parent"
And user "Alice" has created folder "parent/child"
And user "Alice" has uploaded file with content "Share content" to "parent/child/lorem.txt"
And user "Alice" has shared folder "parent" with group "grp" with permissions "all"
And user "Brian" should be able to rename folder "/Shares/parent" to "/Shares/sharedParent"
And user "Alice" should be able to share folder "parent" with user "Brian" with permissions "read" using the sharing API
# Note: Brian has already accepted the share of this resource as a member of "grp".
# Now he has also received the same resource shared directly to "Brian".
# The server should effectively "auto-accept" this new "copy" of the resource
# and present to Brian only the single resource "Shares/sharedParent"
And as "Brian" folder "Shares/parent" should not exist
And as "Brian" folder "Shares/sharedParent" should exist
And as "Brian" file "Shares/sharedParent/child/lorem.txt" should exist

View File

@@ -243,9 +243,9 @@ Feature: sharing
And user "Brian" has been added to group "grp1"
And user "Brian" has been added to group "grp2"
And user "Alice" has created folder "/PARENT"
When user "Alice" shares folder "/PARENT" with group "grp1" using the sharing API
When user "Alice" shares folder "/PARENT" with group "grp1" using the sharing API
Then user "Brian" should see the following elements
| /Shares/PARENT |
| /Shares/PARENT/ |
Scenario: sharing again an own file while belonging to a group
@@ -258,7 +258,7 @@ Feature: sharing
And user "Brian" has deleted the last share
When user "Brian" shares file "/randomfile.txt" with group "grp1" using the sharing API
And as "Alice" file "/Shares/randomfile.txt" should exist
@issue-2201
Scenario Outline: sharing subfolder of already shared folder, GET result is correct
Given using OCS API version "<ocs_api_version>"
@@ -423,7 +423,12 @@ Feature: sharing
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the content of file "/Shares/lorem.txt" for user "Brian" should be "some content"
And the content of file "/Shares/lorem.txt" for user "Carol" should be "some content"
When the administrator adds user "Carol" to group "grp1" using the provisioning API
And user "Carol" should not see the following elements
| /Shares/lorem.txt |
And the sharing API should report to user "Carol" that these shares are in the pending state
| path |
| /lorem.txt |
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
@@ -464,7 +469,7 @@ Feature: sharing
| 1 | 100 |
| 2 | 200 |
@issue-2146
@issue-2146 @issue-764
Scenario: share a file by multiple channels and download from sub-folder and direct file share
Given these users have been created with default attributes and without skeleton files:
| username |

View File

@@ -228,11 +228,11 @@ Feature: accept/decline shares coming from internal users
And the HTTP status code of responses on all endpoints should be "200"
And user "Carol" should see the following elements
| /Shares/shared/Brian/ |
| /Shares/shared (2)/Alice/ |
| /Shares/shared (1)/Alice/ |
And the sharing API should report to user "Carol" that these shares are in the accepted state
| path |
| /Shares/shared/ |
| /Shares/shared (2)/ |
| /Shares/shared (1)/ |
@issue-2540
Scenario: share with a group that you are part of yourself

View File

@@ -80,7 +80,7 @@ Feature: sharing
| 2 | 200 |
@smokeTest
Scenario Outline: resource cannot be reshared to resource owner
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
@@ -93,7 +93,7 @@ Feature: sharing
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 the last share id should not be included in the response
And file "/Shares/shared" should be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |

View File

@@ -23,7 +23,9 @@ Feature: get the pending shares filtered by type (user, group etc)
| path | /folderToShareWithPublic |
| permissions | read |
And user "Alice" has shared file "/fileToShareWithUser.txt" with user "Brian"
And user "Brian" has accepted share "/fileToShareWithUser.txt" offered by user "Alice"
And user "Alice" has shared file "/fileToShareWithGroup.txt" with group "grp1"
And user "Brian" has accepted share "/fileToShareWithGroup.txt" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /fileToShareWithPublic.txt |
| permissions | read |

View File

@@ -213,7 +213,7 @@ Feature: previews of files downloaded through the webdav API
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file "filesForUpload/lorem.txt" to "/parent.txt"
And user "Alice" has shared file "/parent.txt" with user "Brian"
And user "Brian" has downloaded the preview of "/Shares/parent.txt" with width "32" and height "32"
And user "Brian" has downloaded the preview of shared resource "/Shares/parent.txt" with width "32" and height "32"
When user "Alice" uploads file with content "this is a file to upload" to "/parent.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as user "Brian" the preview of shared resource "/Shares/parent.txt" with width "32" and height "32" should have been changed