Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only][full-ci] adding test for deleting/removing share link of a project space using permission endpoint #9233

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions tests/acceptance/features/apiSharingNg/removeAccessToDrive.feature
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,15 @@ Feature: Remove access to a drive
| permissionsRole | internal |
When user "Brian" tries to remove the link from space "NewSpace" owned by "Alice" using root endpoint of the Graph API
Then the HTTP status code should be "500"


Scenario: remove link share of a project drive using permissions endpoint
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" deletes the last link share of space "projectSpace" using permissions endpoint of the Graph API
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 @@ -1578,4 +1578,16 @@ public function userTriesToListThePermissionsOfSpaceOwnedByUsingRootEndpointOfTh
);
$this->featureContext->setResponse($response);
}

/**
* @When user :user deletes the last link share of space :space using permissions endpoint of the Graph API
*
* @param string $user
* @param string $space
*
* @return void
*/
public function userDeletsTheLastLinkShareOfSpaceUsingPermissionsEndpointOfGraphApi(string $user, string $space):void {
$this->featureContext->setResponse($this->removeAccessToSpaceItem($user, 'link', $space, ''));
}
}