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 2f3c0d1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
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 of link share of 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 2f3c0d1

Please sign in to comment.