Skip to content

Commit

Permalink
Capabilities related scenarios are added in expected failure
Browse files Browse the repository at this point in the history
  • Loading branch information
grgprarup committed Feb 20, 2023
1 parent 7df2f27 commit 8c1803e
Show file tree
Hide file tree
Showing 6 changed files with 668 additions and 131 deletions.
2 changes: 1 addition & 1 deletion .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ def wopiValidatorTests(ctx, storage, accounts_hash_difficulty = 4):

def coreApiTests(ctx, part_number = 1, number_of_parts = 1, storage = "ocis", accounts_hash_difficulty = 4):
early_fail = config["apiTests"]["earlyFail"] if "earlyFail" in config["apiTests"] else False
filterTags = "~@skipOnGraph&&~@skipOnOcis&&~@toImplementOnOCIS&&~comments-app-required&&~@federation-app-required&&~@notifications-app-required&&~systemtags-app-required&&~@local_storage&&~@skipOnOcis-%s-Storage&&~@caldav&&~@carddav" % ("OC" if storage == "owncloud" else "OCIS")
filterTags = "~@skipOnGraph&&~@toImplementOnOCIS&&~comments-app-required&&~@federation-app-required&&~@notifications-app-required&&~systemtags-app-required&&~@local_storage&&~@skipOnOcis-%s-Storage&&~@caldav&&~@carddav" % ("OC" if storage == "owncloud" else "OCIS")
expectedFailuresFile = "%s/tests/acceptance/expected-failures-API-on-%s-storage.md" % (dirs["base"], storage.upper())

return {
Expand Down
7 changes: 0 additions & 7 deletions tests/acceptance/config/behat-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -433,13 +433,6 @@ default:
- WebDavPropertiesContext:
- AppConfigurationContext:

coreApiTranslation:
paths:
- "%paths.base%/../features/coreApiTranslation"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params

extensions:
rdx\behatvars\BehatVariablesExtension: ~

Expand Down
28 changes: 16 additions & 12 deletions tests/acceptance/expected-failures-API-on-OCIS-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ File and sync features in a shared scenario
- [coreApiShareManagementToShares/acceptShares.feature:230](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L230)
- [coreApiShareManagementToShares/acceptShares.feature:495](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L495)
- [coreApiShareManagementToShares/acceptShares.feature:560](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L560)
- [coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:141](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L141)
- [coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:129](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L129)
- [coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:181](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L181)
- [coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:130](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L130)
- [coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:164](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L164)
- [coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:45](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L45)
- [coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:165](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L165)
- [coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:38](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L38)
- [coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature:39](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares2/createShareReceivedInMultipleWays.feature#L39)

#### [sharing the shares folder to users exits with different status code than in oc10 backend](https://github.com/owncloud/ocis/issues/2215)

Expand Down Expand Up @@ -398,8 +398,8 @@ cannot share a folder with create permission

- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:175](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L175)
- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:176](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L176)
- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:73](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L73)
- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:74](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L74)
- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:201](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L201)
- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:202](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L202)
- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:229](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L229)
- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:230](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L230)
- [coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature:258](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareCreateSpecialToShares1/createShareExpirationDate.feature#L258)
Expand Down Expand Up @@ -429,7 +429,7 @@ cannot share a folder with create permission

#### [Cannot move folder/file from one received share to another](https://github.com/owncloud/ocis/issues/2442)

- [coreApiShareUpdateToShares/updateShare.feature:201](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature#L201)
- [coreApiShareUpdateToShares/updateShare.feature:196](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature#L196)
- [coreApiShareUpdateToShares/updateShare.feature:160](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature#L160)
- [coreApiShareManagementToShares/mergeShare.feature:136](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/mergeShare.feature#L136)

Expand Down Expand Up @@ -676,8 +676,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:534](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L534)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:529](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L529)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:530](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L530)

#### [copying the file inside Shares folder returns 404](https://github.com/owncloud/ocis/issues/3874)

Expand Down Expand Up @@ -727,9 +727,9 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers
- [coreApiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:38](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature#L38)
- [coreApiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:39](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature#L39)
- [coreApiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature:40](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUpload2/uploadFileToExcludedDirectoryUsingOldChunking.feature#L40)
- [coreApiWebdavMove2/moveFile.feature:287](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L287)
- [coreApiWebdavMove2/moveFile.feature:288](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L288)
- [coreApiWebdavMove2/moveFile.feature:293](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L293)
- [coreApiWebdavMove2/moveFile.feature:176](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L176)
- [coreApiWebdavMove2/moveFile.feature:177](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L177)
- [coreApiWebdavMove2/moveFile.feature:182](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L182)

#### [cannot set blacklisted file names](https://github.com/owncloud/product/issues/260)

Expand Down Expand Up @@ -817,7 +817,7 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers
- [coreApiWebdavMove1/moveFolder.feature:27](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L27)
- [coreApiWebdavMove1/moveFolder.feature:45](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L45)
- [coreApiWebdavMove1/moveFolder.feature:63](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L63)
- [coreApiWebdavMove2/moveFile.feature:224](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L224)
- [coreApiWebdavMove2/moveFile.feature:138](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L138)
- [coreApiWebdavMove2/moveFileToBlacklistedName.feature:25](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFileToBlacklistedName.feature#L25)
- [coreApiWebdavMove2/moveFileToBlacklistedName.feature:41](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFileToBlacklistedName.feature#L41)
- [coreApiWebdavMove2/moveFileToBlacklistedName.feature:80](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFileToBlacklistedName.feature#L80)
Expand Down Expand Up @@ -863,7 +863,7 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers

#### [HTTP status code differ while deleting file of another user's trash bin](https://github.com/owncloud/ocis/issues/3544)

- [coreApiTrashbin/trashbinDelete.feature:104](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiTrashbin/trashbinDelete.feature#L104)
- [coreApiTrashbin/trashbinDelete.feature:105](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiTrashbin/trashbinDelete.feature#L105)

#### [Problem accessing trashbin with personal space id](https://github.com/owncloud/ocis/issues/3639)

Expand Down Expand Up @@ -899,5 +899,9 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers
- [coreApiTrashbin/trashbinFilesFolders.feature:426](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiTrashbin/trashbinFilesFolders.feature#L426)
- [coreApiTrashbin/trashbinFilesFolders.feature:463](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiTrashbin/trashbinFilesFolders.feature#L463)

#### [Default capabilities for normal user and admin user not same as in oC-core](https://github.com/owncloud/ocis/issues/1285)
- [coreApiCapabilities/capabilities.feature:8](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiCapabilities/capabilities.feature#L8)
- [coreApiCapabilities/capabilities.feature:35](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiCapabilities/capabilities.feature#L35)
- [coreApiCapabilities/capabilities.feature:44](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiCapabilities/capabilities.feature#L44)
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.
79 changes: 4 additions & 75 deletions tests/acceptance/features/coreApiCapabilities/capabilities.feature
Original file line number Diff line number Diff line change
@@ -1,32 +1,10 @@
@api @files_sharing-app-required @issue-ocis-reva-41
@api @files_sharing-app-required
Feature: capabilities

Background:
Given using OCS API version "1"

@smokeTest @skipOnOcis
Scenario: getting new default capabilities in versions after 10.5.0 with admin user
When the administrator retrieves the capabilities using the capabilities API
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And the capabilities should contain
| capability | path_to_element | value |
| files | favorites | 1 |
| files | file_locking_support | 1 |
| files | file_locking_enable_file_action | EMPTY |

@smokeTest @skipOnOcis
Scenario: lock file action can be enabled
Given parameter "enable_lock_file_action" of app "files" has been set to "yes"
When the administrator retrieves the capabilities using the capabilities API
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And the capabilities should contain
| capability | path_to_element | value |
| files | file_locking_support | 1 |
| files | file_locking_enable_file_action | 1 |

@smokeTest @skipOnOcis
@smokeTest @issue-ocis-1285
Scenario: getting default capabilities with admin user
When the administrator retrieves the capabilities using the capabilities API
Then the OCS status code should be "100"
Expand All @@ -53,7 +31,7 @@ Feature: capabilities
| capability | path_to_element | value |
| files | versioning | 1 |

@skipOnOcis
@issue-ocis-1285
Scenario: getting default_permissions capability with admin user
When the administrator retrieves the capabilities using the capabilities API
Then the OCS status code should be "100"
Expand All @@ -62,7 +40,7 @@ Feature: capabilities
| capability | path_to_element | value |
| files_sharing | default_permissions | 31 |

@skipOnOcis
@issue-ocis-1285
Scenario: .htaccess is reported as a blacklisted file by default
When the administrator retrieves the capabilities using the capabilities API
Then the OCS status code should be "100"
Expand All @@ -71,55 +49,6 @@ Feature: capabilities
| capability | path_to_element | value |
| files | blacklisted_files@@@element[0] | .htaccess |

@skipOnOcis
Scenario: multiple files can be reported as blacklisted
Given the administrator has updated system config key "blacklisted_files" with value '["test.txt",".htaccess"]' and type "json"
When the administrator retrieves the capabilities using the capabilities API
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And the capabilities should contain
| capability | path_to_element | value |
| files | blacklisted_files@@@element[0] | test.txt |
| files | blacklisted_files@@@element[1] | .htaccess |

#feature added in #31824 released in 10.0.10
@smokeTest @skipOnOcis
Scenario: getting capabilities with admin user
When the administrator retrieves the capabilities using the capabilities API
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And the capabilities should contain
| capability | path_to_element | value |
| files_sharing | can_share | 1 |

#feature added in #32414 released in 10.0.10
@skipOnOcis
Scenario: getting async capabilities when async operations are enabled
Given the administrator has enabled async operations
When the administrator retrieves the capabilities using the capabilities API
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And the capabilities should contain
| capability | path_to_element | value |
| async | | 1.0 |


Scenario: getting async capabilities when async operations are disabled
Given the administrator has disabled async operations
When the administrator retrieves the capabilities using the capabilities API
Then the capabilities should contain
| capability | path_to_element | value |
| async | | EMPTY |

@skipOnOcis
Scenario: blacklisted_files_regex is reported in capabilities
When the administrator retrieves the capabilities using the capabilities API
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And the capabilities should contain
| capability | path_to_element | value |
| files | blacklisted_files_regex | \.(part\|filepart)$ |

@smokeTest
Scenario: getting default capabilities with admin user
When the administrator retrieves the capabilities using the capabilities API
Expand Down
Loading

0 comments on commit 8c1803e

Please sign in to comment.