Skip to content

Commit

Permalink
Review address
Browse files Browse the repository at this point in the history
  • Loading branch information
SagarGi committed Apr 15, 2024
1 parent 0b1816f commit afb5d44
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/TestHelpers/GraphHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -1648,7 +1648,7 @@ public static function getPermissionsRoleIdByName(
}

/**
* Get the role id by name
* Get the role name by role id
*
* @param string $permissionsRoleId
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -562,23 +562,23 @@ Feature: List a sharing permissions
"""


Scenario: user send share invitation for all allowed roles defined in permission lists for a file
Scenario: user sends share invitation with all allowed roles for a file
Given user "Alice" has uploaded file with content "hello text" to "textfile.txt"
And user "Brian" has been created with default attributes and without skeleton files
When user "Alice" gets permissions list for file "textfile.txt" of the space "Personal" using the Graph API
Then the HTTP status code should be "200"
And user "Alice" should be able to send share invitation with all allowed permission roles from the above response:
And user "Alice" should be able to send share invitation with all allowed permission roles
| resource | textfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |

Scenario: user send share invitation for all allowed roles defined in permission lists for a folder
Scenario: user sends share invitation with all allowed roles for a folder
Given user "Alice" has created folder "folder"
And user "Brian" has been created with default attributes and without skeleton files
When user "Alice" gets permissions list for folder "folder" of the space "Personal" using the Graph API
Then the HTTP status code should be "200"
And user "Alice" should be able to send share invitation with all allowed permission roles from the above response:
And user "Alice" should be able to send share invitation with all allowed permission roles
| resource | folder |
| space | Personal |
| sharee | Brian |
Expand Down
3 changes: 1 addition & 2 deletions tests/acceptance/features/bootstrap/SharingNgContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ public function userShouldHaveSyncEnabledOrDisabledForShare(string $user, string
}

/**
* @Then user :user should be able to send share invitation with all allowed permission roles from the above response:
* @Then user :user should be able to send share invitation with all allowed permission roles
*
* @param string $user
* @param TableNode $table
Expand Down Expand Up @@ -705,7 +705,6 @@ public function userCanSendShareInvitationToUserWithAllAllowedPermissionRolesFor
$jsonResponseSendInvitation = $this->featureContext->getJsonDecodedResponseBodyContent($responseSendInvitation);
$httpsStatusCode = $responseSendInvitation->getStatusCode();
if ($httpsStatusCode === 200 && !empty($jsonResponseSendInvitation->value)) {
$shareInvitationRequestResult = $shareInvitationRequestResult . "\tShare invitation for resource '" . $resource . "' with role '" . $roleAllowed . "' was allowed.\n";
// remove the share so that the same user can be share for the next allowed roles
$removePermissionsResponse = $this->removeSharePermission($user, $shareType, $space, $resource);
Assert::assertEquals(204, $removePermissionsResponse->getStatusCode());
Expand Down

0 comments on commit afb5d44

Please sign in to comment.