Skip to content

Commit

Permalink
adding test for deleting/removing share link of a project space using…
Browse files Browse the repository at this point in the history
… root endpoint
  • Loading branch information
nirajacharya2 committed May 23, 2024
1 parent bac3777 commit 699de23
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 14 deletions.
28 changes: 14 additions & 14 deletions tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,26 +242,26 @@ The expected failures in this file are from features in the owncloud/ocis repo.
- [apiSharingNgLinkShare/linkShare.feature:544](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L544)
- [apiSharingNgLinkShare/linkShare.feature:545](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L545)
- [apiSharingNgLinkShare/linkShare.feature:611](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L611)
- [apiSharingNgLinkShare/linkShare.feature:958](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L958)
- [apiSharingNgLinkShare/linkShare.feature:1104](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1104)
- [apiSharingNgLinkShare/linkShare.feature:1160](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1160)
- [apiSharingNgLinkShare/linkShare.feature:959](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L959)
- [apiSharingNgLinkShare/linkShare.feature:1105](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1105)
- [apiSharingNgLinkShare/linkShare.feature:1161](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1161)
- [apiSharingNgLinkShare/linkShare.feature:1162](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1162)
- [apiSharingNgLinkShare/linkShare.feature:1267](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1267)
- [apiSharingNgLinkShare/linkShare.feature:1333](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1333)
- [apiSharingNgLinkShare/linkShare.feature:1477](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1477)
- [apiSharingNgLinkShare/linkShare.feature:1546](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1546)
- [apiSharingNgLinkShare/linkShare.feature:1596](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1596)
- [apiSharingNgLinkShare/linkShare.feature:1163](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1163)
- [apiSharingNgLinkShare/linkShare.feature:1268](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1268)
- [apiSharingNgLinkShare/linkShare.feature:1334](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1334)
- [apiSharingNgLinkShare/linkShare.feature:1478](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1478)
- [apiSharingNgLinkShare/linkShare.feature:1547](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1547)
- [apiSharingNgLinkShare/linkShare.feature:1597](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1597)
- [apiSharingNgLinkShare/linkShare.feature:1598](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1598)
- [apiSharingNgLinkShare/linkShare.feature:1837](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1837)
- [apiSharingNgLinkShare/linkShare.feature:1977](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1977)
- [apiSharingNgLinkShare/linkShare.feature:2031](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2031)
- [apiSharingNgLinkShare/linkShare.feature:1599](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1599)
- [apiSharingNgLinkShare/linkShare.feature:1838](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1838)
- [apiSharingNgLinkShare/linkShare.feature:1978](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L1978)
- [apiSharingNgLinkShare/linkShare.feature:2032](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2032)
- [apiSharingNgLinkShare/linkShare.feature:2033](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2033)
- [apiSharingNgLinkShare/linkShare.feature:2101](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2101)
- [apiSharingNgLinkShare/linkShare.feature:2168](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2168)
- [apiSharingNgLinkShare/linkShare.feature:2239](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2239)
- [apiSharingNgLinkShare/linkShare.feature:2034](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2034)
- [apiSharingNgLinkShare/linkShare.feature:2102](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2102)
- [apiSharingNgLinkShare/linkShare.feature:2169](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2169)
- [apiSharingNgLinkShare/linkShare.feature:2240](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature#L2240)
- [apiSharingNg/removeAccessToDriveItem.feature:125](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg/removeAccessToDriveItem.feature#L125)
- [apiSharingNg/removeAccessToDriveItem.feature:141](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg/removeAccessToDriveItem.feature#L141)
- [apiSharingNg/removeAccessToDriveItem.feature:161](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNg/removeAccessToDriveItem.feature#L161)
Expand Down
13 changes: 13 additions & 0 deletions tests/acceptance/features/apiSharingNgLinkShare/linkShare.feature
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,7 @@ Feature: Create a share link for a resource
"""
And the public should be able to download file "textfile1.txt" from the last link share with password "%public%" and the content should be "other data"


Scenario: update password of a file's link share
Given user "Alice" has uploaded file with content "other data" to "textfile1.txt"
And user "Alice" has created the following resource link share:
Expand Down Expand Up @@ -2300,3 +2301,15 @@ Feature: Create a share link for a resource
"""
And the public should be able to download file "textfile.txt" from the last link share with password "%public%" and the content should be "to share"
And the public download of file "textfile.txt" from the last link share with password "$heLlo*1234*" should fail with HTTP status code "401" using shareNg


Scenario: remove link share of a project drive
Given using spaces DAV path
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "projectSpace" with the default quota using the Graph API
And user "Alice" has created the following space link share:
| space | projectSpace |
| permissionsRole | view |
| password | $heLlo*1234* |
When user "Alice" delets the link share of space "projectSpace"
Then the HTTP status code should be "204"
12 changes: 12 additions & 0 deletions tests/acceptance/features/bootstrap/SharingNgContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -1528,4 +1528,16 @@ public function userTriesToListThePermissionsOfSpaceOwnedByUsingRootEndpointOfTh
);
$this->featureContext->setResponse($response);
}

/**
* @When user :user delets the link share of space :space
*
* @param string $user
* @param string $space
*
* @return void
*/
public function userDeletsTheLinkShare(string $user, string $space):void {
$this->featureContext->setResponse($this->removeAccessToSpaceItem($user, 'link', $space, ''));
}
}

0 comments on commit 699de23

Please sign in to comment.