From e85f3019e052e2880197cdbc028ae508415b31cd Mon Sep 17 00:00:00 2001 From: Prarup Gurung Date: Tue, 11 Jun 2024 11:44:13 +0545 Subject: [PATCH] Removed failing ocs scenarios, removed from expected failure --- .../expected-failures-API-on-OCIS-storage.md | 13 ----------- .../acceptance/features/bootstrap/Sharing.php | 5 +++-- .../shareAccessByID.feature | 22 ++----------------- 3 files changed, 5 insertions(+), 35 deletions(-) diff --git a/tests/acceptance/expected-failures-API-on-OCIS-storage.md b/tests/acceptance/expected-failures-API-on-OCIS-storage.md index 85f1dc7b9a..734a456b75 100644 --- a/tests/acceptance/expected-failures-API-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-API-on-OCIS-storage.md @@ -269,17 +269,6 @@ And other missing implementation of favorites - [coreApiWebdavUploadTUS/optionsRequest.feature:40](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/optionsRequest.feature#L40) - [coreApiWebdavUploadTUS/optionsRequest.feature:55](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUploadTUS/optionsRequest.feature#L55) -#### [Trying to accept a share with invalid ID gives incorrect OCS and HTTP status](https://github.com/owncloud/ocis/issues/2111) - -- [coreApiShareOperationsToShares2/shareAccessByID.feature:135](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L135) -- [coreApiShareOperationsToShares2/shareAccessByID.feature:136](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L136) -- [coreApiShareOperationsToShares2/shareAccessByID.feature:137](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L137) -- [coreApiShareOperationsToShares2/shareAccessByID.feature:138](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L138) -- [coreApiShareOperationsToShares2/shareAccessByID.feature:139](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L139) -- [coreApiShareOperationsToShares2/shareAccessByID.feature:140](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L140) -- [coreApiShareOperationsToShares2/shareAccessByID.feature:141](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L141) -- [coreApiShareOperationsToShares2/shareAccessByID.feature:142](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L142) - #### [Shares to deleted group listed in the response](https://github.com/owncloud/ocis/issues/2441) - [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:502](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L502) @@ -335,8 +324,6 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers - [coreApiShareManagementToShares/acceptShares.feature:235](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L235) - [coreApiShareManagementToShares/acceptShares.feature:303](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L303) - [coreApiShareManagementToShares/acceptShares.feature:537](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L537) -- [coreApiShareOperationsToShares2/shareAccessByID.feature:123](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L123) -- [coreApiShareOperationsToShares2/shareAccessByID.feature:124](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L124) - [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:213](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L213) - [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:214](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L214) - [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:215](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L215) diff --git a/tests/acceptance/features/bootstrap/Sharing.php b/tests/acceptance/features/bootstrap/Sharing.php index b1fd16cc5e..5ab28efcc3 100755 --- a/tests/acceptance/features/bootstrap/Sharing.php +++ b/tests/acceptance/features/bootstrap/Sharing.php @@ -717,7 +717,8 @@ trait Sharing { */ public function getLastCreatedUserGroupShareId(?string $user = null): string { if ($user === null) { - return (string) $this->getLastCreatedUserGroupShare()->id; + $shareId = $this->isUsingSharingNG() ? $this->shareNgGetLastCreatedUserGroupShareID() : $this->getLastCreatedUserGroupShare()->id; + return (string) $shareId; } $createdShares = $this->getCreatedUserGroupShares(); if (isset($createdShares[$user])) { @@ -3109,7 +3110,7 @@ trait Sharing { '/apps/files_sharing/api/v' . $this->sharingApiVersion . '/shares/' . $shareId ); } - + /** * @When /^user "([^"]*)" unshares (?:folder|file|entity) "([^"]*)" shared to "([^"]*)"$/ * diff --git a/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature b/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature index 182deab7ec..b10887806a 100644 --- a/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature +++ b/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature @@ -116,32 +116,14 @@ Feature: share access by ID And user "Brian" should not see the following elements | /Shares/textfile0.txt | And the sharing API should report to user "Brian" that these shares are in the declined state - | path | - | /Shares/textfile0.txt | + | path | + | textfile0.txt | Examples: | ocs-api-version | ocs-status-code | | 1 | 100 | | 2 | 200 | - Scenario Outline: decline a share using a invalid share Id - Given using OCS API version "" - When user "Brian" declines share with ID "" using the sharing API - Then the HTTP status code should be "" - And the OCS status code should be "404" - And the API should not return any data - Examples: - | ocs-api-version | share-id | http-status-code | - | 1 | 2333311 | 200 | - | 2 | 2333311 | 404 | - | 1 | helloshare | 200 | - | 2 | helloshare | 404 | - | 1 | $#@r3 | 200 | - | 2 | $#@r3 | 404 | - | 1 | 0 | 200 | - | 2 | 0 | 404 | - - Scenario Outline: decline a share using empty share Id Given using OCS API version "" When user "Brian" declines share with ID "" using the sharing API